Introduction OS Interview Questions And Answers
The operating system is the most important part of any computer system. Without an operating system, the user and system cannot interact. The operating system acts as an interface between these two. It enables the smooth functioning of the system. There are different kinds of operating systems like Windows OS, Linux, Unix, etc. which have their own features that differentiate it from each other. Operating systems have different processes to install and work with.
Now, if you are looking for a job which is related to OS then you need to prepare for the OS Interview Questions. It is true that every interview is different as per the different job profiles but still to clear the interview you need to have a good and clear knowledge of OS. Here, we have prepared the important OS Interview Questions And Answers which will help you get success in your interview.
Below are the 10 important OS Interview Questions And Answers that are frequently asked in an interview. these questions are divided into two parts are as follows:
Part 1 – OS Interview Questions (Basic)
This first part covers basic OS Interview Questions and Answers
1) Explain the Bootstrap program and the process to boot the system.
The process of starting a computer system by loading the kernel is known as booting the system. Whenever a user first-time logs into the system then an initial program has to run. The program which instructs the system on its initial run is the bootstrap program. This program is stored in read-only memory or EEPROM (electrically erasable programmable read-only memory). The bootstrap program will locate the kernel and will load it into main memory and then the program will start its execution.
4.6 (3,144 ratings)
2) What are the process and process table? Explain the different states through which the process goes.
A process can be called as a program which is in execution. A web browser, a shell script running all can be considered as a process. The job of an operating system is to manage all these processes. It also allocates the processes a certain amount of time to all processes. Along with this, the operating system will also allocate various resources that will process computer memory and disks. To be in sync with all these processes the operating system maintains a process table. The table has information about every process which is listed with the resources, the processes that are being used and the current state of the process.
These processes can be in three states:
- Running: A process is in this state when it has all the resources it needs for execution and it also has the permission from operating system to use the processor. Only one process can be in running state at a time.
- Ready: A process is in the ready state when it is waiting for permission of operating system to use the processor.
- Waiting: Remaining processes can be in waiting state, which can be waiting for some external event to occur or a user input
Let us move to the next OS Interview Questions.
3) What is RAID and what are its different levels?
This is the basic OS Interview Questions which is asked in an interview. RAID stands for Redundant Array of Independent Disks. To improve overall performance the data is stored redundantly and used whenever required.
Following are the different RAID levels:
- RAID 0 – Striped Disk Array without fault tolerance
- RAID 1 – Mirroring and duplexing
- RAID 2 – Memory-style error-correcting codes
- RAID 3 – Bit-interleaved Parity
- RAID 4 – Block-interleaved Parity
- RAID 5 – Block-interleaved distributed Parity
- RAID 6 – P+Q Redundancy
4) What are the different types of operating system?
There are five types of operating systems:
- Batch operating system
All jobs are submitted at once and are executed in a particular order with any preemption which means that no jobs can be taken unless these complete.
- Multiprogramming operating system
This acts to be an extension of Batch OS, where main memory can have several jobs at once and they would be executed in a particular order at a particular time.
- Multi-tasking operating system
This operating system enables the user to simultaneously execute multiple tasks on a single processor. The CPU, in this case, switches processes at a very fast pace and does it parallel.
- Multi-processing operating system
It is the ability where a user can execute multiple processes simultaneously on a multi-processor system. This utilizes more than one CPU at a time.
- Real-time operating system
Here a specified time is allotted for each job and it is usually a critical application pertaining to military operations, satellites, etc.
Part 2 – OS Interview Questions (Advanced)
Let us now have a look at the advanced OS Interview Questions.
5) Explain the different kinds of a kernel.
We have three important types of kernel named:
- Monolithic Kernel:
It can be considered as a whole kernel that is a full-fledged kernel, which provides all the services are running.
It is kernel with a limited service that is with some important services running.
Example: QNX-real-time OS
- Hybrid Kernel:
It combines the aspect of both monolithic as well as a microkernel.
Example: Microsoft NT kernel
6) Explain the different sections of a process.
There are mainly four sections in a process. They are as below:
- Stack: contains local variables, returns address
- Heap: Dynamically allocated memory via malloc, calloc,realloc
- Data: contains global and the static variables
- Code or text: contains code, program counter and content of processor’s register.
Note: Stack and the Heap section are extendible that is stack can grow down and heap can grow up.
It is in the same order as mentioned above.
Let us move to the next OS Interview Questions And Answer.
7) What are the different types of scheduling algorithms?
This is the advanced OS Interview Questions which is asked in an interview. The different types of scheduling algorithms are as follows:
- First come First serve(FCFS): First came process is served first
- Round Robin(RR): Each process is given a quantum amount of time
- Shortest job first(SJF): Process with lowest execution time is given first preference
- Priority scheduling (ps): Priority value called (nice value) is used for selecting process. Its value is from 0 to 99. 0 being maxed and 99 being least.
8) List the different performance metrics for the scheduler.
Percentage of time that the CPU is doing useful work (I.e. not being idle). 100% is perfect.
This is the time that a process spends for its turn to get executed.
The number of processes completed / time unit.
This is the time elapsed from when a process is submitted until a useful output is obtained.
This is considered to be the time elapsed from when a process is submitted to when it has completed.
9) What is the Zombie process?
A zombie process is a process which has completed and in the terminated state but has its entry in the process table. It shows that the resources are held by the process and are not free.
10) What is thrashing?
Thrashing occurs when the processor is spending most of its time in swapping pages instead of executing the instructions.
This has been a guide to List Of OS Interview Questions and Answers so that the candidate can crackdown these OS Interview Questions easily. Here in this post, we have studied about top OS Interview Questions which are often asked in interviews. You may also look at the following articles to learn more –