Week 3 Flashcards
What is a process scheduler (allocates CPU time)?
Allocates CPU time to various processes
What are the 4 Scheduling Algorithms?
First Come First Served (FCFS)
Round Robin (RR)
Shortest Process Next (SPN)
Multilevel Queueing
What is First Come First Served (FCFS)?
Processes get executed in order they arrive
Not interrupted until finishes or reaches a wait state
What are the Pros and Cons of FCFS?
Pros:
Simple and easy to implement
Reduced context switching
Intuitively fair
No starvation
Cons:
Convoy effect - Long waiting time, poor responsiveness
What is Round Robin (RR)?
allocates each task an equal share of the CPU time
What are the pros and cons of RR?
Pros:
Fair CPU Allocation
Responsiveness
No starvation
Cons:
Time quantum sensitivity
Context switch overhead
What is Shortest Process Next (SPN)?
Select the process with the shortest execution time
Non Preemptive - something cannot be taken away or interrupted
What are the pros and cons of SPN?
Pros:
Better average waiting time
Responsiveness
Cons:
Estimating process execution time
May lead to starvation
Longer processes wait longer
What is Multilevel Queueing?
a CPU scheduling algorithm
divides a ready queue into multiple smaller queues
What is Fixed-Priority Scheduling?
High priority queues are executed first
May lead to starvation
What is Time Slicing?
A time slice for each queue
Eg. 60% for interactive, 30% system, 10% batch
What are the pros and cons of Multilevel queueing?
Pros:
Supports different performance objectives
Cons:
Complex and difficult to calibrate
What is a multi core processor?
A multi-core processor has multiple processing units (cores) on a single CPU chip
Each core has its own L1 cache memory
There is a cache hierarchy
What is the common queue?
When a processor becomes available, it chooses a new process from a common queue
What are private queues?
When a processor becomes available, it chooses a new process from its private queue
What are the 2 methods for efficient Multi-Processor Scheduling?
Load Balancing
Processor Affinity