Operating System Topics For Interviews
Operating system is a very important topic to learn if you want to make a career in the IT industry. You will find operating system questions being asked in many of the technical roles like SDE, SRE, DevOps, Cloud engineer, System admin, Support engineer etc. The level of questions being asked will vary depending on the requirements of the company. SDE interviews may focus on understanding the basics of operating system concepts whereas SRE/DevOps/Cloud/System engineering roles may test in depth understanding of Linux operating systems.
Below is a list of topics that are important inoperative system. I have also provided references at the end which can help you in preparing for the operating system interview.
What is an operating system
Functions of operating system
Difference between operating system and kernel
Examples of operating system
Important distributions in Linux
System calls in Linux with examples
User mode vs kernel mode. How to switch from one to another ?
Process creation and lifecycle
Difference between a program and a process
Process control block(PCB)
Process creation using fork system call
How to differentiate between parent and child process after calling fork system call ?
Running a new program in child process using exec family of system call
Understand how lifecycle of a process is managed through fork, exec, wait and exit system calls
What is the init process ?
Zombie and orphan process
How will you list all the running processes on Linux ?
Difference between CPU bound and IO bound processes
What is a context switch ?
Difference between preemptive and non preemptive scheduling
Understand how different types of scheduling work and what are their advantages and disadvantages.
SJF and SRTF
Round robin scheduling
Multilevel queue scheduling
Difference between process and thread
Multiprocessing vs multithreading - advantage and disadvantage of using one over another
Real life examples of multiprocessing and multithreading - web servers, text editors, web browsers etc
Kernel threads vs user threads
What is race condition? Explain with example
What issues can arise if two people try to withdraw money from the same bank account at the same time ?
Critical section problem
Peterson solution, Test and set solution, swap instruction solution
Mutex vs spinlock vs semaphore
Reader writer problem and solution
Producer consumer problem and solution
Different types of memory - registers, RAM, ROM, disks etc
Logical memory vs physical memory. Which address(logical or physical) is returned by malloc command ?
Primary memory vs secondary memory
Can we run a 4GB game in a laptop having 2GB of RAM ?
What is virtual memory ? What is demand paging ?
How is virtual memory implemented ? (pages, frames, page table)
What is TLB ?
What is segmentation ?
Page replacement techniques - LRU, FIFO
What is thrashing ? Explain Belady’s anomaly
Commands used in Linux for memory allocation - malloc vs mmap vs brk
Commands used in Linux to check main memory usage - free, top, htop, vmstat
File system management
What is a file system ? Examples
Difference between block devices and RAM
Types of files in Linux(file, directory, links, socket, pipes, special files)
Common system calls in file handling - read, write, open, close
What is a file descriptor ?
What is a virtual file system ? Advantages ?
What is an inode ? Important attributes of a file
Soft link vs hard link
How does file path resolution happen in Linux ? (superblocks, dentry, inode, file descriptor)
Important file system commands in Linux - df, du, ls, mkdir, find
Software interrupts vs hardware interrupts
Signals in Linux
Interprocess communication in Linux - sockets, pipes
32 bit vs 64 bit processors
How can you change the priority of a process in Linux? (nice command)
What happens after you run ls command on your shell ? (fork + exec)
What is the segmentation fault ?
Operating system tutorial videos by letsudevops - These videos will help you in understanding OS concepts in depth.
Blogs on operating system topics by Geeksforgeeks - One should be able to find blogs related to most of the topics mentioned above
List of popular OS interview questions by Interviewbit - https://www.interviewbit.com/operating-system-interview-questions/
Linux kernel development book By Robert Love in case you want to deep dive into working of Linux Kernel.