Unix Interview Questions & Answers For Beginners In 2020 Unix is an operating system developed by a group of employees of AT&T; during early’s 70s, if you are looking for Unix Interview Questions both if you are an interviewer or an applicant, then this web site is ideal for you, take a look at this compilation and extract a lot of common questions about Unix.
Unix interview questions and answers
What is Unix?
Besides being an operating system, Unix is multi-tasking and multi-user operating system, nowadays there are some very successful commercial products that are based on Unix, among them; Solaris, Linux, and NetBSD.
What is the function of a semaphore on Unix?
The function of the semaphores is: Create mutual exclusion. It means that it allows the resources to be used by critical regions of processes, it allows correct synchronization between two or more asynchronous processes.
How do you know if a remote host is alive or not in Unix?
Using the command “ping” or “telnet” we knows if a remote host is alive or not in Unix.
How do you check how much space is left on the current hard drive?
Quite simple, we can check how much space is left on current hard drive using the command “df –h”.
Which command would you use to find which processes are using a particular file?
The command lsof find which processes are using a particular file
How do you see the command history in Unix?
By using the command “history” we can see see the command history in Unix
How to print the primary line of a file in Unix?
Of course,this is not the only way to print the primary line of a file in Unix, but is very simple:
$> head -1 file.txt
What is the objective of memory management?
The objective of memory management is to decide the processes that should be in the main memory, monitors the available memory and manage the free space to fit more processes into the main memory.
What is the nice value?
Is the value that controls the increment and decrement of the priority of processes, it can be provided only by the administrator and the nice value of a process do not affect the nice value of others.
Name some Unix characteristics.
Among the most important ones we have –
- It is a multi-user operating system, able to simulate multitasking.
- It is written on C programming language.
- allows communication between processes.
- Uses a data hierarchical system.
Explain the Unix kernel
The kernel is the core of Unix, it starts when the operating system boots, and basically controls the cation of devices, CPU, and memory.
How can you count on a file the times that “Unix” appears?
grep -c “Unix” filename count on a file the times that “Unix” appears
Name and explain the process states in Unix.
There are 4 states:
- Running: the method is running, or able to run.
- Waiting: The process is waiting for something to run, it can be an event or a resource.
- Stopped: The processed has been stopped.
- Zombie: The process is dead, but still exist on the processes table.
What happens once you execute a program in Unix?
The system creates a special environment to run the program, it contains everything the program needs as there were no other programs, the steps are:
- Assign a slot in the process table.
- Assign a unique process ID.
- Copy the parent’s context.
- Return the new process identifier to the parent so it takes control over it.
- Decide the processes that should be in the main memory, monitors the available memory and manage the free space to fit more processes into the main memory.
Which processes are not bothered by the swapper?
Zombie processes and processes which process region is being updated by processes locked in memory.
Which are the two paging states for a page in memory?
The page is not eligible for swapping yet and is aging.
The page is eligible for swapping but not for being reassigned to another virtual address space.
Explain the difference between cmp and diff commands
CMP compares two files byte by byte, and shows the first mismatch, DIFF shows the changes needed to make them identical.
What is a map?
A map is basically and array, it contains free space’s addresses, and also the number of available resources there.
What is SHELL?
Is an interface that allows the user to enter commands, and these are converted into operating system calls.
Why would execute a process in background?
To not have to wait for the process to complete, that way you can do something else. You just have to put the symbol & at the end of the command.
What is page fault and which are its types?
A page fault is the situation when a process references a page and you do not have it in the memory, the types are:
- Validity fault.
- Protection fault.
Write the command to kill the last background process.
There are too many other Unix interview questions, so remember to review the company’s Unix requirements to focus on the correct questions, the same goes for interviewers, take a look at your real requirements and choose the questions that will help you to find the correct person.
To read more post like this click here