lec03-witchel - Processes Last Time • Each process...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Processes Last Time • Each process maintains its own state, that includes its text and data, procedure call stack, etc. • The OS also stores process state for each process. This state is called the Process Control Block (PCB), and it includes the PC, SP, register states, execution state, etc. • Process Execution State New Running Terminated Waiting Ready • For each of these execution states, the OS maintains a state queue. All of the processes that the OS is currently managing reside in one and only one of these state queues. Process Scheduling: what to execute when Today • Scheduling criteria • Scheduling algorithms Operating Systems Lecture 3 1 Scheduling Processes Multiprocessing (concurrency) - one process on the CPU running, and one or more doing I/O enables the OS to increase system utilization and throughput by overlapping I/O and CPU activities. Long Term Scheduling: How does the OS determine the degree of multiprogramming, i.e., the number of jobs executing at once in the primary memory? Short Term Scheduling: How does (or should) the OS select a process from the ready queue to execute? • Policy Goals • Policy Options • Implementation considerations Operating Systems Lecture 3 2 Short Term Scheduling The kernel runs the scheduler at least when • a process switches from running to waiting, • an interrupt occurs, or • a process is created or terminated. In a non-preemptive system, the scheduler must wait for one of these events, but in a preemptive system the scheduler can interrupt a running process. Criteria for Comparing Scheduling Algorithms: CPU Utilization The percentage of time that the CPU is busy. Throughput The number of processes completing in a unit of time. Turnaround time The length of time it takes to run a process from initialization to termination, including all the waiting time. Waiting time The total amount of time that a process is in the ready queue. Response time The time between when a process is ready to run and its next I/O request. Operating Systems Lecture 3 3 Car Making Mystery People often say they want “faster” internet access. What is faster? • My factory takes 1 day to make a Model-T ford. That doesn’t sound fast. • But 10 minutes after I start making my first Ford of the day, I can start another Ford. • If my factory runs 24 hrs/day, I can make 24 * 6 = 144 cars per day. Is that faster? If you put in a special order for 1 green car, it still takes a day. Throughput is increased, but latency is not....
View Full Document

This document was uploaded on 03/09/2012.

Page1 / 19

lec03-witchel - Processes Last Time • Each process...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online