Operating Systems

0%
Theory
Quiz

    Os Fundamentals & Architecture

    • Explain the difference between Kernel Mode and User Mode. Why is this dual-mode operation necessary for system security?

      Junior
    • What is the primary purpose of an Operating System, and what are its core functions?

      Junior
    • What are privileged instructions, and why can they only run in kernel mode?

      Junior
    • What are the different types of operating systems (batch, time-sharing, real-time, distributed, embedded)?

      Junior
    • What is multiprogramming, and how does it improve CPU utilization?

      Junior
    • Explain the difference between Type 1 (Bare Metal) and Type 2 (Hosted) Hypervisors.

      Mid
    • Explain the Bootstrapping process. What is the role of the BIOS/UEFI and the bootloader in handing control to the OS?

      Mid
    • What is the difference between symmetric multiprocessing (SMP) and asymmetric multiprocessing?

      Mid
    • What is the difference between protection and security in an operating system?

      Mid
    • Compare Monolithic Kernels and Microkernels. What are the tradeoffs regarding performance, modularity, and system stability?

      Senior
    • What is the conceptual difference between a Virtual Machine and a Container, focusing on the OS mechanisms like Namespaces and Cgroups that enable containerization?

      Senior
    • How do OS-level Namespaces and Cgroups enable the isolation required for containers?

      Senior
    • Explain the difference between a Type-1 and Type-2 hypervisor. How do containers using namespaces/cgroups differ conceptually from Virtual Machines?

      Senior
    • Compare layered, modular, and hybrid kernel architectures.

      Senior

    Processes & Threads

    • Describe the Process State Transition Diagram. What triggers a process to move from Running to Waiting vs. Ready?

      Junior
    • Explain the fundamental differences between a process and a thread. How do they differ in terms of memory sharing and overhead?

      Junior
    • What is a Process Control Block (PCB), and what specific information does the OS store in it to manage a process?

      Junior
    • What resources are shared between threads of the same process, and what are kept private?

      Junior
    • Explain the difference between a Program, a Process, and a Thread.

      Junior
    • What are the benefits and costs of multithreading an application?

      Junior
    • What is a zombie process, and how does it differ from an orphan process? Why is it important for a parent to 'wait' on its child?

      Mid
    • Explain the 'copy-on-write' mechanism used during a fork() system call. Why is it efficient?

      Mid
    • What is the difference between a user-level thread and a kernel-level thread, and what are the tradeoffs of each model?

      Mid
    • Explain the fork() and exec() model of process creation. What happens to the address space during a fork()?

      Mid
    • Why is context switching between threads generally faster than between processes?

      Mid
    • When would you choose a multithreaded architecture over a multiprocess one for a single-machine application?

      Mid
    • What is a Thread Control Block (TCB), and how does it differ from a PCB?

      Mid
    • How do the many-to-one, one-to-one, and many-to-many multithreading models differ?

      Mid

    System Calls Interrupts & Kernel Interaction

    • What is a system call, and how does it differ from a standard library function call?

      Junior
    • What is the difference between an Interrupt and a Trap (or Exception)? Give an example of when each would occur.

      Mid
    • What is the role of the Interrupt Vector Table in handling hardware signals?

      Mid
    • Explain the difference between Polling, Interrupt-driven I/O, and Direct Memory Access (DMA).

      Mid
    • What exactly happens during a System Call? Walk through the transition from user space to kernel space.

      Senior

    Cpu Scheduling

    • Explain the difference between preemptive and non-preemptive scheduling. When would you prefer one over the other?

      Junior
    • What is the difference between Throughput, Turnaround Time, and Response Time?

      Junior
    • How does a round robin scheduler handle a process that requires more time than the allocated time quantum?

      Junior
    • How does priority scheduling work, and how are priorities assigned to processes?

      Junior
    • What is a Context Switch? Describe the steps the OS takes during a switch and explain why it is considered overhead.

      Mid
    • What is Starvation in the context of priority scheduling, and how does Aging solve it?

      Mid
    • What is the convoy effect in FCFS scheduling, and how do algorithms like Round Robin mitigate it?

      Mid
    • How does a Multi-level Feedback Queue work to balance the needs of I/O-bound and CPU-bound processes?

      Mid
    • What are the primary goals of a CPU scheduler? Explain the tradeoffs between throughput, turnaround time, and response time.

      Mid
    • How does the Round Robin algorithm work, and how does the choice of time quantum size affect response time vs. throughput?

      Mid
    • Explain the difference between a short-term, medium-term, and long-term scheduler.

      Mid
    • Compare and contrast Round Robin and Shortest Job First scheduling. In what scenario would Round Robin be preferred?

      Mid
    • What is swapping, and how does the medium-term scheduler use it to manage memory?

      Mid
    • What is the role of the Dispatcher, and what is meant by dispatch latency?

      Mid
    • Explain the difference between Shortest Job First (SJF) and Shortest Remaining Time First (SRTF) scheduling.

      Mid
    • How does Multilevel Queue scheduling work, and how does it differ from Multilevel Feedback Queue?

      Mid

    Process Synchronization

    • What is a Race Condition? Provide a conceptual example of how it can lead to data inconsistency.

      Junior
    • What is the conceptual difference between a mutex and a semaphore? When would you use a counting semaphore instead of a binary one?

      Mid
    • Explain the critical section problem and the three requirements for a valid solution.

      Mid
    • What is the difference between a spinlock and a blocking lock? When would you prefer one over the other?

      Mid
    • Describe the Producer-Consumer (Bounded Buffer) problem and how semaphores are used to solve it.

      Mid
    • How do the wait() and signal() operations of a semaphore work internally, and why must they be atomic?

      Mid
    • What is a monitor, and how do condition variables with wait() and signal() differ from semaphores?

      Mid
    • Explain Peterson's solution to the critical-section problem. What assumptions does it rely on?

      Mid
    • How do hardware instructions like Test-and-Set and Compare-and-Swap help implement synchronization primitives?

      Mid
    • Describe the Dining Philosophers problem. What solutions prevent deadlock in it?

      Mid
    • What is Priority Inversion, and how does Priority Inheritance mitigate it?

      Senior
    • Explain the readers-writers problem and the trade-offs between reader-preference and writer-preference solutions.

      Senior

    Deadlocks

    • What are the four Coffman Conditions necessary for a deadlock to occur?

      Junior
    • Compare Deadlock, Livelock, and Starvation.

      Mid
    • What is a Resource Allocation Graph, and how can it be used to detect a deadlock?

      Mid
    • What is the Ostrich approach to handling deadlocks, and why do general-purpose OSs often use it?

      Mid
    • Explain the difference between Deadlock Prevention and Deadlock Avoidance. How does the Banker's Algorithm ensure a Safe State?

      Senior
    • How does the Banker's Algorithm determine if a system is in a Safe State?

      Senior
    • How does deadlock detection and recovery work when the OS allows deadlocks to occur?

      Senior

    Memory Management & Virtual Memory

    • What is Virtual Memory, and how does it allow a program to run even if it is larger than the available physical RAM?

      Junior
    • What is Virtual Memory, and what are the primary benefits it provides to a programmer?

      Junior
    • What is the Translation Lookaside Buffer (TLB), and how does it speed up address translation?

      Mid
    • What is 'thrashing' in an OS? What are the primary causes, and how can the OS detect or prevent it?

      Mid
    • Explain the difference between Internal and External Fragmentation. Which occurs in Paging and which in Contiguous Allocation?

      Mid
    • Compare paging and segmentation. What are the advantages of a segmented paging approach?

      Mid
    • What is a Page Fault? Walk through the steps the OS takes to resolve one.

      Mid
    • Explain the difference between Logical (Virtual) and Physical addresses. What is the role of the MMU?

      Mid
    • What is Paging, and how does it solve the problem of External Fragmentation?

      Mid
    • Compare the FIFO, LRU, and Optimal page-replacement algorithms. Why is Optimal impossible to implement in practice?

      Mid
    • What is the difference between compile-time, load-time, and execution-time address binding?

      Mid
    • What is memory compaction, and what problem does it solve in contiguous allocation?

      Mid
    • What are memory-mapped files, and what advantages do they offer over regular read/write I/O?

      Mid
    • How does the Clock (Second-Chance) page-replacement algorithm approximate LRU?

      Mid
    • Explain Belady's Anomaly. Why does it occur in FIFO page replacement but not in LRU?

      Senior
    • Compare the LRU and FIFO page replacement algorithms, and what is Belady's Anomaly?

      Senior
    • What is a Page Table, and why do modern systems use Multi-level Page Tables instead of a single flat table?

      Senior
    • Explain the Working Set Model. How is the working set window used to estimate the degree of multiprogramming?

      Senior
    • What is an inverted page table, and what problem does it solve compared to a per-process page table?

      Senior
    • How do you compute the Effective Access Time in a paged system with a TLB?

      Senior
    • How do LFU and MFU page-replacement algorithms work, and what are their drawbacks?

      Senior
    • What is the Page-Fault Frequency (PFF) scheme for controlling thrashing?

      Senior
    • How does the OS decide how many frames to allocate to each process (global vs local allocation)?

      Senior

    File Systems

    • Compare the different directory structures (single-level, two-level, tree, acyclic-graph).

      Junior
    • What are the different file access methods (sequential, direct, indexed)?

      Junior
    • What is an 'inode' in a Unix-like file system? What kind of information does it store and what does it not store?

      Mid
    • Explain the difference between a hard link and a symbolic (soft) link. What happens to the file if the original link is deleted in each case?

      Mid
    • What is a File Descriptor, and how does the OS use the Open-File Table to manage file access across processes?

      Mid
    • How does free-space management work using a bit vector versus a linked list?

      Mid
    • What is the FAT (File Allocation Table), and how does it track file blocks?

      Mid
    • What does it mean to mount a file system, and what does the OS do during mounting?

      Mid
    • What is the purpose of Journaling in a file system, and how does it help with recovery after a system crash?

      Senior
    • Compare contiguous, linked, and indexed file allocation methods. Which one is most efficient for random access?

      Senior
    • Explain the concept of a Virtual File System (VFS) layer.

      Senior

    Inter Process Communication

    • What is a Pipe, and what is the difference between a Named and Unnamed pipe?

      Junior
    • Explain how pipes work for communication between a parent and child process.

      Junior
    • What are the primary mechanisms for Inter-Process Communication? Compare Shared Memory vs. Message Passing in terms of speed and ease of implementation.

      Mid
    • What are signals in a Unix-like OS, and how are they used for inter-process communication?

      Mid
    • How do sockets function as an IPC mechanism at the OS level?

      Mid

    I O Systems

    • What is a device driver, and what role does it play in the OS I/O subsystem?

      Junior
    • Explain the difference between Polling and Interrupt-driven I/O. In what scenario would Polling actually be more efficient?

      Mid
    • What is DMA, and why is it critical for high-speed data transfer between devices and memory?

      Mid
    • Explain the difference between blocking, non-blocking, and asynchronous I/O.

      Mid
    • Compare Buffering and Spooling. Give a real-world example of each.

      Mid
    • What is the role of buffering and caching in the I/O subsystem?

      Mid

    Storage & Disk Management

    • Explain Disk Scheduling algorithms like SCAN and C-LOOK. How do they reduce seek time compared to FCFS?

      Mid
    • What are RAID levels, and how do RAID 0, 1, and 5 differ in terms of performance and redundancy?

      Mid
    • What are the key differences between an SSD and an HDD from the OS's storage-management perspective?

      Mid
    • How does the SSTF disk-scheduling algorithm work, and what problem (starvation) can it cause?

      Mid
    • What is the difference between SCAN, C-SCAN, LOOK, and C-LOOK disk-scheduling algorithms?

      Mid
    • What is the OS page cache (buffer cache), and how does it improve file I/O performance?

      Mid

    Protection & Real Time Systems

    • What is the principle of least privilege, and how does the OS enforce it using Access Control Lists or capabilities?

      Mid
    • What defines a 'Real-Time Operating System' (RTOS)? What is the difference between 'hard' and 'soft' real-time constraints?

      Mid
    • What is a Real-Time Operating System (RTOS), and how does its scheduler differ from a standard OS?

      Senior
    • Explain the Access Matrix model of protection. How do ACLs and Capability Lists represent different views of this matrix?

      Senior