Operating Systems Senior
1 / 25
Compare Monolithic Kernels and Microkernels. What are the tradeoffs regarding performance, modularity, and system stability?
Select the correct answer
1
Both kernels run all their services in user space, so they differ only in scheduling policy rather than in stability or speed.
2
Monolithic kernels run most services in kernel space for speed, while microkernels isolate services in user space for stability.
3
Monolithic kernels offer better modularity and stability, while microkernels always outperform them due to far fewer context switches.
4
Microkernels run most services in kernel space for speed, while monolithic kernels isolate services in user space for stability.
Press 1-4 to answer, Enter for next
What is the conceptual difference between a Virtual Machine and a Container, focusing on the OS mechanisms like Namespaces and Cgroups that enable containerization?
Select the correct answer
1
Containers and VMs both emulate hardware, differing only in whether cgroups or namespaces are used to manage memory.
2
Containers share the host kernel, using namespaces for isolation and cgroups for resource limits; VMs run full guest OSes.
3
VMs share the host kernel using namespaces and cgroups, while containers each boot their own full guest OS kernel.
4
Containers boot a full guest kernel per instance, while VMs use namespaces and cgroups to share the single host kernel.
Press 1-4 to answer, Enter for next
How do OS-level Namespaces and Cgroups enable the isolation required for containers?
Select the correct answer
1
Cgroups isolate what a process can see, while namespaces limit the resources a process group can consume.
2
Both namespaces and cgroups isolate the filesystem view, but neither one controls CPU or memory usage limits.
3
Namespaces isolate what a process can see, while cgroups limit the resources a process group can consume.
4
Namespaces emulate virtual hardware, while cgroups provide each container with its own separate guest kernel.
Press 1-4 to answer, Enter for next
Explain the difference between a Type-1 and Type-2 hypervisor. How do containers using namespaces/cgroups differ conceptually from Virtual Machines?
Select the correct answer
1
Type-1 and Type-2 both run on a host OS; containers replace the kernel entirely with namespaces and full hardware emulation.
2
Type-1 uses containers and Type-2 uses namespaces; both of these approaches boot a separate guest kernel per application.
3
Type-1 runs on a host OS and Type-2 runs on bare metal; containers virtualize hardware instead of sharing the host kernel.
4
Type-1 runs on bare metal and Type-2 runs on a host OS; containers share the host kernel instead of virtualizing hardware.
Press 1-4 to answer, Enter for next
Compare layered, modular, and hybrid kernel architectures.
Select the correct answer
1
Layered kernels place everything in one block, modular kernels use strict levels, and hybrid kernels run all services as user processes.
2
Layered kernels load drivers on demand, modular kernels run entirely in user space, and hybrid kernels remove all layering for pure speed.
3
Layered kernels stack ordered levels, modular kernels load components at runtime, and hybrid kernels mix monolithic speed with modularity.
4
Layered kernels run as microkernels, modular kernels compile statically, and hybrid kernels isolate every service in a separate address space.
Press 1-4 to answer, Enter for next
What exactly happens during a System Call? Walk through the transition from user space to kernel space.
Select the correct answer
1
A software trap switches the CPU to kernel mode, runs the handler via the syscall table, then returns to user mode.
2
The CPU stays in user mode, jumps directly to the kernel function, and returns without any mode switch or trap.
3
The process is terminated and restarted in kernel mode, where the handler runs before spawning a fresh user process.
4
A hardware interrupt saves registers to disk, loads the kernel, and copies it into the calling process address space.
Press 1-4 to answer, Enter for next
What is Priority Inversion, and how does Priority Inheritance mitigate it?
Select the correct answer
1
A medium-priority task preempts the scheduler queue; inheritance suspends all lower tasks until the medium one fully completes execution
2
Two equal tasks deadlock on a shared lock; inheritance swaps their priorities so one can proceed and release the contested resource
3
A high-priority task starves a low-priority one holding a lock; inheritance permanently lowers the high task's priority to restore balance
4
A low-priority task holding a lock blocks a high-priority one; inheritance temporarily raises the holder's priority to release it sooner
Press 1-4 to answer, Enter for next
Explain the readers-writers problem and the trade-offs between reader-preference and writer-preference solutions.
Select the correct answer
1
Only one reader and one writer may proceed at a time; reader-preference improves throughput while writer-preference eliminates all waiting
2
Many readers may share access but writers need exclusion; reader-preference can starve writers, and writer-preference can starve readers
3
Many writers may share access but readers need exclusion; reader-preference always deadlocks, while writer-preference guarantees fairness
4
Readers and writers must strictly alternate turns; reader-preference reduces latency, while writer-preference removes the need for locks
Press 1-4 to answer, Enter for next
Explain the difference between Deadlock Prevention and Deadlock Avoidance. How does the Banker's Algorithm ensure a Safe State?
Select the correct answer
1
Prevention relies on timeouts to recover; avoidance rolls back threads, and Banker's grants a request strictly in arrival order.
2
Prevention allocates all resources upfront; avoidance kills processes early, and Banker's grants a request only to the oldest process.
3
Prevention breaks a necessary condition; avoidance uses runtime info, and Banker's grants a request only if a safe sequence remains.
4
Prevention detects cycles after they form; avoidance ignores resources, and Banker's grants a request only after preempting a holder.
Press 1-4 to answer, Enter for next
How does the Banker's Algorithm determine if a system is in a Safe State?
Select the correct answer
1
It grants requests only when total demand is below the free physical memory.
2
It checks whether a sequence exists in which every process can finish safely.
3
It denies any request that would leave a single resource type fully allocated.
4
It detects cycles in the resource graph and then rolls a chosen process back.
Press 1-4 to answer, Enter for next
How does deadlock detection and recovery work when the OS allows deadlocks to occur?
Select the correct answer
1
The OS prevents every cycle up front by strictly ordering all resource requests.
2
The OS runs a detection algorithm periodically and recovers by killing or preempting.
3
The OS ignores the condition and reboots whenever the whole system becomes slow.
4
The OS requires each process to declare its maximum needs before it can start.
Press 1-4 to answer, Enter for next
Explain Belady's Anomaly. Why does it occur in FIFO page replacement but not in LRU?
Select the correct answer
1
Adding more frames always decreases page faults; FIFO suffers thrashing only, while LRU avoids it entirely because it evicts the least frequently referenced page.
2
Removing frames can decrease page faults; FIFO tracks load order, but LRU uses reference counts and therefore avoids the paradox by counting every page access.
3
Adding more frames can increase page faults; FIFO evicts by recency, but LRU keeps the oldest pages resident so its resident set always grows with more frames.
4
Adding more frames can increase page faults; FIFO ignores usage, but LRU is a stack algorithm whose resident set for n frames is a subset of that for n+1.
Press 1-4 to answer, Enter for next
Compare the LRU and FIFO page replacement algorithms, and what is Belady's Anomaly?
Select the correct answer
1
LRU evicts the oldest-loaded page and can show Belady's Anomaly, where more frames raise faults; FIFO evicts the least-recently-used page and never exhibits it.
2
FIFO evicts the oldest-loaded page and can show Belady's Anomaly, where more frames raise faults; LRU evicts the least-recently-used page and never exhibits it.
3
Both FIFO and LRU evict the least-recently-used page; Belady's Anomaly is the case where adding more frames unexpectedly reduces the number of page faults.
4
FIFO evicts the most-recently-used page and LRU the oldest; Belady's Anomaly is when both algorithms fault on the same reference string regardless of frame count.
Press 1-4 to answer, Enter for next
What is a Page Table, and why do modern systems use Multi-level Page Tables instead of a single flat table?
Select the correct answer
1
It maps physical frames to virtual pages; multi-level tables exist chiefly to store extra permission bits that a flat table has no room to represent at all.
2
It maps virtual pages to physical frames; multi-level tables are used purely to make address translation faster by reducing the number of memory lookups.
3
It maps virtual pages to physical frames; multi-level tables allocate only the portions actually used, avoiding one huge contiguous table for the whole space.
4
It maps disk blocks to physical frames; multi-level tables are needed so several processes can safely share a single global table without any locking overhead.
Press 1-4 to answer, Enter for next
Explain the Working Set Model. How is the working set window used to estimate the degree of multiprogramming?
Select the correct answer
1
The working set is the pages loaded at startup; the window sets how many frames each process is given.
2
The working set is the pages a process will reference next; its window fixes the overall page-fault rate.
3
The working set is the pages modified since load; the window limits the number of dirty pages retained.
4
The working set is the pages referenced in a recent window; summing their sizes estimates total memory demand.
Press 1-4 to answer, Enter for next
What is an inverted page table, and what problem does it solve compared to a per-process page table?
Select the correct answer
1
A two-level table that caches recent translations so the TLB miss penalty is greatly reduced overall.
2
A single table with one entry per virtual page, shared by all processes to speed address translation.
3
A single table with one entry per physical frame, shared by all processes to cut table memory use.
4
A per-process table indexed by frame number that stores each page's disk location for faster swapping.
Press 1-4 to answer, Enter for next
How do you compute the Effective Access Time in a paged system with a TLB?
Select the correct answer
1
EAT = h×mem + (1−h)×(TLB + 2×mem), where h is the TLB hit ratio.2
EAT = h×TLB + (1−h)×(TLB + 2×mem), where h is the TLB hit ratio.3
EAT = h×(TLB + 2×mem) + (1−h)×(TLB + mem), where h is the TLB hit ratio.4
EAT = h×(TLB + mem) + (1−h)×(TLB + 2×mem), where h is the TLB hit ratio.Press 1-4 to answer, Enter for next
How do LFU and MFU page-replacement algorithms work, and what are their drawbacks?
Select the correct answer
1
LFU replaces the page with the smallest use count; MFU replaces the one with the highest count.
2
LFU replaces the page unused for longest; MFU replaces the page most recently accessed here.
3
LFU replaces the largest resident page; MFU replaces the smallest resident page in memory.
4
LFU replaces the oldest resident page; MFU replaces the most recently loaded page in memory.
Press 1-4 to answer, Enter for next
What is the Page-Fault Frequency (PFF) scheme for controlling thrashing?
Select the correct answer
1
It measures each process's fault rate and swaps out the one showing the lowest rate observed.
2
It counts total faults per second and halts new process creation once a threshold is crossed.
3
It fixes a constant number of frames per process and blocks any process exceeding its rate.
4
It sets upper and lower fault-rate bounds, adding frames when high and removing them when low.
Press 1-4 to answer, Enter for next
How does the OS decide how many frames to allocate to each process (global vs local allocation)?
Select the correct answer
1
Global lets a process take frames from any process; local restricts it to its own frame set.
2
Global fixes frames at process creation; local adjusts them dynamically based on fault rates.
3
Global divides frames equally among all processes; local gives frames based on process priority.
4
Global assigns frames by process size; local assigns them by each process's arrival order.
Press 1-4 to answer, Enter for next
What is the purpose of Journaling in a file system, and how does it help with recovery after a system crash?
Select the correct answer
1
It periodically snapshots the whole disk, so the file system can roll back to the last saved image.
2
It logs pending changes before committing them, so the log can be replayed to restore consistency.
3
It caches all writes in memory until shutdown, so pending changes are flushed only when it is safe.
4
It mirrors every disk block to a backup device, so lost data can be copied back after a crash.
Press 1-4 to answer, Enter for next
Compare contiguous, linked, and indexed file allocation methods. Which one is most efficient for random access?
Select the correct answer
1
All three offer identical random-access speed; only their disk fragmentation behavior differs strongly overall.
2
Linked gives the fastest random access; contiguous suits sequential only; indexed wastes the most disk space.
3
Indexed gives the worst random access; contiguous needs no index; linked avoids all fragmentation issues here.
4
Contiguous gives the fastest random access; linked suits sequential only; indexed allows it with overhead.
Press 1-4 to answer, Enter for next
Explain the concept of a Virtual File System (VFS) layer.
Select the correct answer
1
A cache holding recently accessed disk blocks to speed up all file read operations
2
A partition table describing where each mounted file system resides on the disk
3
A tool that converts one on-disk file system format into another compatible format
4
An abstraction layer providing a uniform interface to many different file system types
Press 1-4 to answer, Enter for next
What is a Real-Time Operating System (RTOS), and how does its scheduler differ from a standard OS?
Select the correct answer
1
An RTOS prioritizes predictable response; its scheduler is preemptive and priority-driven to guarantee deadlines
2
An RTOS prioritizes maximum throughput; its scheduler dynamically ages processes to boost long-waiting background jobs
3
An RTOS prioritizes user interactivity; its scheduler uses round-robin time slices to share the CPU evenly across all
4
An RTOS prioritizes energy savings; its scheduler batches tasks together and defers them to reduce total context switches
Press 1-4 to answer, Enter for next
Explain the Access Matrix model of protection. How do ACLs and Capability Lists represent different views of this matrix?
Select the correct answer
1
Rows are objects and columns are domains; ACLs store each row, while capability lists store each column of the matrix
2
Rows are processes and columns are threads; ACLs store the whole matrix, while capability lists store a hashed summary
3
Rows are domains and columns are objects; ACLs store each column, while capability lists store each row of the matrix
4
Rows are users and columns are files; ACLs store the diagonal entries, while capability lists store off-diagonal entries
Press 1-4 to answer, Enter for next