WorksheetsOS UNIT-1 PVPSIT
Total questions: 80
Worksheet time: 40mins
Which statement best captures one primary purpose of an operating system?
Eliminate all user errors automatically
Increase raw processor clock frequency
Transform compiled code into machine hardware
Provide a convenient program execution environment
What role does an operating system play in resource allocation?
Schedules network packets across routers
Distributes hardware resources fairly and efficiently
Encrypts all stored data by default
Compiles programs into binary executables
Which control function is commonly attributed to an operating system?
Supervision of program execution to prevent errors
Automatic debugging of all source code
Dynamic overclocking of the CPU cores
Guaranteed elimination of I/O latency
Why might a GUI be considered to “waste” CPU cycles on a single-user system?
It blocks access to system memory permanently
It forces all programs to run in kernel mode
It disables multitasking on modern processors
It prioritizes user interaction over raw utilization
In a single-user system, what is the recommended optimization goal for the operating system?
Maximize server throughput
Maximize compiler optimization
Maximize usability for the user
Minimize network jitter
Which statement best explains why a system that appears to “waste” resources might not be wasteful?
Higher CPU usage guarantees faster performance
All resources should remain idle to prevent wear
Improved interaction can enhance overall efficiency
Unused cycles always reduce battery drain
What is the main difficulty in designing a real-time operating system?
Meeting fixed time constraints for tasks
Achieving the highest benchmark scores
Providing perfect graphical fidelity
Supporting unlimited concurrent users
If a real-time task misses its deadline, what is a likely consequence for the system?
Increased screen resolution for graphics
Automatic rescheduling with no impact
Compilation of tasks into faster binaries
Breakdown of the entire system behavior
Which pair of functions together describes OS control responsibilities mentioned in the material?
Supervision of execution and I/O device management
Packet routing and network cable testing
Application design and code refactoring
Battery calibration and power-supply design
Which scenario best justifies allowing apparent resource “waste” on a desktop OS?
Enabling rich GUI features to improve user experience
Disabling virtual memory to reduce disk usage
Running all tasks in real mode for simplicity
Reducing thread counts to avoid context switches
Which statement best describes why kernel mode enforces protection of critical resources?
Kernel mode runs slower than user mode for safety
Kernel mode disables all device communication
User mode lacks access to certain CPU instructions
User mode has larger memory than kernel mode
Which operation is typically restricted to kernel mode to protect hardware devices?
Reading the wall-clock time
Issuing a user-level function call
Accessing an I/O device
Starting an application process
Which of the following is a privileged instruction that should not execute in user mode?
Read the clock
Issue a trap instruction
Switch from kernel to user mode
Modify entries in device-status table
What is the primary reason interrupts can be enabled or disabled only in kernel mode?
To prevent untrusted code from blocking critical events
Because user programs always run faster
To save battery on mobile devices
Because hardware cannot signal in user mode
Which operation can be safely performed in user mode?
Set value of timer
Clear memory globally
Turn off interrupts
Issue a trap instruction
Why might embedding popular applications inside an operating system be argued against?
It prevents kernel-mode execution entirely
It guarantees better performance for all apps
It reduces memory fragmentation only
It introduces security vulnerabilities and bloat
Which capability difference between kernel and user mode most limits what CPU can do in user mode?
Different compiler optimizations
Larger virtual address space in kernel mode
Higher cache latency in user mode
Restricted execution of certain instructions
Choose the list that contains only privileged operations.
Read clock, issue trap, start thread
Set timer, clear memory, access I/O
Open file, print text, create socket
Increment variable, branch, call function
If a user-mode program could disable interrupts, what risk would most likely occur?
Virtual memory would stop mapping pages
Cache would become permanently incoherent
System could miss critical device events
Files would always open read-only
Which design benefit is cited in favor of including applications within the operating system?
Simpler distinction between modes
Automatic hardware compatibility
Guaranteed elimination of security flaws
Better access to kernel features for performance
Which difficulty arises when an operating system stores sensitive data in unprotected memory while using a protected OS partition?
User mode cannot call device drivers directly
Kernel timers fail due to lost interrupts
Unauthorized access to OS data becomes possible
Cache lines evict faster components’ data
What is one possible use of CPUs that support more than two modes of operation?
Guarantee real-time scheduling for all threads
Provide finer-grained security among user groups
Increase disk cache size beyond main memory
Eliminate the need for kernel and user modes
A CPU has multiple user modes distinguishing groups. What capability could this enable?
Users in the same group execute each other’s code
USB devices bypass all driver software
Caches automatically synchronize component clocks
Timers never need periodic interrupts
How could USB device drivers benefit from an additional CPU mode besides user and kernel?
Store passwords inside device firmware
Run in a quasi-user/kernel mode for service
Replace hardware interrupts with polling
Avoid consistency between cache and components
Which approach can a program use to compute current time using timer interrupts?
Continuously busy-wait and count loop iterations
Set a future timer, sleep, update state on interrupt
Query disk controller for timestamp values
Use cache size to store the latest clock ticks
When using timer interrupts to track time, what repeated process helps maintain accuracy?
Continually set interrupts and update local state
Increase CPU modes until drift is eliminated
Flush caches each time data is exchanged
Switch USB drivers to kernel-only execution
Why are caches useful when two components transfer data at differing speeds?
They eliminate the need for interrupts entirely
They buffer with intermediate speed between components
They convert all devices to identical clock rates
They move operating system into protected memory
What problem do caches help solve in multi-component systems?
Preventing USB devices from loading drivers
Creating new CPU execution privilege levels
Guaranteeing monotonic timer scheduling
Bridging speed mismatch during data transfers
What is a key requirement for data stored in a cache relative to component data?
Maintain consistency with component data
Be encrypted with kernel-only keys
Use only user-mode read operations
Remain longer than all disk blocks
If a cache were made as large as the device it caches, what remains a concern?
Reducing CPU modes to a single level
Keeping cached data consistent with device
Running drivers entirely in user space
Eliminating all timer interrupts forever
Which statement best characterizes the client-server model in distributed systems?
Roles are fluid without strict separation
Nodes act as peers with equal responsibilities
Clients request services that servers provide
Any node may serve or request for others
In a peer-to-peer model, how are the roles of nodes typically defined?
Strictly as clients and servers only
As peers that may act as client or server
Clients cannot provide services to others
Only servers provide services to clients
Which scenario best illustrates client-server behavior in the recipe-sharing example?
All recipes stored on a central server node
A node requests a recipe from any peer node
Peers exchange recipes without a central role
Recipes stored on every node equally
What is a key property of peer nodes in the peer-to-peer recipe system?
They can only store local recipes
They may both request and provide recipes
They always forward requests to a server
They never communicate directly with peers
Which issue arises when a cached datum changes in a multiprocessor system?
No update is needed anywhere
All caches must be invalidated instantly
Only main memory needs modification
The cache containing the datum must be updated
Under what conditions can a component be eliminated by an equal-sized cache?
Component retains data only when powered
Cache and component have equal state-saving capacity
Cache is larger but slower than component
Cache is cheaper but volatile only
Why is cache retention after power removal relevant?
It ensures data persists without electricity
It increases network throughput
It speeds up cache write operations
It lowers the cost of faster storage
What affordability trade-off is noted regarding caches?
Equal-sized caches are universally economical
Faster storage tends to be more expensive
Cheaper caches are always faster
Slow storage tends to be unaffordable
In peer-to-peer systems, what may a node do besides requesting a service?
Provide a service to other peers
Act only as a client forever
Forward requests to a central server
Reject all incoming peer requests
What distinction is emphasized in the client-server model?
Fluid node roles without separation
Decentralized storage of all data
Random selection of service providers
Strict roles separating client and server
What is the primary purpose of system calls in an operating system?
Allow user processes to request OS services
Encrypt inter-process messages for security
Schedule processes using preemptive algorithms
Provide device drivers direct hardware control
Which statement best describes the role of a command interpreter (shell)?
Reads commands and invokes system calls
Compiles kernel modules dynamically
Maintains the process table entries
Implements virtual memory paging
Why is the command interpreter usually separate from the kernel?
It stores user passwords securely
It changes frequently compared to kernel
It must run in privileged kernel mode
It requires hardware interrupts to execute
On UNIX systems, which pair of system calls starts a new process from a shell?
init() followed by kill()
spawn() followed by wait()
open() followed by read()
fork() followed by exec()
What does fork() do when invoked by a running process?
Overlays memory with a new executable
Terminates the parent process immediately
Clones the current executing process
Allocates a new kernel thread only
What is the effect of exec() after a successful fork()?
Flushes all open file descriptors
Creates an additional child process copy
Replaces the process image with executable
Switches the process to kernel-only mode
How are system programs characterized in relation to system calls?
Bundles of useful system calls
Independent of kernel interfaces
Primarily graphics libraries
Exclusive to device manufacturers
What benefit do system programs provide to users?
Direct access to hardware registers
Guaranteed real-time performance
Basic functionality without writing code
Automatic recovery from kernel panics
What is a main advantage of a layered OS design?
Guarantees zero latency interrupts
Eliminates need for system calls
Faster context switching overall
Easier debugging and modification
Which is a potential disadvantage of layered OS design?
Potential performance overhead across layers
Inability to port between architectures
Lack of modularity in components
No support for multiuser environments
Which operating-system service ensures a program’s code is loaded into memory and begins running?
Program execution
I/O operations
Communications
Error detection
File manipulation
Which service manages low-level interactions with disks, tapes, and devices through controller-specific commands?
File manipulation
Error detection
Communications
Program execution
I/O operations
Which service handles creation, deletion, naming, allocation, and deallocation of files and blocks?
Program execution
File manipulation
Communications
Error detection
I/O operations
Which service turns messages into packets, sends them over a medium, and reassembles them at the destination?
File manipulation
Error detection
Program execution
I/O operations
Communications
At which levels does error detection occur according to the described operating-system service?
Compiler and linker
Network only
Hardware and software
Application only
Firmware only
Why can’t user-level programs be trusted to allocate CPU time properly during program start?
They lack scheduling control
They have excess memory
They cannot create files
They reorder packets
They detect all hardware faults
Which statement best explains why user programs should not access devices directly?
They always run faster
They might bypass protection
They cannot open files
They guarantee integrity checks
They eliminate packet loss
During file deletion, which step ensures previously allocated blocks become available?
Allocating CPU quanta
Formatting controller tapes
Deallocating file blocks
Caching device registers
Reordering network packets
Which duty in communications requires coordination to avoid packets meant for other processes?
CPU register saving
Disk head scheduling
File renaming policy
Media consistency checks
Device access control
What global responsibility must the operating system perform when errors are process-independent, such as disk corruption?
Centralized error handling
User-level packet routing
Application-managed storage
Direct device programming
Per-file CPU allocation
Which scenario most justifies storing an operating system in firmware rather than on disk?
Laptop with multiple hard drives installed
Desktop with a large RAID array configured
Embedded device without a usable file system
Server using network-attached storage volumes
What is the primary role of a boot manager during system startup?
Load user applications into main memory
Encrypt the boot sector for security
Scan hardware devices for drivers
Select which operating system to boot
Why might a system default to booting a specific operating system if the user makes no selection?
Boot managers are designed with a default
Operating systems require manual confirmation
File systems always mark one partition active
Firmware cannot display any boot menu
Where are boot managers typically stored to be recognized during startup?
In the GPU firmware memory
On removable media like USB sticks
At fixed locations on the hard disk
Inside the CPU instruction cache
If a machine runs Windows and several Linux distributions, what enables choosing among them at boot time?
A scheduler allocating boot priorities
A boot manager presenting selections
A compiler generating multi-boot binaries
A hypervisor switching kernels dynamically
Which statement best explains storing an OS on disk for general-purpose computers?
Disk storage allows flexible file systems
Firmware always lacks address space
Networks require disk-backed paging
CPUs cannot execute firmware images
A system must boot into a default OS unless the user intervenes. Which design choice ensures this behavior?
Disable all non-default boot entries
Configure firmware to bypass disk probes
Place the default kernel in CPU registers
Set the boot manager timeout and default
During the bootstrap process, which component initially runs before any operating system is loaded?
User-level shell interface
Boot manager program
Virtual memory subsystem
Filesystem journaling module
An embedded device lacks persistent disk storage. Which boot strategy is most appropriate?
Store the OS image within firmware
Mount a network filesystem at boot
Install a boot manager on a DVD
Compress the OS into swap space
Which design feature helps a boot manager recognize installed operating systems on startup?
GPU drivers enumerating kernels automatically
Operating systems stored at known locations
Filesystem journaling scanning application caches
CPU microcode mapping partitions to processes
Which component manages process scheduling and resource allocation in a modern operating system?
Kernel and scheduler core
Window compositor module
Bootloader stage manager
File system driver layer
In CPU architecture, which unit primarily handles arithmetic and logical operations on integer data?
Branch prediction unit
Instruction decode queue
Floating-point pipeline
Arithmetic Logic Unit
What is the main purpose of virtual memory in a computer system?
Encrypt process memory pages
Extend RAM using disk space
Improve CPU clock stability
Reduce network packet latency
Which storage technology offers non-volatile memory with low latency and no mechanical parts?
Magnetic tape reels
Spinning hard disk
Solid-state drive flash
Optical Blu-ray disc
Which protocol is commonly used to establish reliable, ordered communication between applications over IP networks?
UDP datagram service
TCP transmission control
ICMP control messages
ARP address resolution
A hash function used in cryptography should primarily provide which property?
Predictable output variance
Guaranteed compression expansion
Deterministic collision resistance
Easy reversibility property
When optimizing a parallel program, which bottleneck is best addressed using Amdahl’s Law analysis?
Network jitter variability
GPU memory bandwidth
Serial fraction limitation
I/O interrupt latency
Which data structure offers average O(1) lookup time using key-based indexing?
Linked list nodes
Binary search tree
Hash table mapping
Priority queue heap
In relational databases, which operation combines rows from two tables based on a matching condition?
Projection column subset
Union set merge
Aggregation group sum
Join relational match
For secure web communication, which protocol layer provides end-to-end encryption between client and server?
SSH for remote shells
DNS over UDP queries
TLS over HTTP connections
SMTP with STARTTLS email
