Operating System (OS) Interview Questions and Answers


OS INTERVIEW QUESTIONS WITH ANSWERS

1. What is an operating system?
An operating system is a program that acts as an intermediary between
the user and the computer hardware and controls the execution of all kinds of programs.
Ex:- Linux, Microsoft Windows.

2.What are the basic functions of an operating system?
The main aim of Operating System is to provide the Interface between the user and the hardware of the computer.
The various functions of OS are: Memory Management, Processor Management, Device Management, File Management, Security, etc

3. What are the different operating systems?
The different operating systems are:
[A]. Multi-user operating systems
They allows two or more users to run programs at the same time. Some OSs permits hundred or even thousands of concurrent users.
[B]. Multi-processing operating system
They supports running a program in more than one CPU.
[C]. Multi-tasking/Multi¬program/ Time Sharing operating systems
They allow more than one program to run concurrently. This is achieved by time¬sharing, dividing the available processor time between multiple
processes
[D]. Multi-threading operating systems
They allow different parts of single program to run concurrently.
[E]. Real-time operating systems
A real-time operating system is an operating system that guarantees to process events or data within a certain short amount of time. It respond to
input instantly. General purpose OSs, such as DOS and UNIX, are not real time.
[F]. Distributed operating systems
A distributed operating system manages a group of distinct computers and makes them appear to be a single computer.

4. What is deadlock?
In an operating system, a deadlock is a situation which occurs when a process or thread enters a waiting state because a resource requested is being held by another waiting process, which in turn is waiting for another resource held by another waiting process.

5. What are necessary conditions for dead lock?
The following 4 conditions are required simultaneously to cause deadlock.
1 . Mutual exclusion
2. Hold and wait
3. No preemption
4. Circular wait

7. What is a process?
A process is a program in execution. It is an active entity.

8. What is a program?
A program is a static entity made up of program statements.

9. What are the states of a process?
A process can have 5 states at a time.
1 . New
2. Ready
3. Running
4. Waiting
5. Terminated



10. What is called a PCB?
Each process in an operating system is represented by a data structure known as a process control block (PCB). The PCB contains all the important information needed to manage a particular process.


11 . What is process Scheduling?
The process scheduling is the act of determining which process in the ready state is to be allocated the CPU.

12. What are Preemptive and Nonpreemptive Scheduling?
Nonpreemptive Scheduling
A scheduling is said to be non-preemptive if, once a process has been given the CPU, the CPU cannot be taken away from that process.
Preemptive Scheduling
A scheduling is said to be preemptive if, once a process has been given the CPU can taken away.

13. What are the different scheduling algorithms?
Some scheduling algorithms are:
• FCFS Scheduling.
• Round Robin Scheduling.
• SJF Scheduling.
• SRT Scheduling.
• Priority Scheduling.
• Multilevel Queue Scheduling.
• Multilevel Feedback Queue Scheduling.

14. What are the different Scheduling Queues?
Job Queue: All processes when enters into the system are stored in job queue.
Ready Queue: The processes in the ready state are placed in the ready queue.
Device Queue: The processes waiting for a device to become available are placed in device queue.

Post a Comment

0 Comments