0% found this document useful (0 votes)
5 views4 pages

OS Interview QA

The document provides a comprehensive overview of operating systems, detailing their functions, components, and key concepts such as processes, threads, and memory management. It covers essential topics like CPU scheduling, deadlock handling, and system calls, as well as the differences between user mode and kernel mode. Additionally, it discusses OS architecture and the distinctions between monolithic and microkernel designs.

Uploaded by

Manish S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views4 pages

OS Interview QA

The document provides a comprehensive overview of operating systems, detailing their functions, components, and key concepts such as processes, threads, and memory management. It covers essential topics like CPU scheduling, deadlock handling, and system calls, as well as the differences between user mode and kernel mode. Additionally, it discusses OS architecture and the distinctions between monolithic and microkernel designs.

Uploaded by

Manish S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Operating Systems Interview Questions & Answers

1. What is an Operating System?

An operating system (OS) is system software that manages computer hardware and provides services for application
programs. It acts as an intermediary between users and hardware, ensuring efficient resource utilization and system
stability.

The OS abstracts low-level hardware complexity and offers a consistent interface so programs can run without needing
to understand hardware specifics.

• Resource management (CPU, memory, devices)

• Process and thread management

• File system and storage management

• Security and protection

2. What are the main components of an OS?

Operating systems are structured into functional components, each responsible for managing specific system resources
and operations.

• Process Management – handles execution and scheduling

• Memory Management – allocates and tracks RAM usage

• File System – manages persistent storage

• Device Management – controls hardware via drivers

• Security – enforces permissions and isolation

• Kernel – core that coordinates all components

3. What is a Process?

A process is a program in execution. It includes the program code, current activity, allocated resources, and execution
context.

Each process operates in its own address space, ensuring isolation from other processes.

4. What is a Thread?

A thread is the smallest unit of execution within a process. Multiple threads within the same process share memory but
execute independently.

Threads improve responsiveness and performance through concurrency.

5. Difference between Process and Thread


Processes are heavyweight and isolated, while threads are lightweight and share memory within a process. Threads
enable faster context switching but require synchronization to avoid race conditions.

6. What is a Process Control Block (PCB)?

A PCB is a data structure maintained by the OS to store all information about a process. It allows the OS to track
execution and perform context switching.

• Process ID

• Process state

• CPU registers and program counter

• Memory management info

• Scheduling data

• I/O status

7. What is Context Switching?

Context switching is the mechanism where the CPU switches from one process to another. The OS saves the current
process state in its PCB and loads the next process state.

This enables multitasking but introduces overhead.

8. What are Process States?

Processes move through various states during execution.

• New – process is being created

• Ready – waiting for CPU

• Running – executing

• Waiting – blocked for I/O or event

• Terminated – execution finished

9. What is CPU Scheduling?

CPU scheduling determines which process runs next when multiple processes are ready. The goal is to maximize CPU
utilization, fairness, and responsiveness.

• FCFS – First come, first served

• SJF – Shortest job first

• Round Robin – time-sharing

• Priority scheduling

10. Explain Round Robin Scheduling


Round Robin assigns a fixed time quantum to each process in a cyclic order. If a process does not complete within its
time slice, it is placed back at the end of the queue.

It ensures fairness and is widely used in time-sharing systems.

11. What is Deadlock?

Deadlock is a situation where a set of processes are blocked because each is waiting for a resource held by another.
None can proceed.

• Mutual exclusion

• Hold and wait

• No preemption

• Circular wait

12. How can Deadlocks be handled?

Deadlocks can be managed through prevention, avoidance, or detection and recovery. Each method trades off
performance and complexity.

13. What is Memory Management?

Memory management handles allocation and deallocation of RAM to processes. It ensures efficient utilization and
isolation.

14. What is Paging?

Paging divides memory into fixed-size blocks called pages and frames. It eliminates external fragmentation and allows
non-contiguous memory allocation.

15. What is Virtual Memory?

Virtual memory allows processes to use more memory than physically available by swapping data between RAM and
disk. It enables large programs to run efficiently.

16. What are System Calls?

System calls provide the interface for user programs to request services from the OS kernel. They enable controlled
access to hardware and resources.

17. User Mode vs Kernel Mode

User mode restricts access to hardware for safety, while kernel mode allows full access. System calls switch execution
from user mode to kernel mode.
18. What is OS Architecture?

OS architecture defines how system components interact. Most systems follow a layered design with applications,
system calls, kernel, and hardware.

19. Monolithic vs Microkernel

Monolithic kernels include all services in kernel space for performance, while microkernels keep minimal functionality in
the kernel and move services to user space for modularity.

20. What are System Calls Types?

System calls are categorized based on functionality.

• Process control

• File management

• Device management

• Information maintenance

• Communication

End of Document

You might also like