Menu

Earn Premium with Referrals

Invite your friends and earn Premium rewards through our referral program.

See how it works and start inviting friends.

Scenario - Part 1
OS

Scenario - Part 1

Solve scenario-based Operating Systems problems involving deadlocks, thrashing, resource allocation, and system behavior.

In a multi-process system, Process P1 currently holds Printer A while waiting to acquire Scanner B. Simultaneously, Process P2 holds Scanner B while waiting to acquire Printer A. Neither process can proceed, and both remain frozen indefinitely. What phenomenon is occurring here, and what strategies can the operating system use to prevent, avoid, or recover from it?

A video editing software needs to simultaneously play back a live timeline preview, render background visual effects, and auto-save the project file without lagging. Should the developer use multiple separate processes or multiple threads within a single process for these tasks, and why?

Three compute jobs arrive at the processor queue at the exact same moment: P1 requires 10 ms of CPU time, P2 requires 2 ms, and P3 requires 5 ms. Which CPU scheduling strategy (First-Come First-Served, Shortest Job First, or Round Robin) will achieve the absolute lowest average waiting time, and how do the others compare?

An application is being compiled with distinct code instructions, runtime global variables, and a growing execution stack, all of which require completely different security access permissions (e.g., read-only vs. read-write). Which memory management scheme—paging or segmentation—is best suited for this structure, and why?

A modern game requires 8 GB of active memory space to load its assets, but the computer running it only has 4 GB of physical RAM installed. How is the operating system able to successfully execute this game despite the physical hardware limitation?

A computer suddenly slows down to a crawl. The hard drive activity light stays completely solid, and overall CPU utilization drops down to near zero. What state is the system experiencing, what is happening under the hood, and how can it be resolved?

A running application requests a lock on a system hardware resource. Before granting access, the operating system pauses to calculate whether enough total resources will remain for all other active processes to safely finish their work. What is this algorithmic mechanism called, and how does it decide whether to approve or postpone the request?

Two parallel application threads attempt to update the exact same bank account balance variable at the exact same millisecond. Without intervention, one thread reads the old balance before the other finishes updating it, causing a deposit or withdrawal to be lost. What is this phenomenon called, and how must the code be protected?

A corporate network needs to manage concurrent access to a pool of 5 identical shared printers, while separately ensuring that a single system configuration file can only be edited by one administrator thread at a time. What synchronization primitives should be used for each task and why?

An actively running process suddenly has to wait for a slow disk read/write operation. The operating system instantly suspends it to let another ready process start utilizing the CPU. What is this transition called, what data structure is involved, and what is its primary drawback?

While a user is watching a full-screen video, they press a key on their keyboard to pause playback. How does the hardware signal the CPU to pause its current execution loop, and what specialized code handles the keypress before returning to the video?

System RAM is completely full, and an application triggers a page fault demanding a new virtual memory page from disk. The operating system must choose an old page to evict. What are the three primary page replacement algorithms used to make this decision?

A system has 50 MB of total free space scattered across memory in tiny 5 MB gaps, causing the OS to reject a new process demanding a single 20 MB block. Separately, a process is given a fixed 32 KB page but only uses 20 KB of it, wasting the remaining 12 KB. What are these two memory waste phenomena called?

A modern web server splits its architecture so that one frontend process handles incoming user connections while a separate background process writes system logs to disk. Because these processes inhabit isolated memory spaces, what general category of mechanisms must they use to pass data, and what are the common options?

An embedded vehicle safety system must detect a physical crash and deploy cabin airbags within a strict window of just a few milliseconds. Why can a general-purpose operating system like standard Linux not be trusted here, and what type of operating system is strictly required?

My Private Notes

Notes are auto-saved locally to this device.