linux scheduling

linux scheduling

Post by Adam Mill » Wed, 21 Oct 1998 04:00:00



does anyone know how I could create a two-level scheduling system for
linux? I know that I need to edit the task struct in sched.h and
sched.c, but I don't know exactly how.
   When a process times out, I want to send it to the second queue.
Nothing in the second queue will be given to the processor until the
first queue is empty.
 
 
 

linux scheduling

Post by Seth Van Oor » Wed, 21 Oct 1998 04:00:00


Maybe I don't understand your question, but that is essentially how it works
now. Other than realtime processes, each process gets their time slice
according to priority and when it runs out it doesn't execute again until
all other processes have also used their time slices or there are no other
processes waiting to run. There's a linked list of all tasks and a queue of
tasks waiting to run.

Seth


>does anyone know how I could create a two-level scheduling system for
>linux? I know that I need to edit the task struct in sched.h and
>sched.c, but I don't know exactly how.
>   When a process times out, I want to send it to the second queue.
>Nothing in the second queue will be given to the processor until the
>first queue is empty.


 
 
 

linux scheduling

Post by Robert Hyat » Thu, 22 Oct 1998 04:00:00



: Maybe I don't understand your question, but that is essentially how it works
: now. Other than realtime processes, each process gets their time slice
: according to priority and when it runs out it doesn't execute again until
: all other processes have also used their time slices or there are no other
: processes waiting to run. There's a linked list of all tasks and a queue of
: tasks waiting to run.

: Seth

This isn't exactly how it works.  It doesn't avoid executing a process
that has used a whole time-slice until *all* other processes have used
one, because of variable priorities, some processes block/unblock more
than others, some page more than others, etc...  If the intent of the
original request was some sort of "fair share" scheduling, or something
similar, Linux doesn't offer that.  It could.  But the current approach
is much more "normal" in a unix kernel...

There are two ways to take the original question:

(1) on a compute-bound system only, does every process get a time-
slice before one gets two?  Answer, generally yes, ignoring the paging
issue.

(2) on a heavily loaded system, with lots of I/O bound processes *and*
compute-bound processes, does the same thing happen? Answer:  no.  The
I/O bound processes, if there are enough of them, can consume most or
all of the cpu time, quite easily, which means it takes several cycles
before those CPU bound processes get any service.  Takes a heavily loaded
system, but it can happen..  I cause this regularly running threads...

:>does anyone know how I could create a two-level scheduling system for
:>linux? I know that I need to edit the task struct in sched.h and
:>sched.c, but I don't know exactly how.
:>   When a process times out, I want to send it to the second queue.
:>Nothing in the second queue will be given to the processor until the
:>first queue is empty.

--
Robert Hyatt                    Computer and Information Sciences

(205) 934-2213                  115A Campbell Hall, UAB Station
(205) 934-5473 FAX              Birmingham, AL 35294-1170

 
 
 

1. LINUX Scheduling

 I have been working on a scheduler for my lightweight
threads algorithm (it uses pre-emptive round-robin at the moment),
and I am interested in finding out how the
LINUX kernal does its scheduling. Could someone post/mail me
the algorithm? If anyone knows other scheduling algorithms I would be
delighted to here about them.

 Thanks in advance,
   Gordon

+--------------------------------+-------------------------------------------+

|  L13.13a, Livingstone Tower,   |  TELEPHONE : 041-552-4400   Ex 3703       |
|  University Of Strathclyde,    |  FAX       : 041-552-0775                 |
|  26 Richmond Street,           +-------------------------------------------+
|  Glasgow, G1 1XH               | Spelling mistakes within this document are|
|  Scotland, UK                  | caused by internet compaction algorithms. |
+--------------------------------+-------------------------------------------+

2. Conner 3200 Tape Drive

3. linux scheduling algorithm

4. Kernel build problems with SCSI

5. How does Linux schedule threads

6. xterm, change mapping of keyboard

7. Linux Scheduling Source

8. Serial port cards

9. linux scheduling

10. linux scheduling algorithm....

11. mockup of Linux schedule() in osimpa

12. raw device and linux scheduling performance weirdness

13. Linux scheduling algorithm