Multi-tasking system

202308301358
Status: #idea
Tags: OS

Multi-tasking system

Decision Points

  1. Job completion
  2. Process leaves for IO
  3. Arrival of a job (if CPU is idle)
  4. Time slice expiry

Example

Time slice=3

Warning

Multi-tasking is overall slower than multi-programming, due to the overhead of context switching

Info

Linux has different time slices for different processes.
The length of the time slice is decided by the niceness, which ranges from −20 to 19

Info

Priority number usually ranges from 0 to 139
0−99 are 'real time' priority
100−139 are non-real time/conventional priority

Info

−ve nice values need root access to be set

Info

120 is the default nice value for user processes


References