WorksheetsOperating Systems Quiz
Total questions: 88
Worksheet time: 44mins
During runtime, an OS needs to decide which page to remove when memory is full. One technique is LRU, which uses history of access. How does LRU compare with FIFO in terms of performance and overhead?
FIFO is more accurate
LRU always faults more
LRU is more effective but complex
FIFO is based on future use
A user configures their system to use a very small page size in virtual memory settings. They notice that more pages are being loaded than before. What could be the trade-offs involved in using smaller pages?
More TLB hits
Lower fragmentation and more overhead
Better CPU utilization
Fewer page faults
In a virtual memory setup, the system allows shared memory pages between processes. How does this feature enhance system efficiency and what precautions must be taken to ensure consistency?
It increases isolation
Pages are never duplicated
Shared pages save memory but need synchronization
Every process has its own copy
A virtual address is passed to the OS during execution. The system uses paging with a TLB. If the required entry is not found in the TLB, the system checks the page table. What is this process known as, and what's the performance implication?
Cache hit
TLB miss and page walk
Segment fault
Stack overflow
A device that employs a rotating platter to perform data read and write operations is the Hard Disk Drive (HDD). Its operation involves spinning magnetic disks and moving read/write heads to access data.
SSD
RAM
Magnetic disk
Cache memory
During program execution, if a needed page is missing from main memory, the system experiences a page fault. This initiates a sequence wherein the operating system fetches the page from disk and loads it into available memory space.
A segmentation fault occurs
A page hit happens
A page fault is triggered
The process is terminated
A reliable page replacement algorithm employed in memory management is Least Recently Used (LRU). This technique optimizes performance by discarding the least accessed pages when new pages need to be loaded into memory.
FIFO
LRU
Optimal
All of the above
Thrashing results from an operating system's overreliance on swapping pages due to high memory contention. This leads to excessive disk I/O and reduced processing capacity, significantly impairing system performance.
High CPU utilization
Low I/O requests
Excessive page faults
Lack of CPU scheduling
The working set model defines the concept of maintaining a process's most recently and frequently used pages in memory. It serves as a dynamic measure to balance memory allocation and reduce page faults.
The total virtual memory used by all processes
The set of pages actively used by the process during a time window
The swap memory size
The main memory size
Hard Disk Drives (HDDs) are known for their use of spinning platters and movable read/write heads, enabling them to store and retrieve data mechanically as opposed to the flash-based storage used in SSDs.
SSD
RAM
Magnetic disk
Cache memory
In operating systems, demand paging is a memory management technique. What is the main benefit of employing demand paging compared to other paging methods?
Reduces memory usage
Improves CPU speed
Increases I/O operations
Reduces context switching
Page replacement plays a crucial role in memory management within operating systems. What is the fundamental advantage of utilizing a page replacement strategy?
Reduces memory usage
Improves CPU speed
Increases I/O operations
Reduces context switching
A database server frequently updates large files. You are considering ZFS with CoW. What is a potential downside of using ZFS here?
It compresses files too aggressively
CoW increases I/O for frequent overwrites
It deletes data without confirmation
It does not support large files
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?
Defragment the disk
Compress all remaining data
Delete the snapshots referencing those files
Update the pool configuration
You use Btrfs for your home directory. You enable automatic snapshots every hour. What must you monitor closely to avoid disk exhaustion?
Inode table
Number of open file handles
Available disk space due to snapshot retention
RAM usage
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?
XFS, due to its scalability
Btrfs, because it supports CoW, checksumming, and snapshots
ext4, due to high compatibility
XFS, because it supports journaling
On ZFS, after deleting a snapshot, disk usage suddenly drops by 5 GB. What likely happened?
ZFS rewrote the data
5 GB of previously held CoW data became unreferenced
ZFS moved data to another disk
Metadata was corrupted
A CoW file system writes small changes to large files. What strategy can help mitigate performance issues?
Avoid journaling
Use compression
Use recordsize tuning to match file block sizes
Increase checkpoint interval
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?
Fragmentation of the boot loader
High memory and CPU usage for deduplication tables
File permissions mismatch
CoW disabled for new files
Evaluating indexed allocation, what is a major disadvantage compared to contiguous allocation?
Complex bookkeeping
External fragmentation
Slow sequential access
High latency
Which allocation method would you recommend for a multimedia streaming service requiring fast sequential access?
Indexed
Contiguous
Linked
Sequential
HDFS follows a master-slave architecture. Which component acts as the master managing metadata?
DataNode
NameNode
Client
JobTracker
Which characteristic makes Ceph a suitable choice for cloud storage solutions?
Centralized control
Distributed and scalable
Limited to local networks
High latency
Which file allocation method leads to the simplest access calculation when reading a file?
Contiguous
Sequential
Indexed
Linked
Which distributed file system supports strong consistency and POSIX compliance?
HDFS
Ceph
GlusterFS
S3
Sequential allocation stores data blocks in order. What happens if a file grows beyond its allocated space?
File truncated
File relocated
External fragmentation
File extended contiguously
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.
namei
alloc
stat
free
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.
Block-level storage
Object storage
File system emulation
Database backups only
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.
NTFS
ext4
NFS
FAT32
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.
Seek time
Rotational delay
Interface latency
Memory swapping
Applications running on Google Cloud sometimes need high-performance file sharing via NFS. A managed service supports this requirement. Choose the suitable service.
Block storage
File sharing over NFS
Archival storage
Object storage
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.
File control block
File system interface
VFS
Buffer cache
A function in Unix file systems handles assigning a new inode when a file is created. This function is central to managing file metadata. Identify the correct operation.
Frees a file
Allocates an inode
Maps virtual address
Updates file permissions
AI disk scheduling optimizes performance by:
Ignoring requests
Using request prediction
Increasing cache size
Reducing disk speed
C-SCAN scheduling differs from SCAN by:
Only scanning forward
Using circular queue
Random access
Starvation prevention
Character devices usually do NOT support:
Sequential access
Buffered I/O
Random access
Byte-level access
AI disk scheduling models typically require:
Real-time manual input
Historical I/O patterns
Fixed scheduling rules
Static queue lengths
Device driver interrupts are used to:
Signal CPU for attention
Transfer data directly
Allocate memory
Manage file descriptors
Round Robin disk scheduling treats requests by:
Priority order
Equal time slices
Distance from head
Age of request
AI-based disk scheduling adapts better to:
Static workloads
Dynamic, changing loads
Minimal queue sizes
Fixed block sizes
AI-based disk scheduling adapts better to:
Static workloads
Dynamic, changing loads
Minimal queue sizes
Fixed block sizes
io_uring's asynchronous submission benefits servers by?
Increasing I/O throughput
Increasing CPU use
Increasing kernel load
Slowing response
Zero-copy in RDMA reduces what resource usage?
Bus bandwidth
Bus contention
Memory latency
CPU interrupts
DPDK is primarily implemented in which language?
C
Java
Python
Assembly
Batch submission in io_uring affects system calls how?
Reduces overhead
Increases overhead
Causes blocking
No effect
What occurs if RDMA is used on unsupported hardware?
Fallback to TCP/IP
Crash
Panic
Success
Multi-core use in DPDK affects throughput by?
Increasing throughput
Reducing throughput
Increasing latency
No change
io_uring benefits which workload type most?
High concurrency servers
Batch jobs
Single-threaded
Memory-bound
RDMA suits distributed storage due to?
Low latency and CPU use
High CPU load
Kernel buffering
Frequent context switches
Orchestration platform widely used for managing Docker-based microservices is:
Kubernetes
OpenStack
VMware ESXi
Hyper-V
Operational approach of Podman that eliminates daemon dependency is achieved by:
Remote API calls
Direct container execution
Use of Vagrant
Kernel modules
Functional responsibility of a hypervisor in a virtualized environment is to:
Configure BIOS
Manage virtual machine operations
Maintain user accounts
Monitor network bandwidth
Linux feature responsible for isolating network stack of individual containers is:
SELinux
Namespace
Cron job
System call interface
In containerized systems, the term namespace refers to:
OS bootloader
Kernel-level isolation unit
A Docker command
Memory mapping technique
Portability evaluation favors containers due to their:
Lightweight build
Easy packaging
Platform independence
All of the above
Linux tool used to manage services like Docker or Podman on systemd-based systems is:
init
systemctl
rc.local
launchd
Recommend a reliable method to recover a forgotten root password. It should preserve system integrity and allow access.
Reinstall system
Boot into single-user mode
Reset BIOS
Remove /etc/shadow
Select the command to monitor CPU and memory usage interactively. It helps identify system load and resource bottlenecks.
df
ls
top
touch
Identify the default shell assigned if not otherwise specified during user creation. It determines how commands are interpreted.
/bin/zsh
/bin/ksh
/bin/bash
/bin/dash
Highlight the location where login failures are typically logged in Linux. This is essential for security auditing.
/var/log/messages
/etc/passwd
/var/log/auth.log
/home/logs
Determine the result of using kill -9 on a process. It bypasses cleanup steps and forces termination.
Graceful exit
Blocked signal
Immediate kill
Delayed stop
Choose the best file for adding a static hostname permanently. This name identifies the machine on the network.
/etc/hostname
/etc/profile
/etc/bashrc
/etc/services
Recommend a security step to restrict SSH login to specific users. This improves controlled access.
Use netstat
Add firewall rule
Modify sshd_config AllowUsers
Change user shell
Given: a <- 5; b <- 3; a^b in R, what is the result?
8
125
15
5
What file must be edited to add a user on a cloud Linux server manually?
/etc/user
/etc/passwd
/user/pass
/add/user
What is the default configuration file for Ansible?
ansible.yaml
ansible.ini
ansible.cfg
config.ansible
In Puppet, which file contains node definitions?
manifests/site.pp
modules/init.pp
nodes.pp
default.pp
Which Ansible loop will execute a task 4 times?
loop: [1,2,3]
with_items: [1,2,3,4]
until: 4
loop: range(1,4)
You want to monitor server memory usage. Which tool is best for CLI cloud server?
vi
ps
top
cat
Ansible playbook returns "UNREACHABLE" status. What's likely the issue?
Wrong password
Port closed
No SSH access
All of the above
Each DNS query takes 5 ms. What's the total time for 400 queries?
20 s
2 s
200 ms
4000 ms
Create a logical table to resolve 5 hosts to their IPs using A records.
5 rows A records
1 MX record
5 NS records
1 SOA record
Design a local network plan with 3 services: DNS, DHCP, and Proxy.
Use different ports/IPs
Combine all
Ignore DHCP
Use one server
Which protocol is more reliable for DNS zone transfers?
UDP
TCP
ICMP
HTTP
Which is correct about recursive DNS queries?
Asks multiple servers
Stops at first
Always uses TCP
Can't resolve CNAME
Calculate usable IPs in a /28 subnet for DNS and DHCP use.
14
16
30
62
A local DNS server serves 500 hosts. Each sends 10 queries/day. Total daily?
5000
50,000
500
1000
A VM created using KVM is unable to boot. The log shows "No bootable device." What is the likely issue?
Missing display driver
Incorrect RAM allocation
No OS image attached
Overloaded host
Which command starts a virtual machine with a specified image using QEMU?
qemu-img run
qemu-system-x86_64
virt-install
kvm-load
What is the main difference between QEMU and KVM?
QEMU uses host virtualization, KVM uses software
QEMU is a container tool
QEMU is a hypervisor, KVM enables hardware acceleration
KVM runs on Windows only
A user creates a Docker container that includes an application and its libraries. When shared, the container runs identically on other systems. What cloud computing characteristic does this demonstrate?
Resource pooling
Measured service
Portability and consistency
Broad network access
In Xen architecture, what is Dom0?
A guest OS
An emulator
A privileged control domain
A disk partition
Which component manages guest VMs in Xen?
XenStore
DomU
Dom0
XenCloud
Which file is typically modified to configure a Xen VM?
/etc/xen.cfg
/etc/xen/.cfg
/var/xen.conf
/boot/xenfile.conf
A user installs Xen but guest VMs fail to start. Dom0 boots correctly. What's a likely cause?
Misconfigured fstab
No internet
Missing virtual disk config for guest
Incorrect DNS
A desktop processor runs at 3.5 GHz. Each instruction takes 2 cycles. What is max instruction throughput?
1.75 billion/sec
2 billion/sec
3.5 billion/sec
7 billion/sec
A desktop boots in 30 seconds. A mainframe takes 5 minutes. What's the % time difference?
9
10
11
7
A mainframe has 16 CPUs, each 4-core. How many logical processors?
64
32
48
16
