Re: TimeSlice for Expired Processes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 9 Jan 2005 18:04:38 +0000 (GMT), Dinesh Ahuja
<mdlinux7@xxxxxxxxxxx> wrote:

[ apparently a quote from "Linux Kernel Development, chapter 3,
"Scheduling", rml ].

> 1. When a process's timeslice runs out, the process is
> considered expired. A process with no timeslice is not
> eligible to run until all other processes have
> exhausted.

This means that each process receives a chunk of time to make progress
and is shoved on the expired array when it exceeds this time - rml
also mentions those cases when not EXPIRED_STARVING() in which it
might be preferable to re-add to the active array with a new timeslice
being assigned.

> In above statement, I assume that author is mentioning
> a if a process timeslice reaches minimun i.e. 10ms, a
> process/task is moved from an active array to expired
> array.Process with 0 timeslice means that it is no
> longer interested in getting processor time and it has
> completed its execution and hence expired array will
> be having those tasks which will be having timeslice
> of 10ms, which is a minimum value [ least priority].

A timeslice of zero simply means that a process has used all of the
available timeslice. However it will get another before being inserted
in to the expired prio_array. If the process has decided it doesn't
want any more time then it should mark its state accordingly, whether
by in-kernel context calls to set_[task|current]_state or userland
blocking, or exit(), or whatever.

Cheers,

Jon.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux