Podcast
Questions and Answers
What is the primary difference between non-preemptive and preemptive scheduling?
What is the primary difference between non-preemptive and preemptive scheduling?
- Non-preemptive scheduling does not allow the CPU to be taken away from its currently executing process. (correct)
- Non-preemptive scheduling is used for real-time systems.
- Preemptive scheduling does not allow for process prioritization.
- Non-preemptive scheduling allows for multiple processes to execute simultaneously.
What is the goal of maximizing CPU utilization?
What is the goal of maximizing CPU utilization?
- To keep the CPU busy doing useful work at all times. (correct)
- To ensure fairness in process execution.
- To reduce the time it takes for a process to finish executing.
- To minimize the time a process spends in the ready queue.
What is the First-Come, First-Served Algorithm (FCFS)?
What is the First-Come, First-Served Algorithm (FCFS)?
- A non-preemptive scheduling algorithm that executes processes in the order they arrive. (correct)
- A scheduling algorithm that allocates fixed time slices to each process.
- A preemptive scheduling algorithm that prioritizes processes based on their priority.
- A real-time scheduling algorithm that guarantees process execution within a deadline.
What is the primary goal of minimizing response time?
What is the primary goal of minimizing response time?
What is the primary goal of maximizing throughput?
What is the primary goal of maximizing throughput?
What is the primary goal of minimizing turnaround time?
What is the primary goal of minimizing turnaround time?
What is the main characteristic of the Shortest Process First Algorithm?
What is the main characteristic of the Shortest Process First Algorithm?
What happens in the Shortest Remaining Time First Algorithm when a process with a shorter CPU burst time arrives in the ready queue?
What happens in the Shortest Remaining Time First Algorithm when a process with a shorter CPU burst time arrives in the ready queue?
What is the main difference between the Round Robin Algorithm and the First-Come-First-Served Algorithm?
What is the main difference between the Round Robin Algorithm and the First-Come-First-Served Algorithm?
What is the main goal of the Priority Scheduling algorithm?
What is the main goal of the Priority Scheduling algorithm?
What is the main characteristic of the Multilevel Feedback Queues algorithm?
What is the main characteristic of the Multilevel Feedback Queues algorithm?
What problem might occur when two or more processes or threads are updated simultaneously?
What problem might occur when two or more processes or threads are updated simultaneously?
What is the primary issue with software solutions to the critical section problem?
What is the primary issue with software solutions to the critical section problem?
Which hardware solution enables a process to modify a variable or memory location atomically?
Which hardware solution enables a process to modify a variable or memory location atomically?
What is the purpose of a semaphore in process synchronization?
What is the purpose of a semaphore in process synchronization?
What does the Dining Philosophers Problem represent?
What does the Dining Philosophers Problem represent?
What is a deadlock situation in process management?
What is a deadlock situation in process management?
What is the primary difference between readers and writers in the Readers and Writers Problem?
What is the primary difference between readers and writers in the Readers and Writers Problem?
Flashcards are hidden until you start studying
Study Notes
CPU Scheduling
- Non-Preemptive scheduling: CPU cannot be taken away from currently executing process
- Preemptive scheduling: CPU can be taken away from currently executing process due to interrupt, higher priority process, or time limit exceeded
Performance Criteria for Schedulers
- CPU utilization: maximize CPU busy time
- Throughput: maximize work done by CPU
- Turnaround time: minimize time between process submission and completion
- Response time: minimize time between request submission and first response
- Waiting time: minimize time spent in ready queue
- Fairness: equal opportunity for all processes to use CPU
CPU Scheduling Algorithms
- First-Come, First-Served Algorithm (FCFS): non-preemptive, execute processes in order of arrival
- Shortest Process First Algorithm (SPF)/Shortest Job First Algorithm (SJF): non-preemptive, execute shortest CPU burst time first
- Shortest Remaining Time First Algorithm (SRTF): preemptive, execute shortest remaining CPU burst time first
- Round Robin Algorithm (RR): preemptive, execute in order of arrival with time limit (time quantum or time slice)
- Priority Scheduling: execute highest priority process, may be non-preemptive or preemptive
- Multilevel Feedback Queues: determine behavior pattern, permanently assign processes to queues
Process Synchronization
- Bakery Algorithm: assigns smallest number to processes, allowing entry to critical section
- Busy waiting: main problem with software solutions, stuck in while loop
Hardware Solutions to Critical Section Problem
- Disabling interrupts: disable interrupts before modifying shared variables
- Special hardware instruction: modify variables or memory locations atomically
Semaphore
- Special integer variable protected by atomic operations
- Solves complex synchronization problems without busy waiting
Classic Synchronization Problems
- Dining Philosophers Problem: represents processes using limited resources
- Deadlock: situation where two or more processes wait for resources held by each other
- Readers and Writers Problem: represents access to database, readers examine data, writers modify data
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.