This article contains 100 most frequently asked questions on Operating System. These questions are extracted from various interview experiences, held at various locations and companies.
Download the e-books of Interview Questions : here
SET 1 – Q1 – Q5
Q. What is an Operating System ?
A. Operating System acts as the interface between the user of a computer and computer hardware.
Q. What is the main purpose of Operating System ?
A. The main purpose of Operating system is to provide an environment in which a user can execute programs in a convenient and efficient manner. OS can be considered as a software, used for managing hardware.
Q. Name the tasks performed by Operating System ?
A. 1. Process Management.
2. Memory Management.
3. File System Management.
4. Device Management.
Q. When you consider OS as a resource manager ?
A. Considering the operating system as resource manager, it must do the following :
1. Keep track of resources.
2. Allocate/ Deallocate resource
Q. What are the services offered by Operating system ?
A. 1. Program Execution.
2. I/O operations.
3. File System manipulation.
4. Error Detection.
5. Protection & Security.
SET 2 – Q6 – Q10
Q. What is Batch Processing OS ?
A. In Batch Processing OS, operator collects th job from programmmers and seperate them on the basis of jobs, hence makes batches of similar types of jobs.
Q. Give main advantage of Batch Processing OS ?
A. Increased Performance : It is possible to start a new job, as soon as previous job gets executed.
Q. Give main disadvantage of Batch Processing OS ?
A. Larger Turn Around Time.
Job can enter infinite loop.
Q. What is Spooling ?
A. Spooling refers to Simultaneous Peripheral Operations Online. It is the process of putting jobs in a buffer ( special area of memory ), where a device can access them when it is ready.
Q. Why Spooling is useful ?
A. We know that different devices access data at different rates. Buffer provides a waiting station where data can rest while slow devices catch up.
SET 3 – Q11 – Q15
Q. Explain the process of Multi-programming ?
A. When two or more programs are in memory at the same time, sharing the processor, is referred to as Multiprogramming. It increases CPU utilization by organizing jobs. Multiprogramming system provides an environment where various system resources are utilized efficiently.
Q. Give main disadvantage of Multi-programming Systems ?
A. 1. Memory Management is required.
2. CPU Scheduling is required.
Q. What are Multi Tasking OS ?
A. In multitasking os, multiple program can be at running state at same time. OS determines which applications should run in what order.
Q. What do you understand by term, ” Time Sharing ” ?
A. Time Sharing is a technique which enables many people, located at various terminals, to use a particular system at the same time.
Q. Explain real time operating system ?
A. A real-time operating system is an operating system intended to serve real-time applications that process data as it comes in, typically without buffer delays.
They are of two types :
Hard RTOS – restrictive
Soft RTOS – less restrictive
SET 4 – Q16 – Q20
Q. What are the examples of real time os ?
A. Air traffic Control System, Airline Reservation system.
Q. What are tightly coupled systems ?
A. Systems in which hardware and software are linked together, and are also dependent upon each other.
Q. What are System calls ?
A. System calls are interfaces for users request to operating system via different user applications.
Q. What do you know by virtual machines ?
A. A virtual machine is an emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer.
Q. What is Kernel ?
A. Kernel is the center hub of the Operating System. It acts as a bridge between applications and the data processing performed at the hardware level using system calls.
There are two types of kernel : Monolithic & Microlithic.
SET 5 – Q21 – Q25
Q. Differentiate between Monolithic & Microlithic kernels ?
A. 1. In monolithic kernel, request is serviced faster whereas in microlithic, it may be slower.
2. In monolithic kernel, all OS services are included whereas in microlithic provides IPC ( Inter Process Communication ).
Q. What is a Shell ?
A. Shell acts as a GUI or an interface between the user and the kernel. It is used convert user command to low level.
Q. What is a Process ?
A. A Process is a program in execution. A process may be in anyone of new, ready, running, or waiting state.
Q. Explain the various states of a process ?
Q. Name the information stored in a PCB (Process Control Block) ?
A. Following information are stored in PCB :
Process State, Process Number, Program Counter, mem. related info.
SET 6 – Q26 – Q30
Q. What is Context Switching ?
A. It is the process in which CPU switches from one process to another, is referred to as Context Switching. It is achieved with the help of Schedulers.
Q. What is Critical Section ?
A. Critical Section concept is widely used in concurrent programming. It is a piece of code, that accesses a shared resource that must not be accessed by more than one executing thread.
Q. What are Semaphores ?
A. In computer science, a semaphore is a variable or abstract data type used to control access to a common resource by multiple processes in a concurrent system such as a multitasking operating system.
Q. Explain following terms :
1. Throughput : Throughput is the number of processes completed per unit time.
2. Turnaround Time : It is the time interval from the time of submission of a process to the time of process completion.
3. Waiting Time: It is the amount of time spent by a proocess, waiting in the ready queue.
4. Response Time: It is the time between submission of requests and first response to the request.
It is desirable to maximize throughput and minimize turnaround time, waiting time, response time.
Q. Tell me some CPU scheduling algorithm ?
A. 1. First Come First Serve (FCFS) : Processes are served on the basis of their arrival time.
2. Shortest Job First (SJF) : Processes are served on the basis of shortest execution time.
3. Round Robin Scheduling Algorithm : Processes are served on the basis of fixed time quantum allocated to each process.
4. Priority Scheduling : Processes are served on the basis of their priorities.
Note ! You must know the working of these algorithms.
SET 7 – Q31 – Q35
Q. Explain Deadlock ?
A. Deadlock is a situation where two or more processes wait for same resource which is being held by some other process. Sometimes, this wait never ends. This is deadlock.
Q. What are necessary conditions for deadlock ?
A. Deadlock arises when following conditions happen simultaneously :
1. Mutual Exclusion : It means that only one process can acquire a resource at a time.
2. Hold and Wait : A process must be holding atleast one resource and waiting for additional resources that are being acquired by others.
3. No preemption : Resources can not be preempted. It means that resource will only be freed when process executes completely.
4. Circular Wait : For n number of processes, there might be a scenerio when process p2 is looking for resource held by p1, p3 is looking for resource held by p2 and so on. This is circular wait.
Q. How we can prevent deadlocks ?
A. Deadlocks can be prevented, by ensuring that one or more of above properties does not holds.
Q. How logical address differs from physical address ?
A. Logical addresses are generated by CPU and physical address describes actual location of instructions.
Q. Explain Starvation ?
A. Starvation is a condition where a process does not get the resources it needs for a long time because the resources are being allocated to other process. This scenerio is most common in Priority based scheduling.
SET 8 – Q36 – Q40
Q. What do you know about Banker’s Algorithm ?
A. It is the resource allocation and deadlock avoidance algorithm developed by E. Dijikstra.
Q. Explain fragmentation and its types ?
A. Fragmentation is a phenomenon in which storage space is used inefficiently, reducing capacity or performance or even both. There are two types of fragmentation : Internal and External.
Q. What is Paging ?
A. Paging is the memory management scheme that allows physical address space of a process to be non contiguous. Paging is used to counter external fragmentation and disk compaction.
Q. Define Segmentation ?
A. Segmentation is the technique used for memory management. In this, logical address generated by CPU is divided into different segments.
Q. Name the strategies used to select free holes from the set of available holes ?
A. 1. First Fit.
2. Best Fit.
3. Worst Fit.
SET 9 – Q41 – Q46
Q. What is Virtual Memory ?
A. Virtual memory is the technique of providing programmers with the large space area for the execution of a program. It is the part of secondary storage area.
Q. Explain Demand Paging ?
A. Demand paging is a method of virtual memory management. In a system that uses demand paging, the operating system copies a disk page into physical memory only if an attempt is made to access it and that page is not already in memory. It is the example of lazy loading.
Q. Do you know what is page fault ?
A. When a requested page is not found in main memory, then it is referred to as Page Fault.
Q. Explain the role of Cache memory ?
A. Cache memory is fast and special storage place which is used to store most frequently used instructions.
Q. What is an Interrupt ?
A. Interrupt is an event that causes CPU to stop the normal execution of a current program and switch to another process. Interrupt may be classified into two parts : Software and Hardware interrupts.
Q. What is RAID ?
A. RAID (Redundant Array of Independent Disks) is a data storage virtualization technology that combines multiple physical disk drive components into one or more logical units for the purposes of data redundancy, performance improvement, or both.
So, these are the most asked interview questions on Operating System.
We, at CODE OF GEEKS, wish you all the best for your upcoming future.