wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

OS Test 1

Total questions: 100

Worksheet time: 50mins

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.
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
3.
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
4.
A system using LFS writes 5 small files in rapid succession. What performance benefit can be expected compared to a traditional file system?
a)
Lower memory usage
b)
Reduced read latency
c)
Improved sequential write throughput
d)
Increased file fragmentation
5.
Primary deployment advantage of using containers over virtual machines is:
a)
Reduced reliability
b)
Consistent environments
c)
Dependence on GUI
d)
Manual resource scaling
6.
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
7.
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
8.
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
9.
You have a disk with 1 GB total space and LFS writes in segments of 1 MB each. Assume 60% of each segment becomes obsolete after a few updates.How much effective space will be available for new data after 500 segments are written (ignoring segment cleaning)?
a)
200 MB
b)
300 MB
c)
500 MB
d)
100 MB
10.
Storage driver most commonly used by Docker for efficient image layering is:
a)
ext4
b)
OverlayFS
c)
ZFS
d)
NTFS
11.
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
12.
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
13.
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
14.
An LFS writes a new version of a file every minute. Each version takes 4 KB. How many versions can fit in a 1 MB segment before the segment becomes full?
a)
64
b)
256
c)
128
d)
512
15.
Security frameworks like SELinux and AppArmor enforce container protection by:
a)
Logging access
b)
Encrypting filesystem
c)
Applying access control
d)
Blocking TCP traffic
16.
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
17.
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
18.
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
19.
A flash-based embedded system uses LFS. You notice system slowdowns during heavy writes.What would be the most effective optimization?
a)
Increase segment size
b)
Run garbage collection during idle times
c)
Disable segment cleaning
d)
Decrease checkpoint interval
20.
Startup latency comparison between containers and VMs indicates containers are:
a)
Slower to start
b)
Faster to start
c)
Equal in performance
d)
OS-independent
21.
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
22.
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
23.
Recommend an allocation strategy for minimizing fragmentation
a)
First Fit
b)
Worst Fit
c)
Best Fit
d)
Paging
24.
If each inode is 128 bytes and you need to manage 10,000 files, how much space is needed for just the inodes in LFS?
a)
1.28 MB
b)
128 KB
c)
10 MB
d)
512 KB
25.
Core component shared by all containers on a single host system is the:
a)
Shell
b)
Kernel
c)
User account
d)
Cron job
26.
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
27.
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
28.
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
29.
An LFS has 10 segments with the following live data percentages: [90, 10, 20, 80, 40, 30, 15, 95, 60, 50]. Which segments should the cleaner target first to reclaim space efficiently?
a)
Segments with > 50% live data
b)
Segments with < 50% live data
c)
Segments with 100% live data
d)
Segments in sequential order
30.
Docker command used for building container images from source files is:
a)
docker init
b)
docker build
c)
docker fork
d)
docker snapshot
31.
Spooling is primarily used to:
a)
Improve CPU throughput
b)
Manage printer I/O
c)
Optimize cache hits
d)
Avoid segmentation faults
32.
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
33.
Propose a method to optimize memory utilization in contiguous allocation
a)
Compaction
b)
Paging
c)
Segmentation
d)
None
34.
You are evaluating LFS and ext4 for a mobile OS. The workload is 90% writes and runs on NAND flash.Which system offers better long-term performance and endurance?
a)
ext4
b)
LFS
c)
Both are equal
d)
Depends on RAM size
35.
Podman's approach to security differs from Docker by enabling:
a)
Container root login
b)
Rootless execution
c)
Container encryption
d)
Daemon processes
36.
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
37.
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
38.
Number of 512-byte blocks allocated by malloc call of 4096 bytes
a)
4
b)
8
c)
6
d)
12
39.
In indexed allocation, what data structure is crucial for fast access to file blocks?
a)
Index block
b)
File descriptor
c)
Directory entry
d)
Inode
40.
Analyze the impact of runlevel misconfiguration. This may prevent proper system startup.
a)
Fails to boot GUI
b)
Disables sudo
c)
Corrupts filesystem
d)
Locks the BIOS
41.
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
42.
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
43.
Operation not performed by a linker
a)
Symbol resolution
b)
Code relocation
c)
Memory deallocation
d)
Address binding
44.
Analyze fragmentation: Which allocation type suffers the most from internal fragmentation?
a)
Contiguous
b)
Indexed
c)
Sequential
d)
None
45.
Evaluate the purpose of /etc/sudoers in user permission control. Misuse can compromise security.
a)
Stores passwords
b)
Grants root-like privileges
c)
Defines user limits
d)
Monitors user behavior
46.
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
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.
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
49.
What is the effect of replication factor in distributed file systems like Ceph and HDFS?
a)
Improves performance
b)
Reduces storage usage
c)
Increases fault tolerance
d)
Lowers latency
50.
Select the command that updates the system package list in Ubuntu. It ensures latest versions are checked.
a)
rpm update
b)
yum install
c)
apt update
d)
dpkg upgrade
51.
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
52.
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
53.
Number of physical memory copies of shared library used by 5 processes
a)
1
b)
2
c)
5
d)
Depends on OS
54.
In distributed file systems, which layer typically handles client requests for file operations?
a)
Metadata server
b)
Data node
c)
Client node
d)
Network interface
55.
Identify the result of incorrectly editing /etc/fstab. Mounting file systems may fail during boot.
a)
Blue screen
b)
Kernel panic
c)
Boot failure
d)
Login loop
56.
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
57.
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
58.
Allocation strategy resulting in largest leftover hole
a)
First Fit
b)
Best Fit
c)
Worst Fit
d)
Next Fit
59.
Evaluate the impact of contiguous allocation on file deletion and creation speed.
a)
Faster
b)
Slower
c)
No effect
d)
Depends on file size
60.
Propose a reason why system logs must be rotated. It ensures storage availability and log readability.
a)
Prevent user lock
b)
Block login attempts
c)
Avoid disk overflow
d)
Speed up GUI
61.
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
62.
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
63.
Allocation method failing if 700 KB requested but only 600 KB contiguous
a)
Segmentation
b)
Paging
c)
Demand Paging
d)
Contiguous Allocation
64.
Ceph uses a distributed hash table. What is the primary purpose of this structure?
a)
Data encryption
b)
Data location and lookup
c)
File compression
d)
Data replication
65.
Identify the command that shows all active network interfaces. Useful in troubleshooting network connectivity.
a)
ifconfig
b)
ping
c)
route
d)
host
66.
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
67.
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
68.
Main advantage of dynamic linking over static linking
a)
Faster execution
b)
Smaller executable size
c)
Reduced compile time
d)
Increased memory use
69.
Which allocation method is most space-efficient for small files with random access?
a)
Contiguous
b)
Sequential
c)
Indexed
d)
Linked
70.
Highlight the risk of granting sudo access to all users. This compromises the principle of least privilege.
a)
Fast boot
b)
Increased security
c)
Unauthorized access
d)
Enhanced logging
71.
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
72.
If system is in an unsafe state, is it deadlocked?
a)
No
b)
Yes
c)
Always
d)
Cannot say
73.
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
74.
Network file access can be achieved through several protocols. One major benefit of NFS compared to FTP is its design to maintain no client state. Identify this feature.
a)
Secure login
b)
Stateless communication
c)
File compression
d)
Authentication
75.
What output does factorial <- function(n){if(n==1)return(1);return(n*factorial(n-1))}; factorial(5) produce in R?
a)
15
b)
120
c)
60
d)
720
76.
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
77.
4 processes, 2 instances of a resource. All request 1 instance. Deadlock?
a)
No
b)
Yes
c)
Maybe
d)
Always
78.
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
79.
Operating systems may support different file systems like ext4, FAT32, or NTFS. One abstraction layer allows uniform access across them. Identify this layer.
a)
Implements disk I/O
b)
Manages CPU registers
c)
Provides abstraction over multiple FS
d)
Handles process scheduling
80.
What is the full path to Ansible's default inventory file?
a)
/etc/ansible/hosts
b)
/home/ansible/hosts
c)
/etc/ansible.cfg
d)
/var/ansible/hosts
81.
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
82.
Total R = 12, allocated = 8. Max = [7,5,3], Allocation = [2,2,2]. Available?
a)
4
b)
3
c)
2
d)
1
83.
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
84.
Data-intensive applications such as machine learning benefit from a particular memory type that combines speed and persistence. Identify the suitable storage medium.
a)
HDD
b)
Optical Disk
c)
Persistent Memory
d)
Tape
85.
What is the purpose of id command in Linux cloud server?
a)
Shows UID/GID
b)
Lists users
c)
Kills processes
d)
Renames users
86.
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.
87.
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
88.
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
89.
Unix uses a command or function to release inode structures when they are no longer in use. This mechanism helps reclaim resources. Identify it.
a)
Free memory
b)
Free an inode
c)
Free buffer cache
d)
Release file descriptor
90.
Which command installs Ansible on Ubuntu?
a)
sudo yum install ansible
b)
sudo apt install ansible
c)
install ansible
d)
get ansible
91.
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
92.
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
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.
A fully managed service in Google Cloud Platform provides scalable file storage compatible with NFS. It is used with VMs and containers. Choose the correct service.
a)
Azure Files
b)
Google Filestore
c)
Dropbox
d)
Box
95.
In R, what does sum(c(2, 4, 6)) return?
a)
6
b)
12
c)
10
d)
2
96.
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
97.
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
98.
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
99.
Buffer cache in Unix stores frequently accessed file blocks in memory to improve system performance.
a)
Speeds up file system access
b)
Increases CPU speed
c)
Reduces network traffic
d)
Caches DNS queries
100.
How is a Puppet manifest file extension denoted?
a)
.json
b)
.pp
c)
.puppet
d)
.dsl