📝 Operating System Structure (30 MCQs)
Kernel Organisation and Operating System Components
Operating system structure describes how kernel services and system components are organised and communicate. Major responsibilities include process scheduling, memory management, file systems, device management, and system-call handling. Their arrangement determines which components execute in privileged mode, how requests cross subsystem boundaries, and how failures or modifications affect the rest of the system. Common designs include monolithic, layered, microkernel, modular, and hybrid structures.
Design Trade-offs Behind Different Kernel Structures
A kernel must provide efficient service while remaining manageable, secure, and adaptable. Combining every service in one privileged component can reduce communication overhead but increases complexity and failure impact. Strict layering improves organisation but may impose communication costs. Microkernels move many services outside the privileged kernel, improving isolation at the cost of additional message exchanges and context transitions.
Monolithic, Layered, Modular, and Microkernel Operation
A monolithic kernel executes many core services within one privileged address space. A layered design arranges services into levels with defined dependencies. A microkernel keeps a smaller privileged core and communicates with user-space servers through message passing. Loadable kernel modules add or remove supported functionality dynamically, while hybrid designs combine characteristics from several approaches.
Tracing a System Call Through Different Structures
Consider an application requesting file data through read(). In a monolithic kernel, the system-call handler can invoke file-system and device services within kernel space. In a microkernel design, the request may involve communication with a user-space file server and storage service. The additional exchanges improve separation but can increase execution overhead.
Kernel Structure Effects on Reliability and Performance
Monolithic structures can deliver efficient internal service communication but place substantial code within a privileged failure domain. Microkernel designs can isolate many services, improving fault containment, although message passing introduces overhead. Modules provide extensibility without requiring a completely separate architecture. Practical operating systems frequently use hybrid arrangements, so textbook categories should be treated as architectural models rather than absolute classifications.
Misunderstandings About Kernel Design Approaches
'Every operating system uses a pure monolithic kernel' is incorrect because many systems combine architectural approaches. 'A microkernel contains no device drivers' is incorrect because some designs retain selected drivers in the kernel while others place them in user space. 'Layered architecture always improves speed' is incorrect because additional boundaries can introduce overhead.
Exam Focus: Comparing Kernel Structures and Communication
Compare monolithic, layered, microkernel, modular, and hybrid structures using their service placement, communication methods, performance, and fault isolation. Be ready to trace a system call and identify whether services execute in kernel or user space. Questions may test advantages, disadvantages, module loading, message passing, and the consequences of a kernel component failure.
Key Terms of Operating System Structure
- Monolithic kernel - Large privileged service implementation.
- Microkernel - Minimal privileged kernel architecture.
- Layered structure - Services organised into levels.
- Module - Dynamically loadable kernel component.
- Message passing - Communication through exchanged messages.
- Hybrid kernel - Combination of structural approaches.
📝 All Operating System Structure MCQs
Q1. A developer examines a system in which process management, memory management, file systems, and device drivers execute inside one large privileged kernel. Which organization is being used?
📖 Explanation: These services share one privileged kernel address space and communicate through internal calls, which characterizes a monolithic design. The tempting microkernel option is wrong because it moves many services into separate user-space servers.
Q2. A small operating system keeps most services inside the kernel and uses direct procedure calls between components. What is a common advantage of this design?
📖 Explanation: Direct calls between components avoid the extra message-passing steps often needed by separated servers. The tempting isolation option is wrong because a fault in privileged monolithic code can affect the entire kernel.
Q3. An operating system is divided into layers, and each layer uses services supplied by the layer immediately beneath it. What is the main structural principle?
📖 Explanation: Layering organizes the system through ordered abstractions, with each layer using lower-level services and serving higher-level ones. The tempting all-to-all dependency defeats this organization and makes components harder to isolate and reason about.
Q4. A system keeps only scheduling, basic memory management, and interprocess communication inside its kernel. File and device services run as separate user processes. Which design does this describe?
📖 Explanation: A microkernel retains a small set of essential mechanisms in privileged mode and moves many operating-system services into user-space servers. The tempting monolithic option keeps those services together inside the kernel instead.
Q5. A kernel supports separately compiled components that can be loaded when a network adapter is installed and removed when it is no longer needed. Which feature enables this?
📖 Explanation: Loadable kernel modules extend a running kernel by adding components such as device drivers when needed. The tempting static-layering option describes organization, but does not itself provide runtime loading and removal of components.
Q6. A user application requests that the operating system open a file. Which boundary does the application normally cross to request the privileged service?
📖 Explanation: The system-call interface provides controlled entry from user programs into kernel services, such as opening files. The tempting boot-loader interface is used during startup and is not the normal runtime path for file operations.
Q7. A user installs a command-line utility that copies files, lists directories, and displays system status. These utilities provide a convenient operating environment but are not themselves kernel mechanisms. What are they called?
📖 Explanation: System programs provide common user-facing facilities such as file manipulation, status reporting, and command execution. The tempting interrupt-handler option is wrong because handlers respond to hardware or processor events inside privileged execution.
Q8. When a computer starts, a small firmware routine locates a boot loader, which then loads the operating-system kernel into memory. What is this startup process called?
📖 Explanation: Bootstrapping is the sequence that begins with firmware or a small loader and brings the operating-system kernel into execution. The tempting dynamic-linking option resolves program components and does not perform initial system startup.
Q9. A program uses a standard library function to request a service from the operating system. Why is an API useful in this situation?
📖 Explanation: An API gives application developers a stable interface and may use library wrappers to invoke system calls. The tempting one-instruction claim is wrong because an API function can perform substantial work before or after kernel entry.
Q10. An operating-system designer separates the decision about which process receives CPU time from the low-level operation that performs a context switch. Which distinction is being applied?
📖 Explanation: Policy determines what choice should be made, while mechanism provides the operations that implement it. The tempting privilege distinction concerns execution modes, not the separation between a scheduling rule and context-switch machinery.
Q11. A team designs a layered operating system. The file-system layer needs to access disk blocks, but it attempts to call a high-level user-interface layer directly. What is the principal design problem?
📖 Explanation: The flawed dependency moves upward in the layer hierarchy instead of using a lower-level storage interface. The tempting microkernel conclusion is wrong because layering violations do not automatically change where services execute.
Q12. A microkernel file server uses message passing for each request. Measurements show: message exchanges 1: 4 microseconds ; 2: 7 microseconds ; 4: 13 microseconds ; 8: 25 microseconds ; 16: 49 microseconds. What latency is measured for eight exchanges?
📖 Explanation: The table directly reports 25 microseconds at eight message exchanges. The tempting 13 microseconds belongs to four exchanges; the increasing values illustrate the communication cost that designers must consider in microkernel structures.
Q13. A system call must pass twelve arguments to the kernel. The processor has too few convenient argument registers for all values. Which approach can transfer the arguments without requiring one register per argument?
📖 Explanation: When arguments exceed available registers, a program can place them in a memory block and pass the block's address to the kernel. The tempting interrupt-vector option identifies handlers; it is not a general argument-storage mechanism.
Q14. A server administrator installs a new storage controller while the operating system is running. The driver is added without rebuilding or rebooting the entire kernel. Which structural capability is most directly responsible?
📖 Explanation: Dynamic kernel modules allow compatible drivers and services to be inserted into a running kernel. The tempting fixed-layering option describes an organization of interfaces but does not explain runtime extension without rebuilding the kernel.
Q15. A mobile operating system uses a microkernel-like core, kernel-resident drivers for performance, and additional components arranged in layers. Which description best fits this deliberate combination?
📖 Explanation: A hybrid structure combines ideas from multiple designs, such as a small conceptual core with selected services retained in kernel space. The tempting pure microkernel option is wrong because this design deliberately keeps some drivers privileged.
Q16. A student says that calling printf() always causes exactly one system call because printf is a library function. Which correction is most accurate?
📖 Explanation: The flawed step equates a library call with one kernel entry. Buffered output can delay or combine writes, so printf() may invoke write() later or not for every call; the tempting one-call rule is not guaranteed.
Q17. A microkernel-based workstation runs its file server in user space. The server crashes, but the kernel and unrelated applications remain operational. Which architectural benefit is demonstrated?
📖 Explanation: Separating the file server into a user process limits the immediate effect of its failure and can permit restart. The tempting zero-overhead claim is wrong because user-space services commonly communicate through message passing.
Q18. A computer manufacturer creates a customized operating-system build containing drivers for its installed hardware and omitting unsupported components. What activity is being performed?
📖 Explanation: System generation configures an operating-system build for a particular machine, hardware environment, or selected features. The tempting demand-paging option loads memory pages when required during execution and does not select components for a system build.
Q19. A workstation records cumulative startup times: firmware initialization=20 ms ; boot-loader completion=45 ms ; kernel initialization=110 ms ; user services ready=170 ms ; login ready=230 ms. How long does kernel initialization take?
📖 Explanation: Kernel initialization begins at cumulative 45 ms and ends at 110 ms, so its duration is ms. The tempting 110 ms reports cumulative elapsed time, not the stage duration.
Q20. A file manager displays directory contents, while the kernel enforces file permissions and performs disk operations requested through system calls. Which classification is most accurate?
📖 Explanation: The file manager can run as a user-level system program, while the kernel performs privileged checks and device operations. The tempting all-kernel classification confuses a user interface utility with the services it requests.
Q21. An operating-system team wants scheduling rules to change without rewriting context-switch code. Which design choice best supports this goal?
📖 Explanation: Separating policy from mechanism lets developers change which process is selected while reusing the context-switch machinery. The tempting combined routine tightly couples decisions and implementation, making independent modification and testing more difficult.
Q22. A student claims that a monolithic kernel provides strong fault isolation because each subsystem has a separate source-code file. What is the central flaw?
📖 Explanation: The flawed step confuses source-code organization with runtime protection. Monolithic subsystems commonly share kernel privilege and address space, so a faulty driver can corrupt kernel state; the tempting separate-file argument provides no isolation.
Q23. A portable application uses a standardized API, but the underlying operating systems implement different system-call names and calling conventions. Why can the application still remain portable?
📖 Explanation: A compatible API implementation can preserve the application's expected interface while adapting calls to each platform's system-call conventions. The tempting identical-kernel claim is unnecessary; portability depends on the exposed interface, not internal implementation.
Q24. A command interpreter reads a user command, starts a utility, and the utility requests file access through system calls. Which sequence correctly identifies the roles of these components?
📖 Explanation: The shell interprets commands and launches programs; the utility executes as a process and requests privileged file operations from the kernel. The tempting direct-hardware interpretation bypasses the kernel's device and protection responsibilities.
Q25. A microkernel design handles a file request using five message exchanges. Measured time per exchange is 3 microseconds, and fixed request processing takes 10 microseconds. What is the total time under this simplified model?
📖 Explanation: Five exchanges cost microseconds; adding 10 microseconds of fixed processing gives 25 microseconds. The tempting 15 microseconds omits fixed work, while 30 incorrectly adds another exchange overall.
Q26. A developer argues that placing a device driver in a separate source module makes it safe from corrupting kernel memory. Which correction is technically sound?
📖 Explanation: The flawed step equates module boundaries with protection boundaries. A loadable driver executing in kernel mode can generally access kernel memory; the tempting separate-address-space claim requires additional isolation support in normal operation.
Q27. A microkernel file server communicates with a user application through IPC. The kernel validates a request and returns immediately to the same application without scheduling another process. What necessarily occurred?
📖 Explanation: Entering the kernel changes privilege mode, but returning to the same application does not inherently require another process to run. The tempting context-switch answer confuses a protection-boundary transition with changing the scheduled process.
Q28. A microkernel system isolates its network driver in a user-space server. The driver crashes, and the kernel restarts it. Which condition most strongly supports continued operation of unrelated services?
📖 Explanation: Fault containment allows a failed driver server to be restarted without necessarily corrupting the kernel or unrelated services. The tempting shared-memory arrangement expands the failure domain and undermines the isolation that motivates microkernel design.
Q29. A layered-system benchmark records layer count and average request latency: (1, 5 microseconds) ; (2, 8 microseconds) ; (4, 14 microseconds) ; (6, 20 microseconds) ; (8, 26 microseconds). What latency increase is associated with each additional layer in these measurements?
📖 Explanation: Latency increases by 3 microseconds whenever layer count rises by one: for example, from 1 to 2 layers it rises from 5 to 8. The tempting 5 microseconds confuses total latency with per-layer increase.
Q30. A system designer must choose between a monolithic kernel and a microkernel for a latency-sensitive embedded controller. The workload needs frequent device-service requests, but a driver failure must not crash unrelated services. Which design consideration is most balanced?
📖 Explanation: The decision balances communication cost against fault isolation. A microkernel can isolate services, but frequent IPC may add latency; the tempting zero-cost claim ignores message passing, scheduling, and protection-boundary overhead.