It is essential for any computer engineer to know the operating system in details. There are mainly three operating systems that are popular, and they are Windows, Linux, and Unix. However, the questions asked during an interview are more fundamental and concern with core concepts. If you are going for an interview in any tech company, you better go through the following top 10 operating system interview questions and answers.
1. What are the different types of operating system?
There are basically five types of operating system, and they are distributed, batched, timesharing, multi-programmed, and real-time operating system.
Tip – You might be asked to state the advantages and disadvantages of these operating system types, and you should prepare accordingly.
2. What is a process and what are the different states of a process?
A process is a program in execution, and the main job of an operating system is to manage the processes efficiently. There are two types of processes namely operating system process and user process.
The different states of a process are new process, running process, waiting process, ready process and terminated process.
Tip – You should remember the order, and you may have to elaborate the process at times.
3. What are the different sections in a process?
There are basically four sections in a process.
-Stack that contains all local variables.
– Heap that is dynamically allocated memory.
– Data that contains all static and global variables.
– Code that contains content of register, program counter, and programming.
4. What is RAID and what are different RAID levels?
RAID is the acronym of Redundant Array of Independent Disks. It is basically for storing same data redundantly so that the overall performance improves. The following are the different RAID levels.
RAID 0 – Non-redundant striping
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
5. What are the different types of kernel?
There are three types of kernel available, and they are monolithic, microkernel and hybrid kernel. Monolithic kernel offers full services, microkernel offers limited services while hybrid kernel is a combination of both.
Tip – You can expect a lot of question of the kernel as it is the heart of an operating system. So prepare it well.
6. What are the different types of scheduling algorithms?
There are basically four different types of scheduling algorithms, and they are as follows –
FCFS – First Come First Serve.
RR – Round Robin where each process gets a fixed amount of time.
SJF – Shortest Job First where the process having the lowest execution time gets the first preference.
PS – Priority Scheduling where the processes are selected based on priority value.
7. What are the different types of CPU register that an operating system works with?
There are four different types of CPU register namely accumulators, index registers, stack pointer and general purpose registers.
Tip – You should learn about the different properties of these registers.
8. What are thrashing, spooling, and fragmentation?
Thrashing – The process in a virtual memory system where the processor spends the most time in swapping pages instead of executing instructions.
Spooling – The process in which data are held temporarily to be used and executed by program, system or device. The best example of spooling is printing where all the requests of the different applications in a queue for printing.
Fragmentation – The condition in which files are saved in scattered spaced of a disk. It leads to memory wastage and performance slow down. There are two types namely internal and external.
9. What are the popular multiprocessor thread-scheduling strategies?
There are basically four popular multiprocessor thread-scheduling strategies used.
Load Sharing – There is a global queue of threads from where an idle processor selects a thread.
Gang Scheduling – Related threads run on a set of processor simultaneously.
Dedicated Processor Assignment – The number of threads in a program is assigned to an equal number of processors.
Dynamic Scheduling – The threads in a program can alter during the execution.
10. What is deadlock and what are the necessary conditions?
Deadlock is a condition where two processes are waiting for the completion of each other’s process so that they can start. This leads to an infinite wait and eventually a hang.
The necessary conditions are mutual exclusion, hold and wait, no preemption, and circular wait.
Tip – You may be asked to explain each of these conditions and hence, prepare accordingly.
These are the likely questions you can face during an interview where the interviewer is focusing more on the operating system to test your core understanding and concepts. Apart from these, there are various other questions possible for which you need to read and understand operating system books minutely.
- Top PHP interview questions and answers 2020 - July 7, 2020
- How to create a Whatsapp account using the Australian number? - June 28, 2020
- Top C++ interview questions And answers 2020 - June 19, 2020