wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

OS Test 3

Total questions: 100

Worksheet time: 53mins

Name
Class
Date
1.

A desktop processor runs at 3.5 GHz. Each instruction takes 2 cycles. What is max instruction throughput?

a)

1.75 billion/sec

b)

2 billion/sec

c)

3.5 billion/sec

d)

7 billion/sec

2.

In a system using First-Come, First-Served scheduling, which of the following situations is most likely to result in a high average waiting time?

a)

All processes have the same burst time

b)

Short processes arrive after long ones

c)

Processes arrive in increasing order of burst time

d)

All processes arrive at the same time

3.

Devise a swapping schedule for 4 processes with varying priorities

a)

Priority-based

b)

FIFO

c)

Round-robin

d)

Random

4.

Given a choice between LFS and ext4 for a write-heavy IoT system with flash storage, which is the better choice and why?

a)

ext4, because it has journaling

b)

FS, due to efficient sequential writes on flash

c)

ext4, for better directory structures

d)

LFS, because it reduces file read latency

5.

Purpose of executing podman run on a Linux system is to:

a)

Display running pods

b)

Launch a new container

c)

Remove container

d)

Export logs

6.

A desktop boots in 30 seconds. A mainframe takes 5 minutes. What's the % time difference?

a)

9

b)

10

c)

11

d)

7

7.

A process completes its CPU burst and enters the waiting state for I/O. What happens to this process in terms of scheduling?

a)

It is removed from the system

b)

It returns to the Ready Queue immediately

c)

It waits in the I/O Queue until it's ready

d)

It preempts another process currently running

8.

How many processes can be swapped in 1 GB memory if each process needs 256 MB?

a)

4

b)

2

c)

3

d)

5

9.

You are using Btrfs and take a snapshot of a 1 GB subvolume. You then modify 100 MB of data. How much additional disk space is consumed after the modification?

a)

100 MB

b)

1 GB

c)

900 MB

d)

2 GB

10.

Linux utility used to view real-time process and memory usage statistics:

a)

netstat

b)

top

c)

chmod

d)

df

11.

A mainframe has 16 CPUs, each 4-core. How many logical processors?

a)

64

b)

32

c)

48

d)

16

12.

If the time quantum in Round Robin scheduling is set too high, what scheduling behavior does it resemble?

a)

Priority Scheduling

b)

Shortest Job First

c)

First-Come, First-Served

d)

Multilevel Queue Scheduling

13.

Choose best partition: Process size = 480 KB, Partitions = 512 KB x 3

a)

All fit

b)

Only first

c)

None

d)

Any one

14.

A ZFS system uses CoW and is experiencing slow performance during large writes. What is a likely contributing factor?

a)

High CPU usage

b)

CoW causes additional metadata and block updates

c)

Low inode count

d)

Excessive reads

15.

Component within Linux architecture handling resource isolation for containers is the:

a)

Shell script

b)

Kernel

c)

Bootloader

d)

Grub

16.

Mainframe storage = 20 TB. Each user needs 5 GB. How many users can be supported?

a)

4000

b)

5000

c)

6000

d)

3000

17.

Four processes arrive at time 0 with burst times: P1=8ms, P2=4ms, P3=2ms, P4=1ms. Using SJF (non-preemptive), what is the average waiting time?

a)

4.5 ms

b)

5 ms

c)

6.25 ms

d)

7 ms

18.

Identify unused memory when 4 processes of 100 KB are loaded in 150 KB partitions

a)

200 KB

b)

180 KB

c)

250 KB

d)

150 KB

19.

You must choose between ext4 and ZFS for a backup server with heavy snapshot usage and data deduplication requirements. Which is the better file system and why?

a)

ext4, for lower CPU usage

b)

ZFS, due to native deduplication and snapshot capabilities

c)

ext4, for better compatibility

d)

Neither, use FAT32

20.

Resource efficiency comparison shows that containerization requires:

a)

More RAM than VMs

b)

Fewer resources than VMs

c)

Equal resources as VMs

d)

More disk than VMs

21.

Desktop system's uptime is 99.5%, mainframe is 99.99%. What's the downtime difference per year?

a)

45 hours

b)

10 hours

c)

52 hours

d)

20 hours

22.

In a system with high context switching overhead, which scheduling algorithm would be least efficient?

a)

First-Come, First-Served

b)

Shortest Job First

c)

Round Robin

d)

Priority Scheduling

23.

Apply Worst Fit for 220 KB process: holes = 300 KB, 250 KB, 280 KB

a)

300 KB

b)

280 KB

c)

250 KB

d)

None

24.

On Btrfs, you delete a file that was part of a snapshot. What happens to the disk space used by that file?

a)

Space is immediately reclaimed

b)

File is deleted from disk permanently

c)

File remains until all referencing snapshots are deleted

d)

File is renamed in snapshot

25.

Container runtime most suited for multi-user, rootless operation scenarios is:

a)

Docker

b)

Podman

c)

KVM

d)

QEMU

26.

Desktop power use = 400W, mainframe = 20,000W. For 10 hrs, energy used difference?

a)

19.6 kWh

b)

196 kWh

c)

160 kWh

d)

200 kWh

27.

Two cooperating processes need to access a shared file. If both processes try to write to the file at the same time without synchronization, what issue is most likely to occur?

a)

Starvation

b)

Race condition

c)

Deadlock

d)

Context switch overhead

28.

Calculate remaining memory after loading 3 processes: 200 KB, 300 KB, 150 KB in 1 MB

a)

350 KB

b)

400 KB

c)

200 KB

d)

250 KB

29.

Your ZFS pool has multiple snapshots. You notice increasing disk usage despite few visible changes. What explains the high disk usage?

a)

Swap files consuming space

b)

Snapshots retaining changed blocks

c)

Index fragmentation

d)

Missing RAID configuration

30.

Common security vulnerability in container ecosystems involves potential:

a)

Kernel-level exploits

b)

Hypervisor privilege escalation

c)

BIOS modification

d)

GPU misuse

31.

A mainframe runs 100 VMs, desktop 1. What's the consolidation ratio?

a)

4 days, 4:01:00

b)

2 days, 2:01:00

c)

10:01:00

d)

20:01:00

32.

Process A writes to a shared buffer and Process B reads from it. If Process B starts reading before A writes, what is a possible result without proper synchronization?

a)

Increased throughput

b)

Improved latency

c)

Reading stale or garbage data

d)

Deadlock

33.

What is internal fragmentation if a process of 95 KB is placed in a 128 KB block?

a)

33 KB

b)

13 KB

c)

28 KB

d)

30 KB

34.

You clone a Btrfs subvolume and make changes only in the clone. How does Btrfs manage these changes?

a)

It writes changes to both original and clone

b)

It stores differences in a separate log

c)

It uses CoW to duplicate only modified blocks

d)

It locks the original subvolume

35.

File used for building Docker container images based on configuration is the:

a)

Compose file

b)

Dockerfile

c)

Container log

d)

Snapshot script

36.

If a cluster workload is 75% parallelizable and 6 nodes are used, what is max speedup by Amdahl’s Law?

a)

3.3

b)

4

c)

5

d)

6

37.

A programmer wants to implement a lock-free counter shared by multiple threads. Which hardware feature is essential to ensure atomic updates to the counter?

a)

Shared memory

b)

Page tables

c)

CompareAndSwap instruction

d)

Signal handler

38.

Base address for segment 3 if segments loaded at 1000, 2000, 3000, 4000

a)

2000

b)

3000

c)

4000

d)

1000

39.

HDFS is optimized for batch processing large files. Which layer handles the metadata about file blocks?

a)

DataNode

b)

NameNode

c)

Client

d)

SecondaryNameNode

40.

Identify the result of assigning /sbin/nologin as a user's shell. It prevents the user from accessing the system interactively.

a)

Enables GUI access

b)

Denies remote login

c)

Blocks console access

d)

Disables file access

41.

Cluster inter-node latency is 50 μs. For a job requiring 2000 messages exchanged, what is total latency overhead?

a)

100 ms

b)

50 ms

c)

10 ms

d)

150 ms

42.

A developer chooses to use a FetchAndAdd instruction for synchronization. Over time, some threads wait much longer than others. What problem is likely to occur?

4 lines
43.

What is total latency overhead?

a)

100 ms

b)

50 ms

c)

10 ms

d)

150 ms

44.

A developer chooses to use a FetchAndAdd instruction for synchronization. Over time, some threads wait much longer than others. What problem does this describe?

a)

Busy waiting

b)

Starvation

c)

Race condition

d)

Deadlock

45.

Minimum relocation entries if module uses 3 external and defines 2 symbols

a)

2

b)

3

c)

5

d)

0

46.

Which allocation method is prone to external fragmentation causing wasted disk space?

a)

Contiguous

b)

Sequential

c)

Indexed

d)

Linked

47.

Select the file responsible for listing valid login shells in Linux. It defines which shells are accepted for users.

a)

/etc/shells

b)

/etc/passwd

c)

/etc/hosts

d)

/etc/profile

48.

A cluster’s shared storage bandwidth is 1 GB/s. If each node needs 100 MB/s, what is max nodes supported without bandwidth bottleneck?

a)

10

b)

8

c)

5

d)

12

49.

A real-time system implements a lock using TestAndSet, but tasks occasionally miss deadlines. What’s the likely reason?

a)

Lack of timers

b)

Busy waiting wastes CPU cycles

c)

TestAndSet causes memory leaks

d)

Stack overflow

50.

Example of dynamic storage allocation problem

a)

Paging

b)

Segmentation

c)

Buddy system

d)

Swapping

51.

In distributed file systems, data replication primarily improves what aspect?

a)

Capacity

b)

Security

c)

Fault tolerance

d)

Speed

52.

Evaluate why SSH key-based authentication is preferred over password-based methods. It improves security for remote access.

a)

Simpler login

b)

Reduced command usage

c)

Stronger cryptographic access

d)

Requires less setup

53.

Cluster node failure rate is 0.1% per hour. For 20 nodes, what is system failure probability in 1 hour?

a)

0.02

b)

0.002

c)

0.01

d)

0.005

54.

In an embedded system, synchronization is required but space is highly limited. Which of the following would be the most efficient mechanism?

a)

Using hardware atomic instructions like TestAndSet

b)

Full semaphore implementation

c)

Condition variables with dynamic memory

d)

Multiprocessing environment

55.

Smallest block size in buddy system if total memory 1024 KB

a)

1 KB

b)

2 KB

c)

4 KB

d)

System-defined

56.

A file stored using indexed allocation has an index block of 4 KB. If each pointer is 4 bytes, how many blocks can the index point to?

a)

1024

b)

512

c)

2048

d)

4096

57.

Identify the command that changes user group membership. This helps manage access to files and system resources.

a)

groupadd

b)

usermod

c)

adduser

d)

chgrp

58.

A cluster job runs in 120 seconds on 1 node and 30 seconds on 8 nodes. What is efficiency?

a)

0.5

b)

0.6

c)

0.4

d)

0.3

59.

A system uses a counting semaphore initialized to 3 to control access to a pool of printers. Four processes request a printer at the same time. What will happen to the fourth process?

a)

It uses a virtual printer

b)

It is denied access permanently

c)

It is blocked until a printer is released

d)

It accesses two printers simultaneously

60.

Address binding requiring load time

a)

Static Linking

b)

Dynamic Linking

c)

Compilation

d)

Execution

61.

Analyzing HDFS, what happens if a DataNode fails?

a)

Data lost

b)

Metadata lost

c)

Data replicated elsewhere

d)

Client disconnected

62.

Distinguish the effect of a misconfigured sudoers file. It can lead to critical privilege issues in the system.

a)

Kernel crash

b)

Prevents user login

c)

Blocks privilege escalation

d)

Enables root for all

63.

If network bandwidth in a cluster is 10 Gbps, how long to transfer 1 GB data ignoring overhead?

a)

0.8 seconds

b)

1 second

c)

0.5 seconds

d)

0.9 seconds

64.

A programmer implements mutual exclusion using a binary semaphore. However, once a process enters the critical section, no other process ever proceeds. What is the likely issue?

a)

The semaphore was initialized to 2

b)

The process never performs a signal() after wait()

c)

Too many processes are running

d)

The CPU has failed

65.

Number of symbols to resolve during linking if 5 modules define 1 and refer to 2 each

a)

5

b)

10

c)

15

d)

20

66.

Compare contiguous and indexed allocation for large files. Which one better handles file growth?

a)

Contiguous

b)

Indexed

c)

Both same

d)

Neither

67.

Point out the tool used for scheduling recurring jobs. System tasks like backups or monitoring often require automation.

a)

nohup

b)

cron

c)

sleep

d)

watch

68.

A cluster scheduler distributes 500 tasks evenly across 10 nodes. How many tasks per node?

a)

50

b)

100

c)

500

d)

10

69.

Two threads use a shared buffer and synchronize access using semaphores. The producer uses wait(empty) and signal(full), while the consumer uses wait(full) and signal(empty). What issue can occur if both threads forget to use a mutex around buffer access?

a)

Deadlock

b)

Buffer corruption due to race condition

c)

Starvation of consumer

d)

Buffer underflow

70.

Best explanation of internal fragmentation

a)

Wasted space between blocks

b)

Space within allocated block not used

c)

Memory outside addressable space

d)

Space for page tables

71.

In Ceph, how is data durability maintained despite disk failures?

a)

Encryption

b)

Replication

c)

Compression

d)

Backup

72.

Choose the configuration file used for defining environmental variables system-wide. This ensures global variable settings.

a)

~/.bashrc

b)

/etc/bash.bashrc

c)

/etc/environment

d)

/etc/profile.d

73.

Which component of an OS handles inter-process communication?

a)

Scheduler

b)

Dispatcher

c)

Message-passing system

d)

File System

74.

To prevent circular wait, an OS imposes a global order on resource acquisition. What is a potential drawback?

a)

Increased risk of starvation

b)

More complex implementation in distributed systems

c)

Deadlocks still occur

d)

No effect on performance

75.

A segmented-paged memory system has a segment table and per-segment page tables. How does this structure help in reducing external fragmentation while supporting logical program division?

a)

By using one large page table

b)

By using swapping instead of paging

c)

By using pages inside segments for flexibility

d)

By increasing segment size

76.

Unix systems use memory to temporarily store disk blocks, speeding up read/write operations. This caching mechanism helps reduce physical disk I/O. Identify the component.

a)

Cache DNS queries

b)

Speed up file system access

c)

Store executable binaries

d)

Swap memory pages

77.

What does become: true do in an Ansible playbook?

a)

Switch user

b)

Become root

c)

Run as current user

d)

Elevates permission

78.

Which scheduling algorithm may cause starvation?

a)

Round Robin

b)

Priority Scheduling

c)

FCFS

d)

Multilevel Queue

79.

In real-time OS with preemptive scheduling and some non-preemptible resources, deadlocks occur because

a)

Priority scheduling eliminates deadlocks

b)

Non-preemptible resources cause hold and wait

c)

CPU starvation happens

d)

Processes release all resources

80.

In a paged memory system, if the page table is too large to fit into memory, it can cause inefficiencies during address translation. To overcome this, systems use multi-level page tables. How does this technique help in managing memory effectively?

a)

It flattens all page tables into one

b)

It reduces memory usage by loading only required page table parts

c)

It merges page and frame concepts to avoid fragmentation

d)

It caches entire page tables in hardware

81.

Network File System (NFS) depends on a network transport protocol for communication between clients and servers. One lightweight, connectionless protocol is commonly used. Pick the protocol.

a)

FTP

b)

UDP

c)

HTTP

d)

SSH

82.

Calculate the number of tasks executed in a play with 2 hosts and 3 tasks each.

a)

3

b)

6

c)

2

d)

1

83.

In real-time scheduling, the Earliest Deadline First (EDF) algorithm is:

a)

Non-preemptive and optimal

b)

Preemptive and non-optimal

84.

In real-time scheduling, the Earliest Deadline First (EDF) algorithm is:

a)

Non-preemptive and optimal

b)

Preemptive and non-optimal

c)

Preemptive and optimal

d)

Non-preemptive and non-optimal

85.

Dynamic storage management can cause fragmentation, increasing deadlock risk because

a)

Processes hold resources too long

b)

Memory requests cause circular wait

c)

Storage is always contiguously allocated

d)

Requests are denied

86.

Suppose a process has 5 segments with varying sizes. If each segment is allocated memory separately without paging, what memory issue is most likely to occur, and how does this affect system efficiency?

a)

Internal fragmentation from unused space

b)

External fragmentation due to gaps between segments

c)

Paging overhead caused by variable sizes

d)

No issue occurs in memory allocation

87.

Non-volatile storage technologies vary in performance. NVMe relies on a fast interface and memory type to reduce latency. Identify the storage used by NVMe.

a)

Magnetic disk

b)

Flash memory

c)

Optical disk

d)

Tape

88.

Identify the correct YAML syntax:

a)

- name: task1 tasks: echo

b)

tasks: [task1]

c)

- name: task1 tasks: - shell: echo

d)

task1 => echo

89.

Which of the following is NOT a typical constraint for a hand-held operating system?

a)

Low memory footprint

b)

High power consumption

c)

Efficient I/O management

d)

Real-time performance

90.

An educational simulation shows resource allocation graphs and process states. What is a key learning outcome?

a)

Understand deadlock characterization and detection

b)

Learn CPU scheduling algorithms

c)

Understand memory paging

d)

Learn disk scheduling

91.

A paging system includes a page table that maps logical to physical addresses. When a page table becomes very large, how do operating systems typically manage the overhead of address translation?

a)

Use of cache to hold frequent pages

b)

Use of associative memory to map offsets

c)

Use of Translation Lookaside Buffer (TLB) to cache page table entries

d)

Increasing page size to reduce table entries

92.

Unix must free up disk blocks when files are deleted to reclaim storage. A specific system call handles the block release. Identify this function.

a)

free

b)

ifree

c)

alloc

d)

namei

93.

In Puppet, what is the function of 'ensure => present'?

a)

Ensures resource removal

b)

Checks if resource is active

c)

Ensures resource is installed

d)

Removes the resource

94.

Which system structure separates policy from mechanism and is highly portable?

a)

Monolithic kernel

b)

Microkernel

c)

Layered OS

d)

Hybrid kernel

95.

In database systems, a wait-for graph is used to

a)

Detect deadlocks

b)

Schedule queries

c)

Increase throughput

d)

Manage cache

96.

In a segmented-paging system, what steps are involved in converting a logical address into a physical address? Detail the specific translations that take place and the role of the segment and page tables in this process.

a)

Segment number → Offset → Frame

b)

Segment number → Page number → Offset → Frame

c)

Page number → Frame → Segment

d)

Logical → Physical block translation

97.

In AWS, a fully managed file storage service supports mounting shared file systems to EC2 with standard file access protocols. Select this storage option.

a)

S3

b)

Glacier

c)

EFS

d)

EBS

98.

Ansible works over which protocol by default?

a)

HTTP

b)

Telnet

c)

SSH

d)

FTP

99.

Which system call is used to terminate a process in Unix-like OS?

a)

kill()

b)

fork()

c)

exit()

d)

close()

100.

A multi-user system suffers from random resource requests causing deadlocks. Which prevention strategy is best?

a)

Resource ordering

b)

Allow hold and wait

c)

No preemption

d)

Increase CPU speed