Operating Systems Mid
Explain the difference between Type 1 (Bare Metal) and Type 2 (Hosted) Hypervisors.
Select the correct answer
Explain the Bootstrapping process. What is the role of the BIOS/UEFI and the bootloader in handing control to the OS?
Select the correct answer
What is the difference between symmetric multiprocessing (SMP) and asymmetric multiprocessing?
Select the correct answer
What is the difference between protection and security in an operating system?
Select the correct answer
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?
Select the correct answer
wait.init adopts it.init adopts it; an orphan has exited but still holds an uncollected exit status.Explain the 'copy-on-write' mechanism used during a fork() system call. Why is it efficient?
Select the correct answer
fork the child immediately receives a full private copy of every page, which is shared back if never written.fork all pages are copied lazily to disk and returned to memory only when either process reads them.fork the child shares writable pages directly, so changes by one process stay visible to the other until exit.fork the parent and child share pages read-only; a page is duplicated only when one process writes it.What is the difference between a user-level thread and a kernel-level thread, and what are the tradeoffs of each model?
Select the correct answer
Explain the fork() and exec() model of process creation. What happens to the address space during a fork()?
Select the correct answer
fork() allocates a fresh empty address space; exec() copies the parent's memory into that new child spacefork() shares one address space between parent and child; exec() spawns a brand-new independent processfork() immediately loads a new program image; exec() merely creates an empty child with no address spacefork() duplicates the parent's address space (copy-on-write); exec() replaces it with a new program imageWhy is context switching between threads generally faster than between processes?
Select the correct answer
When would you choose a multithreaded architecture over a multiprocess one for a single-machine application?
Select the correct answer
What is a Thread Control Block (TCB), and how does it differ from a PCB?
Select the correct answer
How do the many-to-one, one-to-one, and many-to-many multithreading models differ?
Select the correct answer
What is the difference between an Interrupt and a Trap (or Exception)? Give an example of when each would occur.
Select the correct answer
What is the role of the Interrupt Vector Table in handling hardware signals?
Select the correct answer
Explain the difference between Polling, Interrupt-driven I/O, and Direct Memory Access (DMA).
Select the correct answer
What is a Context Switch? Describe the steps the OS takes during a switch and explain why it is considered overhead.
Select the correct answer
What is Starvation in the context of priority scheduling, and how does Aging solve it?
Select the correct answer
What is the convoy effect in FCFS scheduling, and how do algorithms like Round Robin mitigate it?
Select the correct answer
How does a Multi-level Feedback Queue work to balance the needs of I/O-bound and CPU-bound processes?
Select the correct answer
What are the primary goals of a CPU scheduler? Explain the tradeoffs between throughput, turnaround time, and response time.
Select the correct answer
How does the Round Robin algorithm work, and how does the choice of time quantum size affect response time vs. throughput?
Select the correct answer
Explain the difference between a short-term, medium-term, and long-term scheduler.
Select the correct answer
Compare and contrast Round Robin and Shortest Job First scheduling. In what scenario would Round Robin be preferred?
Select the correct answer
What is swapping, and how does the medium-term scheduler use it to manage memory?
Select the correct answer
What is the role of the Dispatcher, and what is meant by dispatch latency?
Select the correct answer
Explain the difference between Shortest Job First (SJF) and Shortest Remaining Time First (SRTF) scheduling.
Select the correct answer
How does Multilevel Queue scheduling work, and how does it differ from Multilevel Feedback Queue?
Select the correct answer
What is the conceptual difference between a mutex and a semaphore? When would you use a counting semaphore instead of a binary one?
Select the correct answer
Explain the critical section problem and the three requirements for a valid solution.
Select the correct answer
What is the difference between a spinlock and a blocking lock? When would you prefer one over the other?
Select the correct answer
Describe the Producer-Consumer (Bounded Buffer) problem and how semaphores are used to solve it.
Select the correct answer
How do the wait() and signal() operations of a semaphore work internally, and why must they be atomic?
Select the correct answer
wait() decrements the count and signal() increments it; they must be atomic so concurrent updates never corrupt the value.wait() increments the count and signal() decrements it; atomicity ensures a process always blocks before it enters.wait() blocks all threads and signal() wakes them; atomicity is only needed on single-core uniprocessor systems.wait() and signal() both increment the count; atomicity guarantees fairness among all the waiting processes.What is a monitor, and how do condition variables with wait() and signal() differ from semaphores?
Select the correct answer
signal() has no memory, unlike a counting semaphore.wait() and signal() behave identically to semaphore operations.wait() never blocks, unlike a counting semaphore's operation.signal() always increments a stored counter, exactly like a semaphore.Explain Peterson's solution to the critical-section problem. What assumptions does it rely on?
Select the correct answer
Test-and-Set instruction is always available.flag[] and turn for many processes; it assumes a priority scheduler that never preempts a running process.flag[] and turn for two processes; it assumes atomic reads/writes and no reordering of instructions.turn alone for two processes; it assumes disabling of interrupts around each entry to the critical section.How do hardware instructions like Test-and-Set and Compare-and-Swap help implement synchronization primitives?
Select the correct answer
Describe the Dining Philosophers problem. What solutions prevent deadlock in it?
Select the correct answer
Compare Deadlock, Livelock, and Starvation.
Select the correct answer
What is a Resource Allocation Graph, and how can it be used to detect a deadlock?
Select the correct answer
What is the Ostrich approach to handling deadlocks, and why do general-purpose OSs often use it?
Select the correct answer
What is the Translation Lookaside Buffer (TLB), and how does it speed up address translation?
Select the correct answer
What is 'thrashing' in an OS? What are the primary causes, and how can the OS detect or prevent it?
Select the correct answer
Explain the difference between Internal and External Fragmentation. Which occurs in Paging and which in Contiguous Allocation?
Select the correct answer
Compare paging and segmentation. What are the advantages of a segmented paging approach?
Select the correct answer
What is a Page Fault? Walk through the steps the OS takes to resolve one.
Select the correct answer
Explain the difference between Logical (Virtual) and Physical addresses. What is the role of the MMU?
Select the correct answer
What is Paging, and how does it solve the problem of External Fragmentation?
Select the correct answer
Compare the FIFO, LRU, and Optimal page-replacement algorithms. Why is Optimal impossible to implement in practice?
Select the correct answer
What is the difference between compile-time, load-time, and execution-time address binding?
Select the correct answer
What is memory compaction, and what problem does it solve in contiguous allocation?
Select the correct answer
What are memory-mapped files, and what advantages do they offer over regular read/write I/O?
Select the correct answer
How does the Clock (Second-Chance) page-replacement algorithm approximate LRU?
Select the correct answer
What is an 'inode' in a Unix-like file system? What kind of information does it store and what does it not store?
Select the correct answer
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?
Select the correct answer
What is a File Descriptor, and how does the OS use the Open-File Table to manage file access across processes?
Select the correct answer
How does free-space management work using a bit vector versus a linked list?
Select the correct answer
What is the FAT (File Allocation Table), and how does it track file blocks?
Select the correct answer
What does it mean to mount a file system, and what does the OS do during mounting?
Select the correct answer
What are the primary mechanisms for Inter-Process Communication? Compare Shared Memory vs. Message Passing in terms of speed and ease of implementation.
Select the correct answer
What are signals in a Unix-like OS, and how are they used for inter-process communication?
Select the correct answer
How do sockets function as an IPC mechanism at the OS level?
Select the correct answer
Explain the difference between Polling and Interrupt-driven I/O. In what scenario would Polling actually be more efficient?
Select the correct answer
What is DMA, and why is it critical for high-speed data transfer between devices and memory?
Select the correct answer
Explain the difference between blocking, non-blocking, and asynchronous I/O.
Select the correct answer
Compare Buffering and Spooling. Give a real-world example of each.
Select the correct answer
What is the role of buffering and caching in the I/O subsystem?
Select the correct answer
What are RAID levels, and how do RAID 0, 1, and 5 differ in terms of performance and redundancy?
Select the correct answer
What are the key differences between an SSD and an HDD from the OS's storage-management perspective?
Select the correct answer
TRIM, so head-movement scheduling matters far less.How does the SSTF disk-scheduling algorithm work, and what problem (starvation) can it cause?
Select the correct answer
What is the difference between SCAN, C-SCAN, LOOK, and C-LOOK disk-scheduling algorithms?
Select the correct answer
What is the OS page cache (buffer cache), and how does it improve file I/O performance?
Select the correct answer
What is the principle of least privilege, and how does the OS enforce it using Access Control Lists or capabilities?
Select the correct answer
What defines a 'Real-Time Operating System' (RTOS)? What is the difference between 'hard' and 'soft' real-time constraints?
Select the correct answer