Operating Systems Quiz
Questions: 16 · 10 minutes
1. A process accesses a valid virtual-memory page that is not currently in physical RAM. What event occurs?
A syntax error causes the program to be recompiled
A context switch permanently deletes the process
A page fault lets the operating system bring the required page into RAM
A boot failure forces the computer to restart
2. An application wants to read data from a file but cannot access the storage hardware directly. How does it normally request the operation?
By making a system call that transfers control to an operating-system service
By issuing a hardware interrupt directly from user mode
By replacing the current file system with a new one
By modifying the bootloader's instructions
3. Which task is primarily performed by a file system?
Selecting which process receives the next CPU time slice
Translating source code into processor instructions
Assigning network addresses to devices on a local network
Organizing named files and directories on a storage device
4. What occurs during a context switch between two processes?
The contents of both processes are merged into one address space
The system saves the current execution state and restores another process's state
The processor converts a process into a file on disk
The bootloader reloads the operating-system kernel
5. Which statement accurately describes virtual memory?
It gives processes managed address spaces that can use RAM and secondary storage
It guarantees that every process always remains entirely in physical RAM
It is processor cache that permanently stores recently used files
It combines multiple physical processors into one logical storage device
6. Which sequence best describes a typical early boot process?
Firmware initializes hardware, starts a bootloader, and the bootloader loads the kernel
A user application initializes the hardware and installs the bootloader into RAM
The kernel loads first, creates firmware, and then powers on the processor
The file system starts every user program before locating the kernel
7. Three runnable processes are waiting while one CPU core is available. Which operating-system component decides which process runs next?
The bootloader
The file system
The scheduler
The device controller
8. On a Unix-like system, a file owner needs read and write access, the group needs read access, and everyone else should have no access. Which numeric permission setting matches that requirement?
644
604
460
640
9. A memory allocator has enough total free space for a request, but the free space is split into small noncontiguous regions. What problem does this illustrate?
External fragmentation between allocated blocks
Internal fragmentation inside a single allocated block
A race condition between processor instructions
A page-protection violation caused by user mode
10. A user-mode application attempts to execute an instruction reserved for the operating-system kernel. What normally happens?
The processor silently treats the instruction as an ordinary calculation
The processor raises an exception or trap so the kernel can handle the violation
The application permanently gains kernel privileges
The instruction is automatically written to the file system for later execution
11. A storage device finishes an asynchronous read and needs the CPU's attention. Which mechanism normally notifies the operating system promptly?
A compiler optimization
A page replacement policy
A directory entry
A hardware interrupt
12. What is the central role of an operating system?
To connect a computer to the internet without additional software or hardware
To translate every high-level program directly into machine code
To manage hardware resources and provide services that applications can use
To store all user files permanently inside the processor
13. Which resources do threads within the same process typically share?
Their CPU registers and current instruction pointers
Their individual call stacks and local stack frames
The process's code, heap data, and open resources
Their unique thread identifiers and scheduling states
14. A user launches the same text-editor program twice, and each window can open a different file independently. How does the operating system typically represent this?
As one process with no separate execution state for either window
As one device driver with two hardware interrupts
As two operating-system kernels running simultaneously
As two process instances, each with its own execution state
15. Several threads update a shared counter, but only one may enter the update section at a time. A semaphore initialized to 1 is placed around that section. What is its main purpose?
To increase the counter whenever the processor is idle
To provide mutual exclusion for the critical section
To give every thread its own separate copy of the counter
To move the shared counter permanently into secondary storage
16. Two threads can deadlock because each acquires one lock and then waits for the other. Which change most directly prevents the circular wait?
Giving both threads longer CPU time slices
Requiring all threads to acquire the locks in a consistent global order
Increasing the amount of virtual memory available
Moving both threads into separate user-interface windows