Module 3: CPU Scheduling

0.0(0)
studied byStudied by 0 people
full-widthCall with Kai
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/34

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

35 Terms

1
New cards

CPU Scheduling

the sharing of the CPU among read processes

2
New cards

CPU Utilization

Fraction of time a CPU is used by user processes

3
New cards

Throughput Formula

N/T where N = number of processes complete and T = observation time

4
New cards

Response Time Formula

Response Time = TFirstTime - Ta

TFirstTime = time a process gets CPU the first time

Ta = Process Arrival Time

5
New cards

Turnaround Time

Turnaround Time = Tcomplete - Ta

Tcomplete = time a process complete and terminates

Ta = Process Arrival Time

6
New cards

Waiting Time

Twaiting

where Twaiting is the total time spent by a process in the ready queue

7
New cards

Objective of CPU scheduling for All Systems

Fairness, Policy Enforcement, and Balance

8
New cards

Objective of CPU Scheduling in Batch Systems

Throughput, Turnaround time, and CPU Utilization

9
New cards

Objective of CPU Scheduling in Interactive Systems

Response time, Proportionality

10
New cards

Objective of CPU Scheduling in Real-time systems

Meeting deadlines, Predictability

11
New cards

Fairness

Giving each process a fair share of the CPU

12
New cards

Policy Enforcement

seeeing that state policy is carried out

13
New cards

Balance

keeping all parts of the system busy

14
New cards

Throughput

maximize jobs per hour

15
New cards

Turnaround Time

Minimize time between submission and termination

16
New cards

CPU Utilization

keep the CPU busy all the time

17
New cards

Response Time

respond to request quickly

18
New cards

Proportionality

meet users’ expectations

19
New cards

Meeting deadlines

avoid losing data

20
New cards

Predictability

avoid quality degradation in multimedia systems

21
New cards

Preemptive Scheduling

OS can forcibly take back the CPU

22
New cards

Non-preemptive

the process voluntarily relinquishes the CPU

23
New cards

First Come First Serve (FCFS)

process that arrives first is allocated the CPU first

24
New cards

Shortest Job First (SJF)

  • non-preemptive

  • POLICY:associate with each process the length of its next CPU burst

  • SJF is optimal, delivers min average turnaround time for a given set of processes

25
New cards

Shortest-Remaining-Time-First (SRTF)

  • preemptive

  • policy: if a new process arrives w/ CPU burst length less than remaining time of current executing proces

26
New cards

Round Robin

Order processes in ready queue in FCFS, assign CPU to list head, CPU is assigned for limited time (quantum)

27
New cards

Quantum

usually 10-100 milliseconds

28
New cards

What is the problem/weakness of FCFS?

avg turnaround increases with large process in front of smaller ones

29
New cards

How does SJF address FCFS’s weakness?

favors short jobs. SJF offers optimal turnaround time

30
New cards

What is SJF’s weakness?

we can’t know in advance the length of a CPU burst

31
New cards

How does RR address SJF’s weakness?

ensures that shorter jobs complete earlier than larger ones

32
New cards

What is RR’s weakness?

decreases throughput

33
New cards

Can we address RR’s weakness? If yes, how?

Yes by adapting the quantum: increase quantum for longer CPU bursts

34
New cards

Is there a CPU scheduling policy with adaptive quantum?

Yes, Multi-Level Feedback Queue (MLFQ)

35
New cards