Scheduling in Linux 2.4
1.Scheduler picks the highest priority thread as next scheduled thread from running queue. So it must poll all threads to pick it.
2.Running queue stores all the waiting threads.
3.Every thread has a slice which set when it was created, the slice will be decreased when the timer interrupt expired. If its slice was zero, it must wait for resetting slice.
4.Scheduler resets all threads’ slices when all running threads’ slices were zero.
5.There are two kinds of thread, real time thread and normal thread, the real time thread’s priority is always higher than normal
thread’s. So a normal thread could run when there is not a real time thread in running queue.
6.There is arithmetic to recount thread’s counter when the running queue is empty, it guarantees the user’s request could be
responded in time.
7.The real time threads that have same priority could be picked by FIFO or SCHED_RR methods.

