c - When do process switching takes place -


i confused process switching between 2 processes. when new process created using fork, general rules applicable switching between processes. when 1 processes goes idle state? have few doubts

  1. what happen when parent , child in both infinite loop , having print instruction (no sleep method)
  2. what general rule?

most preemptive schedulers will, highly simplified, allocate maximum time each process.

when time expires (for instance 10 ms), re-schedule other processes cpu.

if timer doesn't expire before process hits other wait condition (such doing i/o), re-schedule then, instead.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -