ICT Operating System Fundamentals 2 — Questions and Answers
Question 1: Which scheduling algorithm can lead to starvation of low-priority processes?
- Round Robin
- First-Come First-Served
- Priority Scheduling (Correct answer)
- Shortest Job First
Correct answer: Priority Scheduling
Priority Scheduling can starve low-priority processes if higher-priority processes continuously arrive.
Question 2: What is a 'race condition' in operating systems?
- A CPU speed benchmark test
- An outcome that depends on the unpredictable sequence of thread execution (Correct answer)
- A method to speed up memory access
- A type of disk scheduling algorithm
Correct answer: An outcome that depends on the unpredictable sequence of thread execution
A race condition occurs when system behavior depends on the relative timing of events such as thread execution order.
Question 3: Which of the following best describes a 'semaphore' in OS context?
- A type of file system
- A synchronization variable used to control access to shared resources (Correct answer)
- A memory paging technique
- A CPU scheduling queue
Correct answer: A synchronization variable used to control access to shared resources
A semaphore is an integer variable used to solve critical section problems and synchronize concurrent processes.
Question 4: What is the purpose of the Translation Lookaside Buffer (TLB)?
- To store recently executed instructions
- To cache recent virtual-to-physical address translations (Correct answer)
- To manage disk I/O requests
- To schedule CPU bursts
Correct answer: To cache recent virtual-to-physical address translations
The TLB is a hardware cache that speeds up virtual address translation by storing recent page table entries.
Question 5: In a multi-threaded process, what do threads share?
- Program counter and stack only
- Code, data, and OS resources like open files (Correct answer)
- Only the CPU registers
- Nothing — each thread is fully independent
Correct answer: Code, data, and OS resources like open files
Threads within the same process share the code section, data section, and OS resources, but each has its own stack and registers.
Question 6: What does the 'working set' model in virtual memory refer to?
- The set of all pages in RAM
- The set of pages a process is actively using in a time window (Correct answer)
- Pages recently swapped to disk
- The OS kernel pages in memory
Correct answer: The set of pages a process is actively using in a time window
The working set model tracks the pages a process has referenced recently to predict what pages it will need.
Question 7: Which condition is NOT required for deadlock to occur?
- Mutual exclusion
- Hold and wait
- Preemption (Correct answer)
- Circular wait
Correct answer: Preemption
Deadlock requires mutual exclusion, hold and wait, no preemption, and circular wait — preemption prevents deadlock, not causes it.
Which scheduling algorithm can lead to starvation of low-priority processes?