🎓 BookMCQ
← Back to 1. Introduction to Operating System

📝 Computer System Organization in Operating System (30 MCQs)

Processor, Main Memory, and Device Relationships

Computer system organization describes how processors, main memory, device controllers, and communication buses cooperate under operating system management. The CPU executes instructions and coordinates computation, while memory stores active instructions and data. Controllers operate individual devices, and buses or interconnects transfer information between components. The operating system coordinates these resources through interrupts, I/O instructions, device drivers, and memory-management facilities.

Why Controllers and Interrupts Are Needed for I/O

Processors cannot efficiently manage every detail of a disk, keyboard, network interface, or display during ordinary computation. Device controllers provide specialised hardware for operating peripherals, while interrupts notify the processor when attention is required. This arrangement reduces continuous CPU polling and allows computation to overlap with slower device operations. Hardware differences still require appropriate drivers and controller-specific coordination.

How CPU, Controllers, and DMA Coordinate Transfers

A device driver submits an operation to a controller by configuring its registers or command interface. The controller performs the operation and may generate an interrupt upon completion. For suitable transfers, direct memory access (DMA) allows a controller to move data between a device and main memory with limited CPU intervention. The kernel then handles completion and updates the requesting process.

Following a Disk Read Using DMA

Suppose a network or storage controller must transfer 4 KiB into a memory buffer. The driver prepares the buffer and programs the DMA transfer address and length. The controller transfers the data while the CPU performs other work. After completion, an interrupt notifies the kernel, which checks the result and makes any waiting process eligible to continue.

Interrupt Handling, Bus Traffic, and I/O Efficiency

Interrupt-driven I/O reduces wasted processor time compared with continuous polling, while DMA improves efficiency for suitable large transfers. Multiple controllers permit overlapping device operations, but shared buses and memory bandwidth can become bottlenecks. Interrupt handling also consumes CPU cycles, and excessive device activity may cause high overhead. These organisational features directly affect throughput and application response time.

Misconceptions About Device Controllers and Data Transfers

'DMA transfers require no CPU involvement' is incorrect because the CPU configures transfers and handles completion. 'Every I/O operation generates an interrupt immediately' is incorrect because notification usually occurs when an event or operation completes. 'A device controller is the operating system driver' is incorrect because the controller is hardware, whereas its driver is software.

Exam Focus: Interrupts, DMA, and I/O Coordination

Examination questions may ask you to compare programmed I/O, interrupt-driven I/O, and DMA, including their CPU involvement and transfer costs. Trace a controller request from driver configuration through completion notification. Identify the roles of the CPU, controller, memory, and bus, and explain how overlapping computation with device activity improves system utilisation.

Key Terms of Computer System Organization

  • Device controller - Hardware managing a peripheral.
  • Device driver - Software controlling a device.
  • Interrupt - Signal requesting processor attention.
  • DMA - Hardware-assisted direct memory transfer.
  • Bus - Interconnect carrying system information.
  • Polling - Repeatedly checking device status.
10
Easy
10
Medium
10
Hard

📝 All Computer System Organization in Operating System MCQs

Q1. A desktop starts after power is applied. The processor begins executing firmware stored in nonvolatile memory, which locates the operating-system kernel, loads it into RAM, and transfers control to it. What is this initial program's role?

A.It performs the bootstrap sequence that loads and starts the kernel ✅
B.It schedules user processes before the kernel is loaded
C.It copies every file from secondary storage into RAM
D.It handles application-level network requests
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The bootstrap program runs before the operating-system kernel takes control. It initializes enough hardware to locate and load the kernel, then transfers execution. The tempting scheduler option is wrong because process scheduling requires an operating system already running.

Q2. A device controller raises interrupt number 6 when a network packet arrives. The processor consults an interrupt vector to find the corresponding service routine. What does the vector entry normally provide?

A.The packet's complete contents
B.The memory address of the appropriate interrupt handler ✅
C.The network application's process identifier
D.The next disk block to read
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: An interrupt vector maps an interrupt or exception number to the address of its handler. The handler then examines device state and processes the event. The tempting packet-content option is wrong because payload data resides in device or memory buffers.

Q3. A storage controller exposes status, command, and data registers. The operating system uses software to issue commands through these registers. Which component is responsible for translating operating-system requests into device-specific commands?

A.The device driver ✅
B.The interrupt vector
C.The bootstrap loader
D.The system clock
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: A device driver understands the controller's registers and command protocol, translating general operating-system requests into device-specific operations. The tempting interrupt-vector option only identifies a handler address; it does not implement device communication.

Q4. A computer uses CPU registers, cache, RAM, an SSD, and a magnetic archive drive. Which ordering generally places storage from fastest access to slowest access?

A.RAM, registers, cache, SSD, archive drive
B.Registers, cache, RAM, SSD, archive drive ✅
C.Cache, registers, SSD, RAM, archive drive
D.Registers, RAM, cache, archive drive, SSD
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Registers are closest to the processor, followed by cache and main memory; SSDs and magnetic archive devices are slower. The tempting RAM-first ordering overlooks the lower latency of registers and cache.

Q5. A running process divides by zero, causing the processor to transfer control to an operating-system exception handler. How does this event differ from a typical hardware I/O interrupt?

A.It is generated synchronously by the instruction being executed ✅
B.It is always generated by a storage controller
C.It can occur only while the CPU is idle
D.It is delivered only after the process terminates
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: A divide-by-zero exception is synchronous because it arises from the instruction currently executing. A device interrupt is typically asynchronous relative to the instruction stream. The tempting controller option confuses processor exceptions with external hardware events.

Q6. A student program enters an infinite loop and never voluntarily yields the processor. Which hardware mechanism allows the operating system to regain CPU control after a bounded interval?

A.A DMA channel
B.A hardware timer that generates an interrupt ✅
C.A larger disk cache
D.A directory entry
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: A programmed timer generates an interrupt after its configured interval, allowing the kernel to regain control and enforce limits on CPU use. The tempting DMA option transfers data between devices and memory; it does not impose execution time limits.

Q7. A server has four equivalent processors sharing main memory, and any processor can execute kernel or user code under the same operating-system image. Which architecture is being used?

A.Asymmetric multiprocessing
B.Symmetric multiprocessing ✅
C.A single-core uniprocessor
D.An asymmetric standby cluster
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Symmetric multiprocessing gives processors comparable roles and access to shared main memory under one operating system. The tempting asymmetric option assigns distinct master and subordinate roles rather than treating processors as peers.

Q8. A company operates two servers in a cluster. One actively runs the service while the second monitors it and takes over after detecting failure. Which cluster arrangement is described?

A.Symmetric clustering with both nodes always serving requests
B.Asymmetric clustering with a standby node ✅
C.A single-processor system with DMA
D.A multicore processor sharing one cache
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: In asymmetric clustering, one machine performs the service while another remains in standby and monitors its health for failover. The tempting symmetric arrangement normally has multiple active nodes participating in service delivery.

Q9. A disk controller transfers a large block directly into a RAM buffer after the CPU programs the transfer. The CPU is notified when the block is complete. Which mechanism is being used?

A.Polling every transferred byte
B.Direct memory access ✅
C.A system call for each byte
D.A software busy-wait loop
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Direct memory access lets a controller transfer a block directly between the device and memory after CPU setup. Completion can generate an interrupt. The tempting polling option would require repeated CPU checks rather than block transfer autonomy.

Q10. A computer maps device-control registers into its physical address space. The CPU accesses those registers using ordinary load and store instructions. What is this arrangement called?

A.Port-mapped I/O
B.Memory-mapped I/O ✅
C.Interrupt vectoring
D.Direct file allocation
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Memory-mapped I/O assigns device registers addresses in the memory address space, allowing ordinary load and store instructions to access them. The tempting port-mapped option uses a separate I/O address space and specialized instructions on architectures that support it.

Q11. A sensor repeatedly reports small readings to a server. Under polling, the CPU checks the controller every 2 ms even when no data is ready. Under interrupts, the controller signals only when a reading arrives. Which workload most strongly favors interrupts?

A.The sensor produces data continuously at a rate that keeps the controller permanently ready
B.The sensor produces rare readings separated by long idle periods ✅
C.The CPU must sample the controller at an exact fixed frequency regardless of data arrival
D.The controller cannot generate interrupt requests
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Interrupts avoid repeated status checks during long idle periods, making them attractive for infrequent events. Polling can be suitable for continuous high-rate activity or strict sampling intervals; the tempting continuous-arrival case reduces polling's wasted checks.

Q12. A DMA controller transfers a 4 MiB block at an effective bus rate of 200 MiB/s. Ignore setup and completion overhead. How long does the transfer occupy the bus?

A.2 ms
B.5 ms
C.20 ms ✅
D.80 ms
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Transfer time is data size divided by rate: 4\\text{ MiB}/200\\text{ MiB/s}=0.02\\text{ s}\, which equals 20 ms. The tempting 5 ms reverses the ratio; a 200 MiB/s rate moves 4 MiB in one-fiftieth of a second.

Q13. A workstation's firmware loads a small first-stage loader, which then locates a larger loader on an SSD. The larger loader loads the kernel and starts it. Why is a staged bootstrap useful?

A.The processor cannot execute instructions until the full kernel is in cache
B.The first-stage code can be small enough to fit in firmware while locating more capable loading code ✅
C.It eliminates the need for RAM during startup
D.It guarantees that every device driver is loaded before any kernel code
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: A small first-stage loader can reside in limited firmware storage and locate a more capable loader elsewhere. The tempting no-RAM option is wrong because the kernel is normally loaded into main memory before execution.

Q14. A controller raises a low-priority interrupt while the CPU is servicing a higher-priority interrupt. The kernel masks lower-priority interrupts until the current handler finishes. What is the immediate consequence?

A.The lower-priority request is permanently discarded
B.The lower-priority request waits pending until it can be serviced ✅
C.The current handler is replaced by the lower-priority handler
D.The processor switches automatically to another machine in the cluster
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Masking prevents the lower-priority interrupt from preempting the current handler; the request can remain pending for later service. The tempting discarded-request option is wrong because masking delays delivery rather than necessarily erasing the event.

Q15. A memory access takes 100 ns, while a cache access takes 10 ns. A cache has a hit ratio of 0.8, and every miss requires one cache lookup followed by one memory access. What is the average access time?

A.20 ns
B.28 ns
C.30 ns ✅
D.90 ns
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Hits cost 10 ns; misses cost 110 ns including lookup. Average time is 0.8(10)+0.2(110)=300.8(10)+0.2(110)=30 ns. The tempting 28 ns undercounts miss cost because the initial cache lookup is still paid.

Q16. Two processors in a shared-memory server each have a private cache. Processor 0 updates a shared variable, but processor 1 continues reading an older cached copy. Which hardware or system mechanism is needed to preserve a coherent view?

A.Cache-coherence protocol ✅
B.A bootstrap loader
C.A disk defragmenter
D.A DMA completion interrupt
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: A cache-coherence protocol coordinates copies of shared memory across private caches, invalidating or updating stale lines after writes. The tempting DMA interrupt option reports transfer completion and does not reconcile cached copies between processors.

Q17. A program spends 60% of its execution time in a portion that can be perfectly parallelized. The remaining 40% is serial. With two processors and no overhead, what is the maximum speedup predicted by this workload model?

A.1.25
B.1.43 ✅
C.1.67
D.2
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The speedup is 1/[0.4+0.6/2]=1/0.7approx1.431/[0.4+0.6/2]=1/0.7\\approx1.43. The tempting value 2 assumes the entire program is parallel; the serial 40% remains unchanged and limits the improvement.

Q18. A cluster's active server stops sending heartbeat messages. The standby node detects the failure and assumes service responsibility using shared storage. Which property is the cluster primarily providing?

A.Higher availability through failover ✅
B.Faster register access through caching
C.Reduced interrupt latency through polling
D.Larger virtual address spaces through paging
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Heartbeat monitoring helps detect node failure, and a standby node can take over the service to improve availability. The tempting cache option concerns memory access speed and has no direct role in cluster failover.

Q19. A performance report lists throughput against the number of active processors: (1, 100 jobs/s) ; (2, 185 jobs/s) ; (4, 270 jobs/s) ; (8, 330 jobs/s) ; (16, 360 jobs/s). Which conclusion is best supported?

A.Throughput increases by the same amount for every processor doubling
B.Throughput decreases as processors are added
C.Throughput rises, but the marginal gain becomes smaller at higher processor counts ✅
D.Sixteen processors provide exactly sixteen times the single-processor throughput
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Throughput rises at every measured point, but gains for successive doublings shrink from 85 to 85 to 60 to 30 jobs per second. The tempting linear-scaling claim is unsupported; contention and serial work limit scaling.

Q20. A student claims that a DMA transfer requires the CPU to copy every byte from the device register into RAM, then says DMA only changes the interrupt mechanism. Which correction is accurate?

A.The CPU performs the byte copies, but DMA reduces only interrupt frequency
B.The DMA controller performs the block transfer directly; the CPU mainly configures it and handles completion ✅
C.DMA transfers data only between two CPU registers
D.DMA eliminates the need for a device controller
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The flawed step is assigning every byte copy to the CPU. DMA moves the block directly between device and memory after setup; the CPU may handle completion. The tempting interrupt-frequency claim confuses transfer mechanics with notification policy.

Q21. A server uses burst-mode DMA for a 16 MiB transfer across a shared bus operating at 400 MiB/s. The DMA controller occupies the bus continuously during the transfer. Ignoring overhead, how long can the CPU be denied access to that bus?

A.4 ms
B.20 ms
C.40 ms ✅
D.64 ms
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: The transfer occupies the shared bus for 16/400=0.04\ seconds, or 40 ms. The tempting 4 ms answer drops a factor of ten; burst mode can delay CPU bus access throughout the block transfer.

Q22. A high-speed device generates an interrupt every 10 microseconds. Each interrupt handler consumes 3 microseconds of CPU time. What fraction of one processor's time is consumed by these handlers, assuming no other overhead?

A.0.03
B.0.1
C.0.3 ✅
D.0.7
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: There are 100,000 interrupts per second, each using 3 microseconds, so handler time totals 0.3 seconds each second, or 30% of one processor. The tempting 3% misses the event frequency.

Q23. A server uses burst-mode DMA for a 16 MiB transfer across a shared bus operating at 400 MiB/s. The DMA controller occupies the bus continuously during the transfer. Ignoring overhead, how long can the CPU be denied access to that bus?

A.4 ms
B.20 ms
C.40 ms ✅
D.64 ms
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: The transfer occupies the shared bus for 16/400=0.04\ seconds, or 40 ms. The tempting 4 ms answer drops a factor of ten; burst mode can delay CPU bus access throughout the block transfer.

Q24. A multicore server records speedup against core count: (1, 1.00) ; (2, 1.60) ; (4, 2.30) ; (8, 2.80) ; (16, 3.10). Which interpretation best matches the measured curve?

A.The workload is perfectly parallel because speedup rises at every point
B.Additional cores provide diminishing returns, consistent with serial work or shared-resource contention ✅
C.The workload becomes slower whenever a second core is added
D.The 16-core system is exactly three times slower than the single-core system
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The curve rises but its increments shrink after four cores, indicating diminishing returns as cores are added. Serial sections, synchronization, and shared-resource contention can limit scaling. The tempting perfect-parallelism interpretation would predict speedup closer to core count.

Q25. A symmetric multiprocessor has four CPUs sharing one memory bus. A workload issues 80 million memory transactions per second in total, while the bus supports 100 million transactions per second. A fifth CPU is added and raises demand to 115 million transactions per second. What is the most likely effect if no other resource changes?

A.Throughput must rise by 25% because another CPU is available
B.The bus becomes a bottleneck, so adding the CPU may provide little or no throughput gain ✅
C.Each CPU automatically receives a private 100-million-transaction bus
D.The operating system converts the shared-memory system into an asymmetric cluster
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The shared bus can serve only 100 million transactions per second, below the new 115-million demand. It becomes the bottleneck, so extra compute capacity may sit idle; the tempting proportional-gain claim ignores bus saturation.

Q26. A storage subsystem reports average I/O completion times for increasing request batch sizes: (1, 12 ms) ; (2, 9 ms) ; (4, 7 ms) ; (8, 6 ms) ; (16, 8 ms). At which tested batch size is the measured average completion time lowest?

A.2
B.4
C.8 ✅
D.16
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: The listed times fall from 12 to 6 ms as batch size grows to eight, then rise to 8 ms at sixteen. Thus eight is the measured minimum; the tempting sixteen assumes larger batches always improve latency.

Q27. A server uses memory-mapped I/O and disables interrupts while updating a device's control registers. The critical update lasts 2 ms, while a high-priority timer interrupt arrives during that interval. What should the kernel expect?

A.The timer interrupt may remain pending and be handled after interrupts are re-enabled ✅
B.The timer interrupt is converted automatically into a DMA request
C.The timer interrupt must be serviced immediately despite the mask
D.The CPU permanently loses the timer event because memory-mapped I/O is active
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Disabling interrupts can defer maskable interrupt handling while the critical update proceeds. The timer request may remain pending until re-enabled; the tempting immediate-service option ignores the interrupt mask and its purpose.

Q28. A cluster has two active nodes accessing the same shared data files. Both nodes can update the same file concurrently. Which additional coordination is essential to prevent conflicting updates?

A.A distributed locking or coordination mechanism for shared data ✅
B.A larger interrupt vector table on each node
C.A timer that resets both CPUs after every write
D.A separate bootstrap loader for each file
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Shared storage does not by itself coordinate concurrent writes from active nodes. Distributed locking or an equivalent coordination protocol is needed to serialize conflicting operations; the tempting interrupt-table change cannot protect shared file updates.

Q29. A processor transfers a 64 KiB block using programmed I/O, reading one 4-byte word at a time. How many CPU-issued data reads are required if every word is transferred exactly once?

A.1024
B.4096
C.16384 ✅
D.65536
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: A 64 KiB block contains 65,536 bytes. Dividing by four bytes per word gives 65,536/4=16,38465,536/4=16,384 CPU-issued reads. The tempting 4,096 assumes sixteen-byte words, not the specified four-byte transfer width.

Q30. A four-processor system executes a workload with 25% serial code and 75% parallel code. Parallel execution is limited by a shared I/O subsystem to an effective factor of only 2, even though four CPUs exist. What speedup follows from the serial-plus-parallel time model?

A.1.6 ✅
B.1.78
C.2.29
D.3
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The effective execution time is 0.25+0.75/2=0.6250.25+0.75/2=0.625 of the single-processor time, giving speedup 1/0.625=1.61/0.625=1.6. The tempting 2.29 assumes all four processors accelerate the parallel portion without the I/O limit.

🔗 Related Topics (MCQs)