π -> 01/30/26: ECS150-L10
[Lecture Slide Link]
π€ Vocab
β Unit and Larger Context
Small summary
βοΈ -> Scratch Notes
Implementing a process scheduler:
- Handling context, sharing computer resources and storing/loading environments for the threads
static ucontext_t- βA context/environment boxβ- Snapshot of registers, like the setup/cleanup when calling functions in assembly
??
What EXACTLY needs to be preserved between threads?
- Obviously registers, but do we have to worry about maintaining the stack? i guess the stack pointer kinda takes care of that
- Variable names and pointers are resolved at compile time so not those either
- is there anything else?
Scheduing concepts
Process States
- Ready
- Running
- Blocked
- Zombie

Scheduling Algos
Vocab
- Submission time: time at which a process is created
- Turnaround time: total time between process submission and completion
- Response time: time between process submission and first execution or first response (e.g., screen output, or input from user)
- Waiting time: total time spent in the ready queue
FCFS / FIFO
A queue
Pathology:
- Long job hogging because of unlucky scheduling
SJF
Shortest Job First
- Optimal scheduling, but needs to know task lengths in advance
Pathology:
- Long job entered first, and hogs
Preemptive SJF / SRTF
- Also known as SRTF (shortest remaining time first)
- New shorted jobs can interrupt longer jobs
Pathology:
- Long jobs continually interrupted by shorter jobs and unable to complete
Metrics
Turnaround time - Best for batch systems where reactivity is not needed (scientific computing, clusters)
- Best when length of tasks known and tasks mostly CPU-bound
Response time - Best for interactive systems (user initiated, browsers) - Best for tasks of unknown length
Round-robin (RR)
Tasks run only for a (short) time slice at a time
Relies of preemption (via timer interrupts)
Characteristics:
- NO starvation (everyone gets a turn)
- Time slice duration matters (response time vs context switching overhead)
- Poor turnaround time
Multi-level Queue Scheduling
Combine approaches to take advantage of eachβs advantages
π§ͺ -> Refresh the Info
Did you generally find the overall content understandable or compelling or relevant or not, and why, or which aspects of the content were most novel or challenging for you and which aspects were most familiar or straightforward?)
Did a specific aspect of the content raise questions for you or relate to other ideas and findings youβve encountered, or are there other related issues you wish had been covered?)
π -> Links
Resources
- Put useful links here
Connections
- Link all related words