Re: few questions about how linux work

From: udayan (udayan_singh_at_lko.tcs.co.in)
Date: 08/06/03


Date: 6 Aug 2003 07:05:27 -0700


"Markus Falkensteiner" <falkmREMOVE_THIS@gmx.net> wrote in message news:<B95Ya.14$wm6.600175@news.salzburg-online.at>...

> second question refer to the scheduler:
> the scheduler is the part which gives every process (which would like like
> to get CPU)
> a timeslice. this is as much time as the process wants or maximum 10ms. then
> an timer-interrpt occurs
> and the scheduler switch to next process.
> i've heart that kernel-code can not loose time, means kernelcode can't be
> interrupted. what is
> when a kernel function needs more that 10ms (however) and the next
> timer-interrupt occurs.
> will this IRQ be ignored. if yes how does this works. or will the interrupt
> (any interrupt) processed later when kernelcode is finished??
>

well i have some knowladge with respect to the theoretical part of
some operating systems. Out there it has two things (and many more)
related to each process for using the CPU -
1. Time slice
2. Priority.

Now lets say we have a system on which we have 4 processes running of
which one of them is having priority 1 (consider it to be kernel
process and call it process 1, higher priority) and other 3 have
priority 2 (user processes from 2-4, lower priority) .
Here if we consider both the above mentioned features being
implemented, then what happens is that when process 1 is idle then
other 3 processes run in round robin manner. with a time slice of t
ms. But when process 1 (kernel process )comes into picture then it'll
get the complete time till it completes off with its CPU utilization
time. So you can see priority plays a role in it.

Havent worked on the process scheduling part on linux so cannot
explicitely tell you what happens out here, but i suppose it shuold be
somewhat related to what i said.. but someone else can can tell you
elaborately about linux kernel.

one example of this category is Compatible Time Sharing Systems.



Relevant Pages

  • [RFC][PATCH] O(1) Entitlement Based Scheduler
    ... This patch is a modification of the Oscheduler that introduces ... _entitlement_ to CPU resources that is determined by the number of _shares_ ... This patch provides both soft and hard CPU usage rate caps per ... one getting the most can be given a better priority, ...
    (Linux-Kernel)
  • [patch] 2.6.21-rc4 nicksched v32
    ... Considering the recent attention on CPU schedulers, ... but it is yet another scheduler. ... struct pipe_inode_info; ... 'User priority' is the nice value converted to something we ...
    (Linux-Kernel)
  • [patch 1/] timers: tsc using for cpu scheduling
    ... uses jiffies_64 for process priority calculation instead of Time Stamp ... Clock (TSC). ... process which provoke to memory threshing and bad cpu and cash using has ... But for scheduler purposes the value of work ...
    (Linux-Kernel)
  • Re: Stolen and degraded time and schedulers
    ... work_time is probably most naturally measured in cpu clock cycles rather ... In the case of cpufreq you are talking about the cpu not doing as much work due to a choice the kernel made. ... I understand they are somewhat similar from the perspective of the scheduler, ... I think this is might be design; i.e. the scheduler was intended to work in terms of real time units rather than work units. ...
    (Linux-Kernel)
  • Re: fixed time slices?
    ... a ready low-priority thread for as long as a higher priority thread is ... the scheduler would not detect that a higher ... a mutex and thread A running on CPU 1 signals it. ...
    (microsoft.public.win32.programmer.kernel)