Kernel's point of view...Theprocessisgoingto die.TerminatedTheprocessmay-choose to terminate itself;or-forceto beterminated.RunningWaitingProcessStates16
Kernel’s point of view. 16 New Waiting Terminated Process States Ready Running Big Picture The process is going to die. The process may - choose to terminate itself; or - force to be terminated
Whatis scheduling?So, what is process scheduling?intelReadyRunningCore"i7Mainly about how to make all the readyprocessesbecome“Running”OOOThis is the called short-term schedulingorCPUscheduling17
What is scheduling? 17 Running So, what is process scheduling? Mainly about how to make all the ready processes become “Running” This is the called short-term scheduling or CPU scheduling. Ready
Triggering Events When process scheduling happens:AnewprocessisWhen“fork("isinvoked and returns successfullycreated.Then, whether the parent or the child is scheduled is up to thescheduler's decision.AnexistingprocessThe cpu is freed.The scheduler should choose another process to run.is terminated.The cpu is freed.The scheduler should chooseanother process to run.Aprocesswaitsfor1/o.Aprocess finishesThe interrupt handling routine makesa scheduling request, ifwaiting for I/0.necessary.18
Triggering Events • When process scheduling happens: 18 A new process is created. When “fork()” is invoked and returns successfully. Then, whether the parent or the child is scheduled is up to the scheduler’s decision. An existing process is terminated. The CPU is freed. The scheduler should choose another process to run. A process waits for I/O. The CPU is freed. The scheduler should choose another process to run. A process finishes waiting for I/O. The interrupt handling routine makes a scheduling request, if necessary
KeyIssues(intel)ReadyRunningCore"i7Question#l:Howtomakeareadyprocessbecome running?(Note that the runningprocess maynot terminate at that time)OJTLContextswitchingQuestion#2:Howto decide which process should berunning?Scheduling criteria & scheduling algorithmsQuestion#3:Howtodesign schedulinginareal/specificsystem?Multiprocessorsystem,real-timesystem,algorithmevaluation19
Key Issues 19 Running Question #1: How to make a ready process become running? (Note that the running process may not terminate at that time) Context switching Ready Question #2: How to decide which process should be running? Scheduling criteria & scheduling algorithms Question #3: How to design scheduling in a real/specific system? Multiprocessor system, real-time system, algorithm evaluation
TopicsProcesslifecycle- Process scheduling- Context switchingScheduling criteriaScheduling algorithmsApplications/Scenarios(intel)Core"i720
20 Topics - Process lifecycle - Process scheduling - Context switching - Scheduling criteria - Scheduling algorithms - Applications/Scenarios