Operating System/System Programming(Arif Butt)

Lec21 Process Scheduling Algorithms

Tony Lim 2021. 7. 13. 23:38

Interactive Process 

interact constantly with their users. When input is received , the average delay must fall between 50-150ms , otherwise the user will find the system to be unresponsive. e.g) command shells, text editors, graphical applications.

Batch Processes 

don't need user interaction and often exectue in the background and are often penalized by the scheduler. Typical batch programs are progamming lnaguage compilers, database search engines and scientific computations.

Real Time Process

have a short guaranteed response time with a minimum variance. e.g) multimedia applications, robot controllers programs that collect dat from physical sensors.

I/O bound processes 

spend much of their time submitting and waiting on I/O requests, e.g) waiting on user interactions via the keyboard and mouse.

Processor-bound processes 

spend much of their time executing code. e.g) process executing an infintie loop, video encoder.

 

 

compute process priority every second.

so with large number of processes, overhead of recomputing process priorities every second is very high. 

Since the kernel itself is non-preemptive , high priority processes may have to wai tfor low priority processes executing in kerenl mode.

 

can select next process to execute in constant time.  

Active array's task lists are those still have their time quantum not expired. once time consumed completely it moves to Expired array's task lists at that time dynamic priority is calculated (interactive, response time). if entire Active array are empty than it becomes Expried array and vice versa.

bit maps used to determine highest priority and non empty list. 

when parent fork new child process , child process inherit default priority (139) , when terminated remaing time is added to parent.

SP(Static Priority) , sleep_avg is initialized to 10 for every new process. it get decrease every time, but incremented how long process had slept.

CPU Affinity = if soft , tries to run task at the same cpu as before , if hard opposite