wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

OS Test 2

Total questions: 100

Worksheet time: 50mins

Name
Class
Date
1.
In batch systems, turnaround time is:
a)
Higher than interactive systems
b)
Lower than real-time systems
c)
Similar to multiprogramming
d)
Not measurable
2.
Which of the following mechanisms is essential to allow cooperating processes to avoid conflicting access to shared resources?
a)
Memory paging
b)
Context switching
c)
Synchronization primitives (e.g., mutex, semaphore)
d)
Swapping
3.
Number of swaps if 8 processes use 1 swap-in and 1 swap-out
a)
8
b)
16
c)
12
d)
10
4.
A database server frequently updates large files. You are considering ZFS with CoW.What is a potential downside of using ZFS here?
a)
It compresses files too aggressively
b)
CoW increases I/O for frequent overwrites
c)
It deletes data without confirmation
d)
It does not support large files
5.
Orchestration platform widely used for managing Docker-based microservices is:
a)
Kubernetes
b)
OpenStack
c)
VMware ESXi
d)
Hyper-V
6.
Which OS type offers immediate feedback to the user?
a)
Batch
b)
Time-sharing
c)
Real-time
d)
Interactive
7.
A system uses semaphores to coordinate access between two cooperating processes. If both wait on the same semaphore before signaling, what will likely happen?
a)
Increased CPU utilization
b)
Starvation
c)
Deadlock
d)
Better memory sharing
8.
Interpret swap performance if swap time = 30 ms, I/O latency = 10 ms
a)
40 ms
b)
20 ms
c)
30 ms
d)
50 ms
9.
You run a ZFS pool with snapshots. You delete many large files but see no disk space increase.What action will truly free the space?
a)
Defragment the disk
b)
Compress all remaining data
c)
Delete the snapshots referencing those files
d)
Update the pool configuration
10.
Operational approach of Podman that eliminates daemon dependency is achieved by:
a)
Remote API calls
b)
Direct container execution
c)
Use of Vagrant
d)
Kernel modules
11.
A batch system executes 20 jobs in 100 minutes. What is the average turnaround time?
a)
4 min
b)
5 min
c)
10 min
d)
20 min
12.
What must be shared between cooperating processes for inter-process communication (IPC) via shared memory?
a)
Physical memory
b)
File descriptors
c)
A designated region of logical memory
d)
The CPU registers
13.
Plan allocation of 5 processes: 100 KB, 200 KB, 150 KB, 250 KB, 300 KB in 1.5 MB
a)
All fit
b)
One left
c)
Two left
d)
All don’t fit
14.
You use Btrfs for your home directory. You enable automatic snapshots every hour.What must you monitor closely to avoid disk exhaustion?
a)
Inode table
b)
Number of open file handles
c)
vailable disk space due to snapshot retention
d)
RAM usage
15.
Functional responsibility of a hypervisor in a virtualized environment is to:
a)
Configure BIOS
b)
Manage virtual machine operations
c)
Maintain user accounts
d)
Monitor network bandwidth
16.
Spooling overlaps:
a)
I/O and computation
b)
CPU and memory
c)
Cache and RAM
d)
Processes and threads
17.
In a pipeline of cooperating processes (e.g., Unix shell pipeline), what ensures that the output of one process is correctly fed into the input of the next?
a)
Process priority
b)
I/O redirection and pipe mechanisms
c)
Semaphores
d)
Shared memory
18.
Devise a method to reduce swap-in time in modern systems
a)
SSDs
b)
HDDs
c)
Optical disks
d)
Tape drives
19.
You're building a secure file server with rollback and integrity features. You must choose between Btrfs, ext4, and XFS.Which is the best option and why?
a)
XFS, due to its scalability
b)
Btrfs, because it supports CoW, checksumming, and snapshots
c)
ext4, due to high compatibility
d)
XFS, because it supports journaling
20.
Linux feature responsible for isolating network stack of individual containers is:
a)
SELinux
b)
Namespace
c)
Cron job
d)
System call interface
21.
What is the key benefit of multiprogramming?
a)
Maximizing I/O usage
b)
Reducing memory
c)
Increasing CPU utilization
d)
Avoiding deadlocks
22.
Two processes on the same system need to exchange large amounts of data with low latency. Which IPC method is most efficient for this use case?
a)
Signals
b)
Message Passing
c)
Shared Memory
d)
Pipes
23.
Evaluate swapping as a solution to memory overcommitment
a)
Effective
b)
Inefficient
c)
Obsolete
d)
Slower
24.
On ZFS, after deleting a snapshot, disk usage suddenly drops by 5 GB. What likely happened?
a)
ZFS rewrote the data
b)
5 GB of previously held CoW data became unreferenced
c)
ZFS moved data to another disk
d)
Metadata was corrupted
25.
In containerized systems, the term namespace refers to:
a)
OS bootloader
b)
Kernel-level isolation unit
c)
A Docker command
d)
Memory mapping technique
26.
In a batch system, if each job takes 2 minutes of CPU and 8 minutes of I/O, what is the CPU utilization for a single job?
a)
0.2
b)
0.25
c)
0.8
d)
0.4
27.
Process A sends a message to Process B through a message queue, but Process B is not yet running. What happens to the message?
a)
It is lost
b)
It is stored in the queue until B reads it
c)
It is sent to another process
d)
It raises a system error
28.
Which strategy will cause the least external fragmentation?
a)
First Fit
b)
Best Fit
c)
Paging
d)
Worst Fit
29.
A CoW file system writes small changes to large files.What strategy can help mitigate performance issues?
a)
Avoid journaling
b)
Use compression
c)
Use recordsize tuning to match file block sizes
d)
Increase checkpoint interval
30.
Portability evaluation favors containers due to their:
a)
Lightweight build
b)
Easy packaging
c)
Platform independence
d)
All of the above
31.
A mainframe handles 1000 transactions/sec and supports 50 users. What is the average transactions per user per sec?
a)
20
b)
25
c)
15
d)
30
32.
A developer needs to enable communication between processes on different machines over a network. Which IPC method should they choose?
a)
Shared Memory
b)
Named Pipes
c)
Signals
d)
Sockets
33.
Estimate number of 128 KB processes that fit in 2 MB RAM
a)
16
b)
12
c)
10
d)
18
34.
You enable deduplication in ZFS on a dataset with many duplicate files. After enabling it, the system becomes slow.What could be the cause of the performance degradation?
a)
Fragmentation of the boot loader
b)
High memory and CPU usage for deduplication tables
c)
File permissions mismatch
d)
CoW disabled for new files
35.
Linux tool used to manage services like Docker or Podman on systemd-based systems is:
a)
init
b)
systemctl
c)
rc.local
d)
launchd
36.
A system with 10 servers processes 1000 requests/sec total. If load is equally balanced, how many requests per server?
a)
100
b)
1000
c)
10
d)
50
37.
In a bounded buffer system, a producer increments the full semaphore before adding an item to the buffer. What problem can this lead to?
a)
Increased buffer size
b)
Deadlock
c)
The consumer might read incomplete data
d)
Starvation of the producer
38.
Size of external fragmentation if free memory is 1000 KB and largest block 700 KB
a)
300 KB
b)
1000 KB
c)
700 KB
d)
0 KB
39.
Evaluating indexed allocation, what is a major disadvantage compared to contiguous allocation?
a)
Complex bookkeeping
b)
External fragmentation
c)
Slow sequential access
d)
High latency
40.
Recommend a reliable method to recover a forgotten root password. It should preserve system integrity and allow access.
a)
Reinstall system
b)
Boot into single-user mode
c)
Reset BIOS
d)
Remove /etc/shadow
41.
A distributed system uses vector clocks with 8 processes. What is minimum size of vector clock?
a)
8
b)
1
c)
4
d)
16
42.
A student implements a solution to the dining philosophers problem using semaphores. Occasionally, all philosophers pick up their left fork and wait for the right one, leading to no progress. What problem is this?
a)
Starvation
b)
Race condition
c)
Deadlock
d)
Mutual exclusion failure
43.
Time complexity to search free block in Best Fit (unsorted list)
a)
O(1)
b)
O(n)
c)
O(log n)
d)
O(n^2)
44.
Which allocation method would you recommend for a multimedia streaming service requiring fast sequential access?
a)
Indexed
b)
Contiguous
c)
Linked
d)
Sequential
45.
Select the command to monitor CPU and memory usage interactively. It helps identify system load and resource bottlenecks.
a)
df
b)
ls
c)
top
d)
touch
46.
If network bandwidth is 1 Gbps and file size to transfer is 100 MB, how long will transfer take ignoring overhead?
a)
0.8 seconds
b)
0.1 seconds
c)
1.2 seconds
d)
0.4 seconds
47.
In an operating system simulation, a binary semaphore is used to protect a shared variable. Two processes call wait() simultaneously, and one enters the critical section. What happens to the other?
a)
It enters immediately
b)
It overwrites the variable
c)
It blocks until signal() is called
d)
It crashes
48.
Address binding technique with max flexibility in relocation
a)
Compile-time
b)
Load-time
c)
Execution-time
d)
Static-time
49.
HDFS follows a master-slave architecture. Which component acts as the master managing metadata?
a)
DataNode
b)
NameNode
c)
Client
d)
JobTracker
50.
Identify the default shell assigned if not otherwise specified during user creation. It determines how commands are interpreted.
a)
/bin/zsh
b)
/bin/ksh
c)
/bin/bash
d)
/bin/dash
51.
A distributed database replication lag is 200 ms. If writes per second are 500, what is max stale data duration?
a)
0.4 seconds
b)
0.2 seconds
c)
1 second
d)
2 seconds
52.
A traffic intersection uses semaphores to allow only one car from each direction to pass at a time. What property of semaphores is being utilized here?
a)
Starvation control
b)
Deadlock detection
c)
Mutual exclusion
d)
Priority inversion
53.
Physical address for segment starting at 4000 with offset 100
a)
4100
b)
4000
c)
6000
d)
4600
54.
Which characteristic makes Ceph a suitable choice for cloud storage solutions?
a)
Centralized control
b)
Distributed and scalable
c)
Limited to local networks
d)
High latency
55.
Highlight the location where login failures are typically logged in Linux. This is essential for security auditing.
a)
/var/log/messages
b)
/etc/passwd
c)
/var/log/auth.log
d)
/home/logs
56.
For a quorum system with N=15 nodes, write quorum size is 10, read quorum size is 6. Is the system consistent?
a)
Yes
b)
No
c)
Depends
d)
Cannot tell
57.
In a system with multiple consumers and a single producer, the producer forgets to signal() after producing. What is the result?
a)
Consumers process stale data
b)
Consumers remain blocked indefinitely
c)
Producer gets blocked
d)
Data is processed twice
58.
Operation not happening during dynamic linking
a)
Runtime loading
b)
Resolving function addresses
c)
Compile-time linking
d)
Memory sharing
59.
Which file allocation method leads to the simplest access calculation when reading a file?
a)
Contiguous
b)
Sequential
c)
Indexed
d)
Linked
60.
Determine the result of using kill -9 on a process. It bypasses cleanup steps and forces termination.
a)
Graceful exit
b)
Blocked signal
c)
Immediate kill
d)
Delayed stop
61.
A distributed consensus protocol requires 2/3 of nodes to agree. For 30 nodes, what is minimum number of nodes required?
a)
20
b)
10
c)
15
d)
25
62.
In a student project, semaphores are used without mutexes in a producer-consumer system. Items are added and removed correctly, but occasionally the buffer gets corrupted. Why?
a)
Semaphores automatically manage memory
b)
Semaphore count was incorrect
c)
No mutual exclusion during actual buffer access
d)
Too many consumers are running
63.
Memory allocation splitting 2048 KB into four 512 KB blocks
a)
First Fit
b)
Best Fit
c)
Buddy System
d)
Paging
64.
Which distributed file system supports strong consistency and POSIX compliance?
a)
HDFS
b)
Ceph
c)
GlusterFS
d)
S3
65.
Choose the best file for adding a static hostname permanently. This name identifies the machine on the network.
a)
/etc/hostname
b)
/etc/profile
c)
/etc/bashrc
d)
/etc/services
66.
A cluster has 5 nodes, each with 8 cores running at 2.5 GHz. What is total processing capacity in GHz?
a)
100 GHz
b)
40 GHz
c)
10 GHz
d)
50 GHz
67.
In the Producer-Consumer problem, if the producer adds data to the buffer without checking whether the buffer is full, what issue might occur?
a)
Data gets duplicated
b)
The buffer may overflow and corrupt memory
c)
Consumer will read faster
d)
Producer gets blocked
68.
Component responsible for address translation
a)
Linker
b)
Loader
c)
MMU
d)
Scheduler
69.
Sequential allocation stores data blocks in order. What happens if a file grows beyond its allocated space?
a)
File truncated
b)
File relocated
c)
External fragmentation
d)
File extended contiguously
70.
Recommend a security step to restrict SSH login to specific users. This improves controlled access.
a)
Use netstat
b)
Add firewall rule
c)
Modify sshd_config AllowUsers
d)
Change user shell
71.
In a multi-layered OS, communication between layers is performed through:
a)
Registers
b)
Stack
c)
Interface protocols
d)
Shared memory
72.
In a system using Banker's Algorithm, a process requests resources that make the system move from a safe state to an unsafe state. Which of the following best describes the action taken by the algorithm?
a)
The request is granted immediately
b)
The request is denied until safe state is guaranteed
c)
The process is terminated
d)
The system enters deadlock
73.
A paged memory system has a page size of 4KB. If a program requires 18.5KB of memory, how much internal fragmentation occurs, and why does it happen? Consider how the memory is divided into pages and how the leftover space is managed.
a)
1.5KB of internal fragmentation
b)
2.0KB of external fragmentation
c)
3.5KB of internal fragmentation
d)
No fragmentation occurs
74.
Unix must locate files using their paths. A mechanism is used to convert these paths into actual file references using inodes. Select this path translation tool.
a)
namei
b)
alloc
c)
stat
d)
free
75.
Given: a <- 5; b <- 3; a^b in R, what is the result?
a)
8
b)
125
c)
15
d)
5
76.
A system has 3 tasks with utilization 0.3, 0.25, and 0.2. Is it schedulable under RMS?
a)
No
b)
Yes, total utilization < 1
c)
Yes, utilization < ln(2)
d)
Yes, utilization < bound for 3 tasks
77.
Which of the following strategies involves ordering resource types numerically and requiring processes to request resources in increasing order to prevent deadlock?
a)
Deadlock detection
b)
Deadlock avoidance
c)
Deadlock prevention by resource ordering
d)
Deadlock recovery
78.
In segmentation, consider a system where each segment has a maximum size of 4MB, and a process attempts to access an address beyond this limit in segment 2. What will the system do in response, and what type of error or exception is typically raised?
a)
Triggers a page fault
b)
Wraps the address around in the segment
c)
Raises a segmentation fault
d)
Allows access to overflow address
79.
Storing images, videos, logs, and other unstructured data at scale is a cloud challenge. One Azure service is optimized for such use. Identify the appropriate storage solution.
a)
Block-level storage
b)
Object storage
c)
File system emulation
d)
Database backups only
80.
What file must be edited to add a user on a cloud Linux server manually?
a)
/etc/user
b)
/etc/passwd
c)
/user/pass
d)
/add/user
81.
Which of the following is true about the microkernel design?
a)
Kernel provides all services including device drivers
b)
Services run in user space
c)
File system is part of the kernel
d)
All services run in kernel mode
82.
A system runs multiple processes that share a printer and a scanner, both available in only one instance each. The OS uses a deadlock prevention approach that disallows hold and wait by requiring processes to request all required resources at once. What is a possible drawback of this approach?
a)
It increases the likelihood of deadlock
b)
It may lead to low resource utilization and process starvation
c)
It makes deadlock detection easier
d)
It requires complex resource ordering
83.
A system uses segmentation with paging where each segment has 4 pages, and each page is 2KB in size. What is the maximum size of each segment, and how does this architecture impact logical address division?
a)
4KB per segment, simple address translation
b)
6KB per segment, complex structure
c)
8KB per segment, efficient logical mapping
d)
16KB per segment, improved memory flexibility
84.
In Unix, users can share files over a network using a file-sharing protocol. This protocol allows access with minimal client-side state. Identify the protocol.
a)
NTFS
b)
ext4
c)
NFS
d)
FAT32
85.
What is the default configuration file for Ansible?
a)
ansible.yaml
b)
ansible.ini
c)
ansible.cfg
d)
config.ansible
86.
Why is preemption important in real-time OS?
a)
It saves battery
b)
It ensures memory isolation
c)
It allows meeting deadlines by suspending lower priority tasks
d)
It enables system boot
87.
Consider a resource allocation graph with a cycle. Which of the following statements is true?
a)
If there is a cycle, deadlock must exist
b)
If there is a cycle, deadlock may or may not exist depending on resource instances
c)
Cycle indicates safe state
d)
Cycle is unrelated to deadlock
88.
Consider the scenario of using a single-level page table in a 32-bit system with 4KB pages. If the virtual address space is large, what is a major limitation of this scheme and how do multi-level page tables address this limitation?
a)
It increases internal fragmentation
b)
It reduces TLB hit ratio
c)
It consumes a lot of memory and multi-level paging reduces this
d)
It increases external fragmentation
89.
NVMe achieves fast response times by minimizing specific types of delays. It is particularly optimized for improving responsiveness in storage operations. Identify the latency type.
a)
Seek time
b)
Rotational delay
c)
Interface latency
d)
Memory swapping
90.
In Puppet, which file contains node definitions?
a)
manifests/site.pp
b)
modules/init.pp
c)
nodes.pp
d)
default.pp
91.
Which of the following is NOT typically considered part of the kernel in OS design?
a)
Scheduler
b)
Memory manager
c)
File manager
d)
Web browser
92.
In deadlock detection algorithms, which of the following data structures is typically used to represent resource allocation and requests?
a)
Wait-for graph
b)
Binary search tree
c)
Stack
d)
Queue
93.
Assume a system uses segmentation, and a program has five segments: text, data, BSS, heap, and stack. How does segmentation improve memory access control in this case, and which segment characteristics allow protection enforcement?
a)
Only BSS is protected
b)
Text is read-only; others vary in access
c)
Stack has no boundaries; heap is read-only
d)
Heap is executable; text is writable
94.
Applications running on Google Cloud sometimes need high-performance file sharing via NFS. A managed service supports this requirement. Choose the suitable service.
a)
Block storage
b)
File sharing over NFS
c)
Archival storage
d)
Object storage
95.
Which Ansible loop will execute a task 4 times?
a)
loop: [1,2,3]
b)
with_items: [1,2,3,4]
c)
until: 4
d)
loop: range(1,4)
96.
Which memory management technique can lead to external fragmentation?
a)
Paging
b)
Segmentation
c)
Fixed partitioning
d)
Stack allocation
97.
Which one of the following is NOT a method of handling deadlocks?
a)
Deadlock avoidance
b)
Deadlock detection and recovery
c)
Deadlock prevention
d)
Resource preemption without process rollback
98.
In paging, each process has its own page table. What are the implications of this for context switching, and how does it affect memory access efficiency when switching between processes?
a)
Context switching becomes slower due to large tables
b)
It simplifies memory access across processes
c)
It reduces the size of physical memory needed
d)
All processes share a single page table
99.
File operations like open, close, and read are provided to users by a specific OS layer. This layer interfaces with underlying file systems. Identify the responsible layer.
a)
File control block
b)
File system interface
c)
VFS
d)
Buffer cache
100.
You want to monitor server memory usage. Which tool is best for CLI cloud server?
a)
vi
b)
ps
c)
top
d)
cat