Top 45 OS Interview Questions and Answers

Operating System Interview Questions Answers Techhyme

Operating System is basically a software program that manages and handles all resources of a computer such as hardware and software. The first OS was introduced in the early 1950s known as GMOs.

An OS is responsible for managing, handling, and coordinating overall activities and sharing of computer resources. It acts as an intermediary among users of computer and computer hardware.

Below is the list of commonly asked Operating Systems Interview Questions:

1Q. What is an Operating System ?

Operating System acts as the interface between the user of a computer and computer hardware.

2Q. What is the main purpose of Operating System ?

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.

3Q. Name the tasks performed by Operating System ?

  1. Process Management.
  2. Memory Management.
  3. File System Management.
  4. Device Management.

4Q. When you consider OS as a resource manager ?

Considering the operating system as resource manager, it must do the following :

  • Keep track of resources.
  • Allocate/ Deallocate resource

5Q. What are the services offered by Operating system ?

1. Program Execution.
2. I/O operations.
3. File System manipulation.
4. Error Detection.
5. Protection & Security.

6Q. What is Batch Processing OS ?

In Batch Processing OS, operator collects the job from programmers and separate them on the basis of jobs, hence makes batches of similar types of jobs.

7Q. Give main advantage of Batch Processing OS ?

Increased Performance : It is possible to start a new job, as soon as previous job gets executed.

8Q. Give main disadvantage of Batch Processing OS ?

  • Larger Turn Around Time.
  • Job can enter infinite loop.

9Q. What is Spooling ?

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.

10Q. Why Spooling is useful ?

We know that different devices access data at different rates. Buffer provides a waiting station where data can rest while slow devices catch up.

11Q. Explain the process of Multi-programming ?

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.

12Q. Give main disadvantage of Multi-programming Systems ?

  • Memory Management is required.
  • CPU Scheduling is required.

13Q. What are Multi Tasking OS ?

In multitasking os, multiple program can be at running state at same time. OS determines which applications should run in what order.

14Q. What do you understand by term, ” Time Sharing ” ?

Time Sharing is a technique which enables many people, located at various terminals, to use a particular system at the same time.

15Q. Explain real time operating system ?

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

16Q. What are the examples of real time os ?

Air traffic Control System, Airline Reservation system.

17Q. What are tightly coupled systems ?

Systems in which hardware and software are linked together, and are also dependent upon each other.

18Q. What are System calls ?

System calls are interfaces for users request to operating system via different user applications.

19Q. What do you know by virtual machines ?

A virtual machine is an emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer.

20Q. What is Kernel ?

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.

21Q. Differentiate between Monolithic & Microlithic kernels ?

  • In monolithic kernel, request is serviced faster whereas in microlithic, it may be slower.
  • In monolithic kernel, all OS services are included whereas in microlithic provides IPC ( Inter Process Communication ).

22Q. What is a Shell ?

Shell acts as a GUI or an interface between the user and the kernel. It is used convert user command to low level.

23Q. What is a Process ?

A Process is a program in execution. A process may be in anyone of new, ready, running, or waiting state.

24Q. Name the information stored in a PCB (Process Control Block) ?

Following information are stored in PCB : Process State, Process Number, Program Counter, mem. related info.

25Q. What is Context Switching ?

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.

26Q. What is Critical Section ?
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.

27Q. What are Semaphores ?

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.

28Q. 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 process, 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.

29Q. Tell me some CPU scheduling algorithm ?

  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.

30Q. Explain Deadlock ?

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.

31Q. What are necessary conditions for deadlock ?

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 scenario 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.

32Q. How we can prevent deadlocks ?

Deadlocks can be prevented, by ensuring that one or more of above properties does not holds.

33Q. How logical address differs from physical address ?

Logical addresses are generated by CPU and physical address describes actual location of instructions.

34Q. Explain Starvation ?

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 scenario is most common in Priority based scheduling.

35Q. What do you know about Banker’s Algorithm ?

It is the resource allocation and deadlock avoidance algorithm developed by E. Dijikstra.

36Q. Explain fragmentation and its types ?

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.

37Q. What is Paging ?

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.

38Q. Define Segmentation ?

Segmentation is the technique used for memory management. In this, logical address generated by CPU is divided into different segments.

39Q. Name the strategies used to select free holes from the set of available holes ?

  • First Fit.
  • Best Fit.
  • Worst Fit.

40Q. What is Virtual Memory ?

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.

41Q. Explain Demand Paging ?

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.

42Q. Do you know what is page fault ?

When a requested page is not found in main memory, then it is referred to as Page Fault.

43Q. Explain the role of Cache memory ?

Cache memory is fast and special storage place which is used to store most frequently used instructions.

44Q. What is an Interrupt ?

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.

45Q. What is RAID ?

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.

You may also like:

Related Posts

Leave a Reply