WorksheetsOperating Systems Quiz 2
Total questions: 125
Worksheet time: 1hrs 3mins
If a diskless system downloads the OS at 5 MB/s and the OS image is 250 MB, how long will it take?
30 sec
45 sec
50 sec
60 sec
Time to load OS = 90 seconds. If OS is compressed to 60% and decompression takes 15 seconds, what's the new boot time?
54 sec
69 sec
60 sec
72 sec
An OS supports 3 types of users: admin (10%), power users (30%), and regular users (60%). If 500 users are logged in, how many are regular users?
300
250
200
100
Which of the following best describes multiprogramming?
Executing multiple parts of one program
Executing programs with multiple users
Keeping multiple programs in memory simultaneously
Executing programs without I/O support
In a multiprogramming system with 4 programs in memory, if each waits for I/O 20% of the time, what is the CPU utilization?
20%
41%
80%
99%
Which of the following is an example of spooling?
Using RAM to print documents
Storing print jobs in a queue
Executing CPU-bound processes
Managing swap memory
Spooling is primarily used to:
Improve CPU throughput
Manage printer I/O
Optimize cache hits
Avoid segmentation faults
The latency to synchronize between processors is 100 ns. For a program requiring 1000 synchronizations, what is total overhead?
100 μs
10 μs
1 ms
0.1 ms
In a multiprocessor system, communication overhead reduces performance by 15%. If ideal speedup is 20, what is actual speedup?
17
15
18
12
A parallel job on 32 processors takes 4 seconds, while on 1 processor it takes 120 seconds. What is efficiency?
93.75%
85%
75%
80%
In a distributed system, if message latency is 10 ms and average processing time per node is 5 ms, what is total response time for 4 nodes sequentially communicating?
60 ms
50 ms
40 ms
45 ms
A distributed system has 5 nodes with 99.9% availability each. What is overall system availability assuming all nodes must be up?
99.50%
99%
98.50%
97.99%
For a distributed transaction, prepare phase takes 100 ms, commit phase takes 150 ms, and network delay per message is 10 ms. Total 6 messages exchanged. What is total transaction time?
310 ms
360 ms
370 ms
300 ms
A distributed hash table (DHT) has 256 nodes. What is max number of hops to locate an item?
8
16
256
A hand-held system uses a display with a refresh rate of 60 Hz. If each refresh requires 5 ms of CPU time, what percentage of CPU time is consumed by the display?
30%
20%
15%
10%
Which of the following statements is TRUE regarding Rate Monotonic Scheduling (RMS)?
RMS assigns higher priority to tasks with longer periods.
RMS ensures 100% CPU utilization.
RMS is optimal for preemptive, fixed-priority scheduling.
RMS does not work for periodic tasks.
A real-time system requires 4 periodic tasks. The utilization is 0.60. Will the tasks be schedulable under RMS?
No, because utilization exceeds 0.55
Yes, because 0.60 < 0.7568
No, RMS only supports 3 tasks
Yes, all tasks are schedulable regardless of utilization
Which of the following OS structures allows maximum modularity and security but has performance overhead due to communication?
Monolithic kernel
Microkernel
Layered OS
Virtual Machine OS
In an embedded real-time system, what kind of memory allocation is preferred?
Dynamic memory allocation
Stack-based memory
Garbage-collected memory
Static memory allocation
Interrupt occurs every 10 ms; handler takes 2 ms. What is max interrupt frequency without overlap?
100 Hz
500 Hz
333 Hz
1000 Hz
A real-time task’s WCET is 15 ms, period is 60 ms. What is CPU utilization?
0.15
0.25
0.33
0.5
A display refreshes at 60 Hz, each refresh needs 5 ms CPU time. CPU time % used by display?
30%
20%
15%
10%
In RMS, T1: 40 ms period, 10 ms exec; T2: 60 ms, 15 ms exec. Is the set schedulable (RMS bound for n=2 is 0.828)?
Yes
No
Only if T1 priority
Only if T2 priority
A handheld memory manager allocates 512 KB. App needs 600 KB. What happens?
Runs normally
Allocation fails
Switches to VM
Uses secondary storage
Which OS component interacts with hardware to manage I/O?
Process Scheduler
Device Driver
Memory Allocator
File System
Illustrate how interrupts improve CPU efficiency in device communication.
Polls devices regularly
Stops programs frequently
Triggers OS routines
Resets device state
Clarify the use of status registers in CPU processing.
Stores ALU results
Tracks interrupt queue
Indicates CPU mode and flags
Controls memory mapping
Point out the reason for using multi-core CPUs in OS architecture.
Reduces RAM usage
Parallel task execution
Enables BIOS access
Improves user interface
Predict the impact of disabling interrupts on OS responsiveness.
Faster context switching
Device buffering improves
OS cannot respond to hardware
No change
Identify the benefit of using I/O channels in system architecture.
Lowers CPU cycle count
Enhances memory paging
Controls scheduling policy
Uses user-mode interrupts
Examine why context switching requires CPU state preservation.
To recompile programs
To reload disk sectors
To resume execution correctly
To clean buffer cache
Choose the suitable memory type for BIOS storage.
DRAM
SRAM
ROM
Cache
A batch operating system processes 30 jobs in 60 minutes. What is the average turnaround time per job?
1 min
2 min
30 min
60 min
If context switch takes 5 ms and the time quantum in a round robin system is 20 ms, how much CPU time is lost in context switching for 100 processes?
500 ms
5,000 ms
100 ms
200 ms
An OS has a boot time of 2 minutes. If it boots 12 times/day, what is the boot overhead per day?
24 min
12 min
22 min
18 min
A single-user OS supports 8 apps, each needing 100 MB. If the user has only 512 MB RAM, how many apps can be active simultaneously?
5
6
4
8
In a time-sharing OS, the context switch time is 2 ms. If each process runs 48 ms, what is CPU efficiency?
90%
96%
92%
98%
An OS takes 100 MB RAM. On a system with 2 GB RAM, what % is consumed by OS?
5%
10%
2.50%
20%
60% of OS code is in kernel mode, 40% in user mode. If kernel is optimized by 50%, what is overall speedup?
25%
40%
20%
60%
If each processor consumes 50W power and overhead due to communication is 25% extra, what is total power for 10 processors?
625W
500W
750W
600W
Memory bandwidth is 10 GB/s. If each processor needs 500 MB/s, what is the maximum number of processors supported without bottleneck?
20
25
15
30
A multiprocessor system has 8 processors. If each processor executes at 2 GHz and achieves 1.5 IPC, what is total throughput?
12 GIPS
24 GIPS
16 GIPS
8 GIPS
In a system with 4 processors, the workload is 80% parallelizable. What is the maximum speedup achievable using Amdahl’s Law?
2.5
3.2
3.64
A multiprocessor system achieves 90% efficiency with 16 processors. What is the speedup?
14.4
12
15
10
A system with 12 processors runs a workload with 95% parallel portion. Using Amdahl’s Law, what is theoretical max speedup?
10.5
15
11.4
20
A cache coherence protocol adds 5 cycles latency per access. If average memory access time without coherence is 50 cycles, what is new average access time?
55 cycles
50 cycles
60 cycles
65 cycles
Which of the following system calls is used to create a new process?
read()
fork()
open()
exit()
50 ms and T2 at 70 ms, and both tasks arrive at t=0 with execution times of 20 ms and 30 ms respectively, which task executes first?
T1
T2
Both simultaneously
Neither, system fails
Which scheduling algorithm is ideal for hard real-time systems?
First Come First Serve
Round Robin
Rate Monotonic Scheduling
Shortest Job Next
A soft real-time system processes video frames at 30 frames per second. If each frame requires 25 ms of processing time, what is the maximum allowable latency for scheduling to avoid frame drops?
33.33 ms
8.33 ms
25 ms
30 ms
Which system component is responsible for managing process scheduling?
File System
Memory Manager
Process Manager
I/O Manager
A hard real-time task must meet a deadline of 50 ms. If the task requires 20 ms of computation and the system has a scheduling overhead of 5 ms, what is the maximum time available for context switching and other system activities?
25 ms
30 ms
20 ms
45 ms
In RMS, T1 has a period of 100 ms and exec. time of 20 ms, T2 has a period of 150 ms and exec. time of 30 ms. What is the total CPU utilization?
0.35
0.4
0.5
0.6
Using EDF, Task T1 (deadline 50 ms) and T2 (deadline 70 ms) arrive at t=0 with exec. times 20 ms and 30 ms. Which task executes first?
T1
T2
Both
System fails
A handheld system has a 2000 mAh battery, consumes 100 mA during operation, runs 5 hrs/day. How many days will battery last?
4 days
5 days
10 days
20 days
A handheld device reduces CPU freq by 50%, increasing task time 2x. Task normally takes 10 ms. New execution time?
10 ms
15 ms
20 ms
25 ms
Identify the layer responsible for resource management in modern operating systems.
Kernel
Shell
BIOS
Loader
Select the component responsible for translating logical to physical memory addresses.
ALU
MMU
DMA controller
CPU register
Point out the register that stores the next instruction to be executed.
PC
IR
MAR
ACC
Differentiate between control unit and ALU in CPU organization.
CU performs I/O
ALU decodes instructions
CU manages memory transfers
ALU performs arithmetic
Infer the CPU state most suitable for executing privileged instructions.
User mode
Idle state
Kernel mode
Sleep state
Examine how microprogramming supports instruction execution in CPUs.
Uses firmware loops
Modifies kernel
Stores BIOS calls
Involves user commands
Explain how DMA enhances data transfer between devices and memory.
CPU-intensive transfer
Hardware interrupt use
Bypasses CPU involvement
Uses virtual memory
Propose a benefit of memory hierarchy design in modern computer systems.
Slower data movement
Efficient cost-use balance
Redundant computation
Memory fragmentation
A multiprocessor system has 4 CPUs. If each CPU executes 3 instructions per clock cycle and the system runs at 2 GHz, what is the theoretical peak performance in MIPS?
24,000 MIPS
6,000 MIPS
12,000 MIPS
48,000 MIPS
In a distributed system with 5 nodes, each node sends a heartbeat every 2 seconds. If a node is considered failed after 3 missed heartbeats, how long does the system wait before declaring the node failed?
4 seconds
5 seconds
6 seconds
8 seconds
In a failover cluster, one node takes 0.5 seconds to detect a failure and 1.5 seconds to reboot the failed service. If downtime per failure is the sum of these, what is the total downtime for 4 failures per day?
4 seconds
6 seconds
8 seconds
10 seconds
A periodic task in a real-time system must complete every 100 ms. If execution takes 30 ms, what is the processor utilization of the task?
30%
50%
60%
70%
A hand-held system has a 2000 mAh battery. If the system consumes 500 mA while the OS is actively scheduling tasks, how many hours will the battery last in this active mode?
2 hours
3 hours
4 hours
5 hours
In a layered OS structure with 5 layers, if each layer adds 2ms of overhead and a user program makes 3 system calls, what is the total overhead introduced?
30 ms
15 ms
10 ms
5 ms
An OS provides process scheduling and takes 0.1 ms per scheduling decision. If 500 processes are scheduled per second, how much CPU time is used per second just for scheduling?
20 ms
50 ms
100 ms
500 ms
If each system call takes 15 microseconds to execute, and a program makes 200 system calls per second, how much time is spent in system calls per second?
2 ms
3 ms
4 ms
5 ms
A system program compiles 500 lines of code in 2 seconds. If optimization increases compilation time by 25%, what is the new compilation time?
2.25 sec
2.5 sec
3 sec
4 sec
If system boot time increases linearly with the number of kernel modules and currently takes 10 seconds with 40 modules, how long will it take with 60 modules?
12 seconds
13 seconds
15 seconds
18 seconds
A multiprocessor system has 8 cores. If a task takes 24 seconds on a single core, how much time will it take if parallelization efficiency is 75% across all cores?
4 sec
3 sec
6 sec
8 sec
A program is divided into 70% parallel and 30% serial parts. What is the theoretical speedup using Amdahl's Law on 4 processors?
2
2.1
2.3
2.5
In a distributed system with 10 nodes, each node stores 5 GB. What is the total storage?
50 GB
25 GB
100 GB
45 GB
Message delay between two distributed system nodes is 100 ms. If 200 messages are exchanged per second, what is the total time spent in communication per second?
5 sec
10 sec
20 sec
25 sec
A clustered system with 3 nodes shares processing equally. If a job requires 90 units of time on a single system, how much time with all 3 active nodes (assuming perfect balancing)?
30
35
40
45
If cluster overhead is 5% and workload is 1000 seconds, what is actual useful computation time?
950 sec
960 sec
975 sec
990 sec
If 5 real-time tasks execute periodically with periods of 20ms, 40ms, 50ms, 100ms, and 200ms, what is the least common multiple (LCM) of periods?
200ms
400ms
1000ms
2000ms
A task takes 5 ms to execute, deadline is 10 ms, and it runs every 20 ms. What is the slack time?
5
10
15
20
A hand-held device’s display consumes 100mA, CPU 200mA, and WiFi 150mA. If all run for 2 hours, how much battery is consumed in mAh?
900
850
800
700
A 3000 mAh battery lasts for 10 hours. What is average current drawn?
100 mA
200 mA
300 mA
400 mA
If kernel occupies 512 MB and RAM is 8 GB, what percentage of memory is used by the kernel?
6.25%
5%
4%
3%
A system has 3 device drivers, each 50 KB, 3 process tables of 4 KB each, and 1 scheduler of 128 KB. Total component size = ?
236 KB
250 KB
270 KB
290 KB
If the OS allocates CPU using Round Robin with time quantum 5ms, and there are 4 processes each needing 10ms, how many context switches?
2
4
6
8
Process P runs for 100ms and makes 10 I/O calls. Each I/O causes 5ms delay. What is total process time?
100 ms
150 ms
120 ms
130 ms
A system call takes 1.2 μs. If a process makes 2000 system calls/sec, how much time is spent in system calls per sec?
1.2 ms
2.4 ms
3.0 ms
4.2 ms
A syscall interface handles 500 calls per second with average latency 1.5 ms. Total syscall time per second = ?
0.5 sec
0.6 sec
0.75 sec
1.2 sec
If a linker takes 4 ms per KB and the binary size is 250 KB, total linking time is?
1 sec
1.2 sec
0.8 sec
2 sec
A compiler converts 2000 lines in 5 sec. What is lines per second?
200
300
400
500
If each module adds 10 ms of overhead and 7 modules are linked at boot time, how much total overhead?
70 ms
50 ms
90 ms
100 ms
During implementation, the code base grows 15% per week from a base of 2000 LOC. What is size after 3 weeks?
2650
3045
3050
3100
Bootloader takes 0.8 sec, kernel loading takes 1.2 sec, init scripts take 3 sec. What is total boot time?
4.8
5.2
5.5
5
In a design iteration, 5 features are implemented per week. If a project requires 40 features, how many weeks?
6
7
8
9
A system uses Round Robin scheduling with a time quantum of 5 ms. If a process requires 18 ms of CPU time, how many context switches will occur (excluding the first dispatch)?
2
3
4
5
A CPU uses a microprogrammed control unit and each microinstruction takes 5 ns. If a machine-level instruction needs 4 microinstructions to execute, how much CPU time is spent per instruction?
10ns
20ns
15ns
25ns
An early computing center uses a system that executes batches of jobs with no user interaction. It seeks to improve interactivity and reduce turnaround time. Which evolution in OS design addresses this?
Real-time OS
Time-sharing OS
Embedded OS
Mobile OS
An OS in the 1960s was designed for punch-card based job submissions with no runtime feedback. What key limitation did this system exhibit?
Limited storage
No GUI support
Absence of interactive user communication
Poor CPU design
A developer compares modern desktop OSs and early mainframe OSs. What distinguishes the desktop systems in terms of user interaction?
Centralized terminals
No user interface
Interactive GUI with dedicated single-user focus
Limited hardware control
In a Round Robin scheduling algorithm with time quantum = 4ms, consider 4 processes arriving at time 0 with burst times: P1=5ms, P2=12ms, P3=3ms, P4=7ms. Which process completes execution first?
P1
P2
P3
P5
In Shortest Job First (SJF) scheduling, which condition can lead to incorrect CPU burst predictions, thereby affecting efficiency?
High process arrival rate
Variable I/O device speeds
Inaccurate estimation of next CPU burst time
Low memory allocation
A scheduling algorithm gives priority to I/O-bound processes. What is the likely benefit of this approach?
Reduces context switching
Improves CPU utilization
Reduces memory usage
Minimizes waiting time for CPU-bound processes
A system utility is written in user space but needs to perform file access, process control, and device interaction. Why can't it directly manipulate hardware or memory, and what mechanism enables this functionality?
It can access hardware via BIOS calls
It must use system calls for privileged operations
It must be compiled with root privileges
It can directly access kernel buffers
A system program such as a compiler does not interact with hardware but is essential for user tasks. Why is it not considered part of the operating system kernel?
It is too large in size
It is loaded by the bootloader
It operates in user mode and doesn't manage hardware resources
It is not open source
A hard real-time task must meet a deadline of 50 ms. If the task requires 20 ms of computation and the system has a scheduling overhead of 5 ms, what is the maximum time available for context switching and other system activities?
25 ms
30 ms
20 ms
45 ms
In RMS, T1 has a period of 100 ms and exec. time of 20 ms, T2 has a period of 150 ms and exec. time of 30 ms. What is the total CPU utilization?
0.35
0.4
0.5
0.6
Using EDF, Task T1 (deadline 50 ms) and T2 (deadline 70 ms) arrive at t=0 with exec. times 20 ms and 30 ms. Which task executes first?
T1
T2
Both
System fails
A handheld system has a 2000 mAh battery, consumes 100 mA during operation, runs 5 hrs/day. How many days will battery last?
4 days
5 days
10 days
20 days
A handheld device reduces CPU freq by 50%, increasing task time 2x. Task normally takes 10 ms. New execution time?
10 ms
15 ms
20 ms
25 ms
In mainframe systems, jobs are queued and processed efficiently for multiple users. What OS capability is most critical to ensure fairness and throughput?
Multithreading
Device driver support
Multiprogramming and job scheduling
Compiler optimization
A shared-memory multiprocessor uses a single OS to manage all processors. What is a key scheduling challenge in this system?
Address translation
Symmetric core frequency
Avoiding CPU starvation and contention
High memory latency
A user program invokes a system call to create a new process. The OS duplicates the process memory and sets up process control structures. Which of the following best describes the role of the kernel in this context?
Executes the entire user program
Manages only I/O for the process
Transitions to kernel mode to execute process management logic
Waits for user input before execution
In a memory hierarchy system, L1 cache access time is 2 ns, L2 is 10 ns, and main memory is 100 ns. If the hit rate in L1 is 80% and L2 is 15%, what is the effective access time?
12.5 ns
18.0 ns
20.3 ns
14.5 ns
A DMA controller transfers 2048 bytes of data from I/O to memory. If each transfer takes 1 μs and setup time is 50 μs, what is the total time for the operation?
2100 μs
2098 μs
2048 μs
2095 μs
An operating system must manage resource allocation fairly among processes. What OS functionality ensures that critical resources are assigned efficiently without deadlocks?
Interrupt handling
Virtual memory paging
Process scheduling and synchronization
Disk buffering
The CPU operates in user mode and kernel mode. Why is kernel mode essential in the OS design?
To allow applications direct access to hardware
To switch between power states
To restrict execution of privileged instructions to the OS
To enable dynamic linking at runtime
Consider a system with two CPU modes: User and Kernel. A process in user mode issues a system call, which takes 4 ns for mode switching each way, and 20 ns to execute. What is the total overhead of this system call?
20 ns
24 ns
28 ns
32 ns
A soft real-time system processes video frames at 30 fps. Each frame requires 25 ms of processing. What is the maximum allowable scheduling latency to avoid frame drops?
33.33 ms
8.33 ms
25 ms
30 ms
A company processes financial data with strict performance and centralized control needs. Hundreds of users must access the same data simultaneously without delays. Which system fits best?
Cluster system
Mainframe system
Distributed system
Mobile system
Desktop operating systems are designed for single-user interaction. When used in multi-user scenarios, they exhibit degraded performance. What is the root cause?
GUI limitations
Lack of hardware interfaces
Poor process scheduling and resource contention
Inefficient compilers
A startup wants to set up a secure server infrastructure using standard desktop OSs. The system will handle high transaction volume. Which is the main risk in this approach?
Low software compatibility
Inadequate user authentication
Inability to manage concurrent multi-user load
Slow UI rendering
A cloud-based application runs across 10 geographically dispersed nodes. Each node manages a segment of the database, and users access services globally. During a regional outage, 3 nodes become unreachable. Despite this, the system continues functioning without user disruption. Which feature best explains this resilience?
Dynamic linking of services
Centralized coordination
Replication and consensus in a decentralized system
Shared bus architecture
An OS designer is optimizing system call overhead in a modern multitasking environment. If every I/O operation causes a user-kernel mode switch, what approach can reduce overhead while maintaining security?
Use system programs instead of system calls
Implement lazy evaluation for I/O
Utilize memory-mapped I/O with fewer system calls
Replace kernel code with user libraries
