wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Operating Systems Quiz

Total questions: 100

Worksheet time: 53mins

Name
Class
Date
1.

If a diskless system downloads the OS at 5 MB/s and the OS image is 250 MB, how long will it take?

a)

30 sec

b)

45 sec

c)

50 sec

d)

60 sec

2.

Time to load OS = 90 seconds. If OS is compressed to 60% and decompression takes 15 seconds, what's the new boot time?

a)

54 sec

b)

69 sec

c)

60 sec

d)

72 sec

3.

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?

a)

300

b)

250

c)

200

d)

100

4.

Which of the following best describes multiprogramming?

a)

Executing multiple parts of one program

b)

Executing programs with multiple users

c)

Keeping multiple programs in memory simultaneously

d)

Executing programs without I/O support

5.

In a multiprogramming system with 4 programs in memory, if each waits for I/O 20% of the time, what is the CPU utilization?

a)

0.2

b)

0.41

c)

0.8

d)

0.99

6.

Which of the following is an example of spooling?

a)

Using RAM to print documents

b)

Storing print jobs in a queue

c)

Executing CPU-bound processes

d)

Managing swap memory

7.

Spooling is primarily used to:

a)

Improve CPU throughput

b)

Manage printer I/O

c)

Optimize cache hits

d)

Avoid segmentation faults

8.

The latency to synchronize between processors is 100 ns. For a program requiring 1000 synchronizations, what is total overhead?

a)

100 μs

b)

10 μs

c)

1 ms

d)

0.1 ms

9.

In a multiprocessor system, communication overhead reduces performance by 15%. If ideal speedup is 20, what is actual speedup?

a)

17

b)

15

c)

18

d)

12

10.

A parallel job on 32 processors takes 4 seconds, while on 1 processor it takes 120 seconds. What is efficiency?

a)

0.9375

b)

0.85

c)

0.75

d)

0.8

11.

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?

a)

60 ms

b)

50 ms

c)

40 ms

d)

45 ms

12.

A distributed system has 5 nodes with 99.9% availability each. What is overall system availability assuming all nodes must be up?

a)

0.995

b)

0.9999

c)

0.995

d)

0.9999

13.

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?

a)

310 ms

b)

360 ms

c)

370 ms

d)

300 ms

14.

A distributed hash table (DHT) has 256 nodes. What is max number of hops to locate an item?

a)

8

b)

16

c)

256

d)

4

15.

Which scheduling algorithm is ideal for hard real-time systems?

a)

First Come First Serve

b)

Round Robin

c)

Rate Monotonic Scheduling

d)

Shortest Job Next

16.

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?

a)

0.3

b)

0.2

c)

0.15

d)

0.1

17.

Why is memory management important in operating systems?

a)

To store large files

b)

To track processor usage

c)

To allocate memory space efficiently to processes

d)

To connect with the printer

18.

Which of the following statements is TRUE regarding Rate Monotonic Scheduling (RMS)?

a)

RMS assigns higher priority to tasks with longer periods.

b)

RMS ensures 100% CPU utilization.

c)

RMS is optimal for preemptive, fixed-priority scheduling.

d)

RMS does not work for periodic tasks.

19.

A real-time system requires 4 periodic tasks. The utilization is 0.60. Will the tasks be schedulable under RMS?

a)

No, because utilization exceeds 0.55

b)

Yes, because 0.60 < 0.7568

c)

No, RMS only supports 3 tasks

d)

Yes, all tasks are schedulable regardless of utilization

20.

Which of the following OS structures allows maximum modularity and security but has performance overhead due to communication?

a)

Monolithic kernel

b)

Microkernel

c)

Layered OS

d)

Virtual Machine OS

21.

In an embedded real-time system, what kind of memory allocation is preferred?

a)

Dynamic memory allocation

b)

Stack-based memory

c)

Garbage-collected memory

d)

Static memory allocation

22.

Interrupt occurs every 10 ms; handler takes 2 ms. What is max interrupt frequency without overlap?

a)

100 Hz

b)

500 Hz

c)

333 Hz

d)

1000 Hz

23.

A real-time task's WCET is 15 ms, period is 60 ms. What is CPU utilization?

a)

0.15

b)

0.25

c)

0.33

d)

0.5

24.

A display refreshes at 60 Hz, each refresh needs 5 ms CPU time. CPU time % used by display?

a)

0.3

b)

0.2

c)

0.15

d)

0.1

25.

Which OS service ensures a process can securely access a file?

a)

Process Mgmt

b)

File Mgmt

c)

Memory Mgmt

d)

Device Mgmt

26.

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)?

a)

Yes

b)

No

c)

Only if T1 priority

d)

Only if T2 priority

27.

A handheld memory manager allocates 512 KB. App needs 600 KB. What happens?

a)

Runs normally

b)

Allocation fails

c)

Switches to VM

d)

Uses secondary storage

28.

Which OS component interacts with hardware to manage I/O?

a)

Process Scheduler

b)

Device Driver

c)

Memory Allocator

d)

File System

29.

Illustrate how interrupts improve CPU efficiency in device communication.

a)

Polls devices regularly

b)

Stops programs frequently

c)

Triggers OS routines

d)

Resets device state

30.

Clarify the use of status registers in CPU processing.

a)

Stores ALU results

b)

Tracks interrupt queue

c)

Indicates CPU mode and flags

d)

Controls memory mapping

31.

Point out the reason for using multi-core CPUs in OS architecture.

a)

Reduces RAM usage

b)

Parallel task execution

c)

Enables BIOS access

d)

Improves user interface

32.

Predict the impact of disabling interrupts on OS responsiveness.

a)

Faster context switching

b)

Device buffering improves

c)

OS cannot respond to hardware

d)

No change

33.

Identify the benefit of using I/O channels in system architecture.

a)

Lowers CPU cycle count

b)

Enhances memory paging

c)

Controls scheduling policy

d)

Uses user-mode interrupts

34.

Demonstrate how microprogrammed control units simplify CPU design.

a)

Uses variable latency

b)

Implements OS processes

c)

Encodes control signals

d)

Replaces all hardware

35.

Examine why context switching requires CPU state preservation.

a)

To recompile programs

b)

To reload disk sectors

c)

To resume execution correctly

d)

To clean buffer cache

36.

Choose the suitable memory type for BIOS storage.

a)

DRAM

b)

SRAM

c)

ROM

d)

Cache

37.

In a multilevel feedback queue scheduling system, what is the main purpose of allowing processes to move between queues?

a)

To reduce memory fragmentation

b)

To avoid CPU overload

c)

To dynamically adjust process priorities for fairness

d)

To eliminate context switching

38.

If a First-Come, First-Served (FCFS) scheduler is used and the first process in the queue has a very long burst time, what is the expected result?

a)

High CPU utilization

b)

Reduced response time

c)

Convoy effect

d)

Reduced turnaround time

39.

In a Round Robin scheduling algorithm with a time quantum of 4 ms, how many time slices will a process with a CPU burst

4 lines
40.

In a Round Robin scheduling algorithm with a time quantum of 4 ms, how many time slices will a process with a CPU burst time of 10 ms require to complete?

a)

2

b)

3

c)

4

d)

5

41.

A process arrives at time 0 with a burst time of 20 ms. It is scheduled using a time quantum of 5 ms in a Round Robin scheduler. What is the total CPU time consumed before the process finishes (including all time slices)?

a)

15 ms

b)

20 ms

c)

25 ms

d)

30 ms

42.

Three processes arrive at time 0: P1 (burst = 5 ms), P2 (burst = 10 ms), P3 (burst = 3 ms). Using Shortest Job First (non-preemptive), in what order will the processes execute?

a)

P1, P2, P3

b)

P3, P1, P2

c)

P2, P3, P1

d)

P3, P2, P1

43.

A CPU scheduling algorithm uses priority values where a lower number indicates higher priority. Given P1 (priority 3), P2 (priority 1), and P3 (priority 2), in what order will they be scheduled (non-preemptive)?

a)

P1, P2, P3

b)

P2, P3, P1

c)

P3, P2, P1

d)

P1, P3, P2

44.

Which scheduling algorithm is most likely to produce the lowest turnaround time when process burst times vary significantly and are known in advance?

a)

Round Robin

b)

Priority Scheduling

c)

Shortest Job First

d)

First-Come, First-Served

45.

You are testing an application with 5 threads sharing a database connection. You notice high CPU usage and response delay even when only one thread is active. What's a likely cause?

a)

Context switching

b)

Thread pooling

c)

Busy waiting in critical section control

d)

Lack of database indexing

46.

A banking system allows users to transfer funds. Occasionally, both sender and receiver accounts get the same updated balance after a transfer. What could fix this?

a)

Add more threads for transactions

b)

Use a distributed system

c)

Protect transfer logic with mutual exclusion

d)

Use floating-point variables instead of integers

47.

A developer is implementing mutual exclusion on a multi-core processor without using OS-level locks. They use a hardware-supported TestAndSet instruction. Occasionally, one thread monopolizes access. What issue might be occurring?

a)

Deadlock

b)

Starvation

c)

Page fault

d)

Race condition

48.

Two threads running on different cores attempt to acquire a lock simultaneously using the CompareAndSwap instruction. Only one succeeds. What ensures mutual exclusion in this case?

a)

Non-deterministic scheduling

b)

Atomicity of CompareAndSwap

c)

Thread affinity

d)

Priority scheduling

49.

A system uses a spinlock implemented with the TestAndSet instruction. With high contention, CPU usage spikes even when no progress is made. What is the main drawback of this implementation?

a)

Deadlock

b)

Starvation

c)

Busy waiting

d)

Slow memory access

50.

You are debugging a concurrent system where threads access shared memory using Swap instructions. Occasionally, values in shared memory are corrupted. What's the most probable issue?

a)

The swap instruction is not atomic

b)

Threads are too slow

c)

Paging is not enabled

d)

The cache size is too small

51.

In a multi-core environment, a shared flag is used to implement locking without hardware support. Two threads still enter the critical section simultaneously. What is lacking?

a)

Thread synchronization

b)

Atomic operations

c)

Inter-process communication

d)

Thread priorities

52.

If system is in an unsafe state, is it deadlocked?

a)

No

b)

Yes

c)

Always

d)

Cannot say

53.

4 processes, 2 instances of a resource. All request 1 instance. Deadlock?

a)

No

b)

Yes

c)

Maybe

d)

Always

54.

Total R = 12, allocated = 8. Max = [7,5,3], Allocation = [2,2,2]. Available?

a)

4

b)

3

c)

2

d)

1

55.

A multi-threaded system shows a cycle in its resource allocation graph, causing processes to wait indefinitely. What should the OS do next?

a)

Abort one process involved in the cycle

b)

Ignore and continue

c)

Restart the system

d)

Increase CPU allocation

56.

The Banker's Algorithm detects a resource request that leads the system to an unsafe state. What should it do?

a)

Grant the request immediately

b)

Make the process wait

c)

Kill the requesting process

d)

Allocate partial resources

57.

A system eliminates hold and wait by forcing processes to request all resources at once. What is a disadvantage of this approach?

a)

Increased deadlock risk

b)

Lower resource utilization

c)

Easier scheduling

d)

No effect on deadlock

58.

Deadlock detection involves

a)

Searching for cycles in the resource allocation graph

b)

Applying Banker's Algorithm

c)

Preempting resources forcibly

d)

Running processes sequentially

59.

A resource is allocated to multiple processes dynamically. What strategy will ensure deadlock is avoided?

a)

Check safe state before grant

b)

Grant all requests

c)

Use round robin

d)

Lock preemption

60.

What is the drawback of using Banker's Algorithm?

a)

Requires prior knowledge

b)

Causes starvation

c)

Increases memory

d)

Cannot detect deadlock

61.

Calculate whether a system is in deadlock using a resource allocation table with 4 processes.

a)

Deadlock exists

b)

No deadlock

c)

Safe state

d)

Starvation only

62.

A system grants requests as long as it leads to a safe state. What method is being followed?

a)

Deadlock avoidance

b)

Detection

c)

Prevention

d)

Starvation control

63.

Given a system with 3 processes and 3 resources, calculate the Need matrix using Banker's algorithm.

a)

Max - Allocation

b)

Max + Allocation

c)

Allocation - Max

d)

Max × Allocation

64.

Which of the following algorithms detects deadlock?

a)

Wait-For Graph

b)

FIFO

c)

SJF

d)

Time sharing

65.

The resource allocation graph shows a cycle. What does this imply?

a)

Deadlock may exist

b)

System is safe

c)

All processes terminated

d)

Starvation

66.

Deadlock recovery can be done by:

a)

Preempting resources and rolling back processes

b)

Increasing resource allocation

c)

Ignoring deadlock

d)

Restarting OS only

67.

If Available resources are [3,3,2], and Process P1 requests [2,2,1], can this request be granted safely?

a)

Yes, safe

b)

No, unsafe

c)

Only partial resources

d)

Request ignored

68.

A process in deadlock recovery is terminated. Which of the following happens?

a)

Resources are released

b)

System crashes

c)

Deadlock remains

d)

New deadlock created

69.

Given Allocation=[[2,1,0],[3,0,2],[2,1,1]], Max=[[3,3,2],[4,2,3],[3,2,2]], Available=[1,2,1], calculate Need matrix.

a)

[[1,2,2],[1,2,1],[1,1,1]]

b)

[[1,2,2],[2,2,1],[1,1,1]]

c)

[[1,1,2],[1,2,2],[1,1,2]]

d)

[[1,2,1],[1,1,1],[1,2,1]]

70.

For Allocation=[[1,0,1],[0,1,0],[2,1,1]], Max=[[3,2,2],[1,3,3],[3,1,2]], Available=[2,1,1], is system in safe state?

a)

Yes, safe

b)

No, deadlock

c)

Unsafe but no deadlock

d)

Cannot determine

71.

Process P3 needs [2,1,0] but only [1,1,0] are available. What happens?

a)

Request denied

b)

Partial grant

c)

Deadlock

d)

Request accepted

72.

What happens?

a)

Request denied

b)

Partial grant

c)

Deadlock

d)

Request accepted

73.

Total resources = [9,3,6], Allocation=[[3,0,2],[1,2,1],[1,1,1]], find Available.

a)

[4,0,2]

b)

[4,1,2]

c)

[3,1,2]

d)

[4,0,3]

74.

If a process's Max claim is [4,3,2] and Allocation is [1,2,0], what is its Need?

a)

[3,1,2]

b)

[3,2,2]

c)

[4,1,2]

d)

[3,1,1]

75.

Calculate total memory wasted by internal fragmentation for 4 partitions of 512 KB

a)

120 KB

b)

64 KB

c)

128 KB

d)

96 KB

76.

Analyze the difference in allocation success rate between First Fit and Worst Fit (200 KB process)

a)

Same

b)

First Fit better

c)

Worst Fit better

d)

None

77.

Compare swap time of 3 processes at 40 ms each with and without parallel swapping

a)

120 ms vs 40 ms

b)

60 ms vs 120 ms

c)

Same

d)

30 ms vs 90 ms

78.

Design an efficient memory allocation sequence for processes: 180 KB, 300 KB, 400 KB using Best Fit

a)

180, 300, 400

b)

400, 300, 180

c)

300, 400, 180

d)

180, 400, 300

79.

Recommend an allocation strategy for minimizing fragmentation

a)

First Fit

b)

Worst Fit

c)

Best Fit

d)

Paging

80.

Estimate total fragmentation when process sizes: 480 KB, 500 KB, 490 KB use 512 KB partitions

a)

48 KB

b)

64 KB

c)

54 KB

d)

60 KB

81.

Propose a method to optimize memory utilization in contiguous allocation

a)

Compaction

b)

Paging

c)

Segmentation

d)

None

82.

Number of 512-byte blocks allocated by malloc call of 4096 bytes

a)

4

b)

8

c)

6

d)

12

83.

Operation not performed by a linker

a)

Symbol resolution

b)

Code relocation

c)

Memory deallocation

d)

Address binding

84.

Description of relocation in linking

a)

Moving processes between memory

b)

Changing relative to absolute addresses

c)

Mapping virtual to physical memory

d)

Resolving system calls

85.

Number of physical memory copies of shared library used by 5 processes

a)

1

b)

2

c)

5

d)

Depends on OS

86.

Allocation strategy resulting in largest leftover hole

a)

First Fit

b)

Best Fit

c)

Worst Fit

d)

Next Fit

87.

Allocation method failing if 700 KB requested but only 600 KB contiguous

a)

Segmentation

b)

Paging

c)

Demand Paging

d)

Contiguous Allocation

88.

Main advantage of dynamic linking over static linking

a)

Faster execution

b)

Smaller executable size

c)

Reduced compile time

d)

Increased memory use

89.

A system with segmentation and paging uses a segment table and a page table for memory management. If a process accesses a logical address, how many memory accesses are required to translate it assuming no TLB is used?

a)

One

b)

Two

c)

Three

d)

Four

90.

Consider a process with three segments: code, stack, and data. Each segment is divided into pages in a segmented-paging system. Which table structures are required for correct address translation?

a)

Only one global page table

b)

A single segment table for all processes

c)

A segment table with individual page tables for each segment

d)

No tables required

91.

A 32-bit system using segmentation with paging has 4 segments per process and each segment has its own page table. If each page size is 4KB and each segment supports up to 1MB, what is the maximum number of pages per segment?

a)

128

b)

256

c)

512

d)

1024

92.

In paging, all frames in physical memory are of the same size, which matches the page size of processes. Suppose a process requires 10 pages, but physical memory has only 6 free frames. What is the result if demand paging is enabled?

a)

Process runs immediately using all frames

b)

OS swaps all pages before execution

c)

Process partially loads into memory and executes with page faults

d)

Execution is denied

93.

When paging is used, address translation becomes crucial. Suppose a virtual address needs to be translated into a physical address. What components are needed and what is the process involved in this translation?

a)

Base register and segment offset

b)

Page number and offset using page table

c)

Frame number and segment number using TLB

d)

Logical block number and physical block

94.

Segmentation can simplify memory protection. Suppose a segment is marked as read-only in a program. What happens if a write operation is attempted on this segment, and why?

a)

Operation proceeds with a warning

b)

Operation is ignored silently

c)

Segmentation fault occurs

d)

System restarts

95.

A program is loaded into a segmented memory. Segment 0 holds code, segment 1 holds data, and segment 2 holds stack. Which feature of segmentation allows this type of structured memory allocation?

a)

Fixed block division

b)

Logical division of memory by purpose

c)

Contiguous physical memory allocation

d)

Unified memory model

96.

Consider a virtual memory system that uses demand paging. The system only loads pages when they are required. Suppose a program accesses a sequence of instructions located across different pages. How does demand paging impact the initial performance of the program?

a)

Enhances performance by preloading pages

b)

Reduces CPU speed permanently

c)

Causes initial delays due to page faults

d)

Allows faster memory mapping

97.

The working set model is used in memory management to predict which pages a process will need in the near future. It considers a window of recent page references. Which of the following best defines the working set?

a)

All pages in the disk

b)

Set of recently used pages in a fixed time

c)

All pages in RAM

d)

Random pages accessed previously

98.

Suppose a system is experiencing frequent page faults, causing excessive disk I/O and degraded performance. The system administrator decides to increase the size of the main memory. How does this change affect the virtual memory behavior?

a)

Increases page faults

b)

Reduces page faults

c)

Increases context switching

d)

Reduces hit ratio

99.

In a virtual memory system, each process has its own page table, which maps virtual pages to physical frames. If the page table becomes too large, it can slow down the system. What structure can the OS use to handle this problem efficiently?

a)

Inverted page table

b)

Hash table

c)

Direct table

d)

Circular queue

100.

Consider a system that supports memory-mapped files. A file is mapped into virtual memory and accessed as if it were part of the process memory. What advantage does this provide?

a)

Requires more disk access

b)

Reduces RAM usage

c)

Simplifies file I/O and improves performance

d)

Avoids file locking