Updated March 3, 2023
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 them from each other. Operating systems have different processes to install and work with.
Now, if you are looking for a job related to OS, you need to prepare for the 2023 OS Interview Questions. Every interview is different from 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 succeed 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 load it into the main memory, and then the program will then start its execution.
2. What are the process and process tables? Explain the different states through which the process goes.
A process can be called a program that 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. 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 permission from the operating system to use the processor. Only one process can be in the running state at a time.
- Ready: A process is in the ready state when it is waiting for the operating system’s permission to use the processor.
- Waiting: Remaining processes can be in a waiting state, which can be waiting for some external event to occur or user input.
Let us move to the next OS Interview Questions.
3. What is RAID, and what are its different levels?
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 systems?
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 execute multiple tasks on a single processor simultaneously. 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 the kernel named:
- Monolithic Kernel:
It can be considered a whole kernel full-fledged kernel, which provides all the services are running.
It is a 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 the 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 static variables.
- Code or text: contains code, program counter and content of processor’s register.
Let us move to the next OS Interview Questions And Answer.
7. What are the different types of scheduling algorithms?
These are the advanced OS Interview Questions that are 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): A 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.
- CPU Utilization: Percentage of time that the CPU is doing useful work (I.e. not being idle). 100% is perfect.
- Wait Time: This is the time that a process spends for its turn to get executed.
- Throughput: The number of processes completed / time unit.
- Response Time: This is the time elapsed from when a process is submitted until a useful output is obtained.
- Turnaround Time: 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 that 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. Here we have listed the most useful 10 interview sets of questions so that the jobseeker can crack the interview with ease. You may also look at the following articles to learn more –