Operating system concepts appear in interviews for software engineering, system administration, DevOps and security roles. These operating system interview questions cover processes, threads, scheduling, synchronisation, memory and file systems, with short answers and links to detailed guides.

operating system interview questions

Fundamentals

1. What is an operating system?

It is software that manages hardware and provides services to programs. Its main jobs include process, memory, file and device management, plus security. See functions of the operating system.

2. What is the kernel?

The kernel is the core of the OS. It runs in privileged mode and controls the CPU, memory and devices. Applications ask it for services through system calls.

3. User mode vs kernel mode?

Applications run in user mode with limited privileges. When they need hardware access, they make a system call, and the CPU switches to kernel mode. This separation protects the system from faulty or malicious programs.

4. Monolithic kernel vs microkernel?

A monolithic kernel runs most services in kernel space, as Linux does. A microkernel keeps only essentials in the kernel and runs other services in user space. See structure of operating systems.

Processes and threads

5. Process vs thread?

A process is a running program with its own memory. Threads are units of execution inside a process that share its memory. Read more about threads.

6. List the process states.

New, ready, running, waiting (blocked) and terminated.

7. Describe a context switch.

The OS saves the state of the running process and loads another’s. It allows multitasking, but it adds overhead.

8. Zombie vs orphan process?

A zombie has finished, but its parent has not yet read its exit status. An orphan is still running after its parent ended; on Linux, PID 1 or a subreaper adopts it.

9. What is an interrupt?

An interrupt is a signal from hardware or software that makes the CPU pause its current work and run a handler. For example, a keyboard press or a network packet triggers one.

Scheduling and synchronisation

10. Name some CPU scheduling algorithms.

FCFS, SJF, SRTF, priority, round robin and multilevel feedback queues. See CPU scheduling algorithms.

11. Preemptive vs non-preemptive scheduling?

Preemptive scheduling can interrupt a running process. Non-preemptive scheduling waits until it finishes or blocks.

12. What is a race condition?

It happens when the result depends on the timing of threads that access shared data. Locks, semaphores and atomic operations prevent it.

13. Mutex vs semaphore?

A mutex lets only one thread enter a critical section, and the thread that locks it must unlock it. A semaphore is a counter that can allow several threads at once.

14. What are the four conditions for deadlock?

Mutual exclusion, hold and wait, no preemption and circular wait. See deadlock.

Memory

15. Logical vs physical address?

Programs use logical (virtual) addresses. The MMU translates them into physical RAM addresses.

16. What is paging?

Paging divides memory into fixed-size pages and frames, so a process need not sit in one continuous block. See paging.

17. What is virtual memory?

It lets each process use a large private address space, with inactive pages stored on disk. See virtual memory.

18. What is thrashing?

The system spends more time swapping pages than doing work, usually because RAM is too small for the workload.

19. Internal vs external fragmentation?

Internal fragmentation wastes space inside allocated blocks. External fragmentation leaves free memory split into small gaps.

Storage and files

20. What is a file system?

It organises data on disk into files and directories, tracks free space and enforces permissions. See file system management.

21. What is RAID?

RAID combines several disks for performance or redundancy. RAID 1 mirrors, RAID 5 uses parity and RAID 10 combines mirroring with striping. See disk management.

Keep preparing

Practise each answer out loud, and run the commands in a lab rather than memorising them. Interviewers often ask follow-up questions, so make sure you understand why each answer is true.

Sources

Preparing for an interview? Browse more questions in our interview preparation hub. For businesses, we also offer security services such as VAPT, server hardening and ISO 27001 readiness.

Post author avatar

Bhaskar Soni

Bhaskar Soni is a Security Engineer and the founder of Youngster Company, based in Ahmedabad, Gujarat. He works hands-on with Linux server hardening, vulnerability assessment and penetration testing (VAPT), ISO 27001 compliance and OSINT investigations. He writes practical, tested guides for IT professionals and Indian businesses, and every article on this site is written or reviewed by him.

This Post Has One Comment

Leave a Reply