WNS Global Linux Interview Questions Answers

Explain Whether We Can Use Semaphore Or Mutex Or Spinlock In Interrupt Context In Linux Kernel?

Semaphore or Mutex cannot be used for interrupt context in Linux Kernel. While spinlocks can be used for locking in interrupt context.

What Is The Need For An Infinite Loop In Embedded Systems?

Infinite Loops are those program constructs where in there is no break statement so as to get out of the loop, it just keeps looping over the statements within the block defined.

Example

While(Boolean True) OR for(;;);
{
//Code
}

Embedded systems need infinite loops for repeatedly processing/monitoring the state of the program. One example could be the case of a program state continuously being checked for any exceptional errors that might just occur during run time such as memory outage or divide by zero etc.,

A Vast Majority Of High Performance Embedded Systems Today Use Risc Architecture Why?

•According to the instruction sets used, computers are normally classified into RISC and CISC. RISC stands for 'Reduced Instruction Set Computing' . The design philosophy of RISC architecture is such that only one instruction is performed on each machine cycle thus taking very less time and speeding up when compared to their CISC counterparts.
•Here the use of registers is optimised as most of the memory access operations are limited to store and load operations.
•Fewer and simple addressing modes, and simple instruction formats leads to greater efficiency, optimisation of compilers, re-organisation of code for better throughput in terms of space and time complexities. All these features make it the choice of architecture in majority of the Embedded systems.
•CISC again have their own advantages and they are preferred whenever the performance and compiler simplification are the issues to be taken care of.
WNS Global Most Frequently Asked Latest Linux Interview Questions Answers
WNS Global Most Frequently Asked Latest Linux Interview Questions Answers

Why Do We Need Virtual Device Drivers When We Have Physical Device Drivers?

Device drivers are basically a set of modules/routines so as to handle a device for which a direct way of communication is not possible through the user's application program and these can be thought of as an interface thus keeping the system small providing for minimalistic of additions of code, if any.

Physical device drivers can’t perform all the logical operations needed in a system in cases like IPC, Signals and so on...

The main reason for having virtual device drivers is to mimic the behaviour of certain hardware devices without it actually being present and these could be attributed to the high cost of the devices or the unavailability of such devices.

These basically create an illusion for the users as if they are using the actual hardware and enable them to carryout their simulation results.

Examples could be the use of virtual drivers in case of Network simulators,also the support of virtual device drivers in case a user runs an additional OS in a virtual box kind of a software.

What Does Nslookup Do? Explain Its Two Modes.

Nslookup is used to find details related to a Domain name server. Details like IP addresses of a machine, MX records, servers etc. It sends a domain name query packet to the corresponding DNS.

Nslookup has two modes. Interactive and non interactive. Interactive mode allows the user to interact by querying information about different hosts and domains.

Non interactive mode is used to fetch information about the specified host or domain.

Interactive mode
Nslookup [options] [server]

What Is Bash Shell?

Bash is a free shell for UNIX. It is the default shell for most UNIX systems. It has a combination of the C and Korn shell features. Bash shell is not portable. any Bash-specific feature will not function on a system using the Bourne shell or one of its replacements, unless bash is installed as a secondary shell and the script begins with #!/bin/bash. It supports regular and expressions. When bash script starts, it executes commands of different scripts.

What Are Two Functions The Move Mv Command Can Carry Out?

The mv command moves files and can also be used to rename a file or directory.

What Does The Top Command Display?

Top provides an ongoing look at processor activity in real time.It displays a listing of the most CPU-intensive tasks on the system, and can provide an interactive inter¬ face for manipulating processes. (q is to quit)

How To Find Difference In Two Configuration Files On The Same Server?

Use diff command that is compare files line by line
diff -u /usr/home/my_project1/etc/ABC.conf /usr/home/my_project2/etc/ABC.conf

What Is The Best Way To See The End Of A Logfile.log File?

Use tail command - output the last part of files
tail -n file_name ( the last N lines, instead of the last 10 as default)

Please Write A Loop For Removing All Files In The Current Directory That Contains A Word 'log'?

for i in *log*; do rm $i; done

Post a Comment

Previous Post Next Post