Operating System/O.S(Neso Academy, HPC Lab. KOREATECH)

5) Process State ,Process Control Block , Process Scheduling, Context Switch

Tony Lim 2021. 5. 3. 16:15
728x90

The state of process is defined by the current activity of process.

new = the process is being created

running = Instructions are being executed

waiting = The process is waiting for some event to occur (I/O operation)

ready = the process is waiting to be assigned to a processor

terminated = the process has finished execution

interrupt = some higher priority process came into schedule and interrupt current running process

 

PCB is a way to represent process.

Process Id == Process number , is a unique number for identification.

Process state = thing that we learned above

Program Counter = Points to the next command that needs to be executed. 

CPU Registers = registers that being used , General purpose register , stackpointer etc..

CPU Scheduling information = priority , pointer to scheduling queue , scheduling parameters

Memory management information 

Accouting information = used resource , memory , time etc..

I/O status information = I/O devices that assigned to particular devices.

 

Process Scheduler = to achieve objective of mutiprogramming and time sharing , it selects available process for program execution on the CPU.

Job Queue = As processor enter the system, they are put into job queue , which consist of all processes in the system.

Ready Queue = The process that are residing in main memory and are ready and waiting to execute are kept in list called Ready Queue.

when higher priority process comes or interrupt occurs then current process swap out and goesto "partially executed swapped-out processes".

 

Context = current information about particular process , which is represented as PCB.

Context Switch = store context , restore context

  • overhead , system does nothing while switching
  • speed varies from machine to machine , might take long time.

 

 

 

 

728x90