









































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










































































Question 1. Which of the following best describes a monolithic kernel architecture? A) All OS services run in user mode and communicate via message passing. B) The kernel provides a minimal set of services, and most functionality is in separate servers. C) All core services execute in kernel space sharing the same address space. D) The kernel is divided into layers, each providing services to the layer above. Answer: C Explanation: In a monolithic kernel, all core OS services (e.g., scheduler, memory manager, device drivers) run in kernel mode and share a single address space, giving high performance. Question 2. In a microkernel design, which mechanism is primarily used for communication between the kernel and user‑level servers? A) Shared memory B) Message passing C) Direct system calls D) Interrupt vectors Answer: B Explanation: Microkernels keep only essential services in the kernel; other services run as user‑level processes that interact with the kernel via message passing. Question 3. Which type of virtualization runs directly on the hardware without a host operating system? A) Type 2 hypervisor B) Container virtualization C) Type 1 hypervisor D) Emulated virtualization Answer: C Explanation: A Type 1 (bare‑metal) hypervisor installs directly on the physical hardware and manages guest VMs without requiring a host OS. Question 4. Which of the following is NOT a typical user‑level OS service?
A) Command‑line interface (CLI) B) File‑system manipulation C) Interrupt handling D) Program execution control Answer: C Explanation: Interrupt handling is performed by the kernel (often in interrupt service routines), not by user‑level services. Question 5. The primary purpose of a system call is to: A) Provide a way for user programs to directly access hardware registers. B) Allow user programs to request services from the kernel. C) Enable kernel modules to invoke user‑level functions. D) Transfer control from the kernel to user space. Answer: B Explanation: System calls are the controlled interface through which user programs request kernel services such as I/O, process control, and memory allocation. Question 6. In the context of system calls, which method is commonly used to pass arguments from the user program to the kernel? A) Global variables B) CPU registers and the user stack C) Direct memory mapping of kernel space D) Network sockets Answer: B Explanation: Most architectures pass system‑call numbers and arguments via registers; additional arguments may be placed on the user stack. Question 7. Which of the following statements about the Process Control Block (PCB) is FALSE? A) It stores the process state (e.g., ready, running).
D) thread_start() Answer: B Explanation: pthread_create() is the standard POSIX API for creating a new thread within a process. Question 11. Which CPU scheduling algorithm is non‑preemptive and selects the process with the shortest next CPU burst? A) First‑Come, First‑Served (FCFS) B) Shortest‑Job‑First (SJF) C) Round‑Robin (RR) D) Priority Scheduling Answer: B Explanation: SJF selects the ready process with the smallest estimated CPU burst; it is non‑preemptive unless the preemptive variant (SRTF) is used. Question 12. The primary advantage of Round‑Robin scheduling is: A) Minimum average waiting time. B) Fair allocation of CPU time to all processes. C) Maximizing throughput for CPU‑bound jobs. D) Eliminating context‑switch overhead. Answer: B Explanation: RR gives each process a fixed time quantum, ensuring that all ready processes receive CPU time in a cyclic order. Question 13. Which metric best measures the number of processes completed per unit time? A) Turnaround time B) Throughput C) Response time D) Waiting time Answer: B
Explanation: Throughput is defined as the number of processes that finish execution per time interval. Question 14. In the critical‑section problem, Peterson’s solution works only for: A) Two processes B) Any number of processes C) Processes that do not share memory D) Multiprocessor systems only Answer: A Explanation: Peterson’s algorithm provides a correct solution for two competing processes using shared variables; it does not scale directly to more processes. Question 15. Which hardware instruction can be used to implement a simple spinlock? A) MOV B) TEST‑AND‑SET C) ADD D) CMPXCHG16B Answer: B Explanation: The Test‑and‑Set instruction atomically reads a memory location and sets it, making it suitable for building spinlocks. Question 16. A counting semaphore initialized to 3 is used to control access to a resource pool of three identical devices. If two processes have already performed a wait (P) operation, how many additional processes can successfully perform a wait without blocking? A) 0 B) 1 C) 2 D) 3 Answer: B
Explanation: External fragmentation refers to scattered free spaces that are too small to satisfy allocation requests. Question 20. In contiguous memory allocation, a process requires 120 KB of memory, and the system uses a fixed‑size allocation unit of 64 KB. How much memory is actually allocated to the process? A) 64 KB B) 120 KB C) 128 KB D) 192 KB Answer: C Explanation: With a 64 KB unit, the process needs two units (2 × 64 KB = 128 KB), causing 8 KB internal fragmentation. Question 21. Which page‑replacement algorithm can suffer from Belady’s anomaly (i.e., more frames leading to more page faults)? A) FIFO B) LRU C) Optimal D) Clock Answer: A Explanation: FIFO may exhibit Belady’s anomaly, where increasing the number of allocated frames paradoxically increases page faults. Question 22. In demand paging, a page fault occurs when: A) The CPU attempts to execute a privileged instruction. B) The required page is not present in physical memory. C) A process requests more memory than the system can provide. D) The TLB entry is invalid. Answer: B
Explanation: A page fault is triggered when the referenced page is absent from RAM, prompting the OS to fetch it from secondary storage. Question 23. The working‑set model is used primarily to: A) Determine the optimal page‑replacement algorithm. B) Detect thrashing by monitoring the number of active pages per process. C) Allocate contiguous memory blocks. D) Schedule CPU bursts. Answer: B Explanation: The working‑set model tracks the set of pages a process is actively using; excessive working‑set size relative to available memory leads to thrashing. Question 24. Which disk‑scheduling algorithm moves the disk arm in one direction only, servicing requests as it goes, then jumps back to the start without servicing requests on the return? A) FCFS B) SSTF C) SCAN D) C‑SCAN Answer: D Explanation: C‑SCAN (Circular SCAN) services requests in one direction, then returns to the beginning of the disk without servicing any requests on the return trip. Question 25. In a file system that uses indexed allocation, what is stored in the index block? A) The actual data of the file. B) Pointers to all the file’s data blocks. C) The file’s permission bits. D) The directory entry for the file. Answer: B Explanation: An index block contains an array of pointers, each pointing to a data block belonging to the file, allowing random access.
Question 29. Which of the following algorithms is used for deadlock avoidance by ensuring the system never enters an unsafe state? A) Banker's algorithm B) Ostrich algorithm C) Wait‑die scheme D) Wound‑wait scheme Answer: A Explanation: The Banker's algorithm simulates resource allocation to verify that a safe sequence remains possible before granting a request. Question 30. In a resource‑allocation graph, a cycle involving only single‑instance resources indicates: A) Potential deadlock but not guaranteed. B) Definite deadlock. C) No deadlock. D) That the system is safe. Answer: B Explanation: With each resource having a single instance, a cycle directly translates to a deadlock because each process in the cycle waits for a resource held by another. Question 31. Which of the following is a proactive deadlock handling technique? A) Detection and recovery B) Prevention C) Ignoring deadlocks (Ostrich) D) Post‑mortem analysis Answer: B Explanation: Prevention eliminates one of the necessary conditions for deadlock, thereby ensuring deadlocks never occur. Question 32. The principle of “least privilege” in protection means:
A) Users should have the maximum rights needed to perform their tasks. B) Every process runs with kernel privileges. C) All files are readable by every user. D) The OS grants all possible permissions to administrators only. Answer: A Explanation: Least privilege dictates that subjects receive only the permissions essential for their functions, reducing security risk. Question 33. In an access matrix, which of the following structures implements the matrix by storing a list of permissions per object? A) Capability list B) Access Control List (ACL) C) Role‑based access control (RBAC) table D) Security token Answer: B Explanation: An ACL is attached to each object and enumerates which subjects have which rights on that object. Question 34. Which of the following attacks exploits a program’s failure to check array bounds? A) Phishing B) Buffer overflow C) Man‑in‑the‑middle D) SQL injection Answer: B Explanation: Buffer overflows occur when a program writes data beyond the intended memory region, often due to missing bounds checks. Question 35. A digital signature provides which security service? A) Confidentiality only
D) Multilevel Feedback Queue (MLFQ) Answer: B Explanation: SJF always selects the shortest job, potentially postponing longer processes indefinitely (starvation). Question 39. In the context of memory management, what does “paging” primarily eliminate? A) External fragmentation B) Internal fragmentation C) Thrashing D) Page‑fault latency Answer: A Explanation: Paging divides memory into fixed‑size pages, removing the need for contiguous allocation and thus eliminating external fragmentation. Question 40. Which of the following is a disadvantage of using a bitmap for free‑space management on a very large disk? A) Slow allocation of large contiguous blocks. B) High memory consumption for the bitmap itself. C) Inability to represent free blocks. D) Complex pointer arithmetic. Answer: B Explanation: A bitmap requires one bit per disk block; on a large disk the bitmap can become sizable, consuming significant memory. Question 41. Which of the following best describes the “no‑preemption” condition in deadlock theory? A) Resources can be forcibly taken away from a process. B) Once a resource is allocated, it cannot be reclaimed until the process releases it. C) Processes may release resources voluntarily. D) All resources are preemptible.
Answer: B Explanation: No‑preemption means that a resource cannot be taken away from a process holding it; it must be released voluntarily. Question 42. In a segmented memory system, a logical address consists of: A) Page number and offset. B) Segment number and offset. C) Frame number and offset. D) Block number and word offset. Answer: B Explanation: Segmentation uses a segment selector (segment number) plus an offset within that segment to form a logical address. Question 43. Which of the following is a characteristic of a “pure” microkernel? A) All device drivers run in kernel mode. B) Only minimal services (e.g., IPC, scheduler) reside in the kernel. C) The kernel contains a full file system implementation. D) It cannot support user‑level servers. Answer: B Explanation: A pure microkernel keeps only essential mechanisms (inter‑process communication, basic scheduling, low‑level memory management) in kernel space. Question 44. Which of the following statements about the “optimal” page‑replacement algorithm is TRUE? A) It can be implemented efficiently in real systems. B) It replaces the page that will not be used for the longest future interval. C) It suffers from Belady’s anomaly. D) It always selects the page with the smallest reference count. Answer: B
Question 48. Which of the following is an example of a “capability list” implementation? A) An ACL stored with each file. B) A token passed between processes that encodes access rights. C) A matrix stored centrally in the kernel. D) A role‑based permission table. Answer: B Explanation: Capability lists are objects (tokens) held by subjects that specify the operations they may perform on objects. Question 49. Which of the following statements about “virtual machines” is FALSE? A) They provide an abstraction of physical hardware. B) They always improve application performance. C) They can run multiple isolated OS instances on a single host. D. They enable testing of software in different OS environments. Answer: B Explanation: Virtual machines add overhead; they do not guarantee performance improvements and may actually reduce performance compared to bare metal. Question 50. In a demand‑paging system, a page fault service time consists of: A) Only the time to read the page from disk. B) The time to service the interrupt, read the page from disk, and restart the process. C) Only the time to update the page table. D) The time to swap out another page. Answer: B Explanation: Handling a page fault involves the interrupt service routine, disk I/O to fetch the page, updating the page table, and restarting the faulting instruction.
Question 51. Which synchronization primitive can be used to implement the Readers‑Writers problem with writer preference? A) Binary semaphore only B) Counting semaphore only C) Two semaphores plus a mutex D) Spinlock only Answer: C Explanation: A common solution uses a mutex for mutual exclusion and two semaphores (read‑count and write‑access) to give priority to writers. Question 52. In the context of I/O, what is “interrupt latency”? A) The time between a device raising an interrupt and the CPU beginning the interrupt handler. B) The time required to transfer a block of data via DMA. C) The period the CPU spends polling a device. D) The delay caused by context switching. Answer: A Explanation: Interrupt latency measures the delay from the moment an interrupt is generated to the moment the CPU starts executing the corresponding ISR. Question 53. Which of the following is a characteristic of a “preemptive” scheduling algorithm? A) A running process voluntarily yields the CPU. B) The scheduler can forcibly remove the CPU from a running process. C) Processes run until they terminate. D) Only I/O‑bound processes receive CPU time. Answer: B Explanation: Preemptive scheduling allows the OS to interrupt a running process to enforce fairness or meet deadlines. Question 54. Which of the following is true about the “working set” of a process?
B) The modification is written directly to the shared page. C) The child process is terminated. D) The parent process receives a copy of the child’s changes. Answer: A Explanation: COW postpones copying until a write occurs; at that point a private copy is created for the writing process, preserving isolation. Question 58. Which of the following best describes “address space layout randomization” (ASLR)? A) Randomly assigning physical memory frames to virtual pages. B) Randomizing the locations of code and data in a process’s virtual address space. C) Randomly selecting which process runs next. D) Randomizing the order of disk block allocation. Answer: B Explanation: ASLR improves security by making the memory layout unpredictable, hindering exploits that rely on known addresses. Question 59. Which of the following is NOT a typical component of a “security policy” in operating systems? A) Authentication mechanisms. B. Process scheduling algorithm. C) Access control rules. D) Auditing and logging. Answer: B Explanation: Scheduling policies relate to performance, not directly to security; authentication, access control, and auditing are security policy elements. Question 60. Which of the following statements about “role‑based access control” (RBAC) is correct? A) Permissions are assigned directly to users. B) Roles group users and are assigned permissions.
C) Each role can have only one permission. D) RBAC eliminates the need for authentication. Answer: B Explanation: RBAC assigns permissions to roles, and users are then assigned to roles, simplifying management. Question 61. In a system that uses “preemptive multitasking,” which of the following can cause a context switch? A) A process completing its execution. B) A timer interrupt expiring. C) The user pressing a key. D) All of the above. Answer: D Explanation: Any of these events can trigger the scheduler to perform a context switch in a preemptive environment. Question 62. Which of the following is an effect of “internal fragmentation”? A) Wasted memory within allocated blocks. B) Inability to allocate large contiguous memory. C) Increased page‑fault frequency. D) Higher disk I/O latency. Answer: A Explanation: Internal fragmentation occurs when allocated memory blocks are larger than the requested size, leaving unused space inside the block. Question 63. Which of the following is true about a “page table entry” (PTE) in a typical paging system? A) It stores the physical frame number and status bits (valid, dirty, etc.). B) It contains the entire contents of the page. C) It holds the process’s priority.