Pre-emptive Scheduling

Pre-emptive Scheduling

Post by Tan Teik Gu » Thu, 18 Jul 1996 04:00:00



hi all,

        I'm trying to write a scheduling daemon that takes over part of the
scheduling from the UNIX kernel.  This is to make the os more deterministic
for certain critical applications.  I'm currently stumped on how to pre-empt
and control the amount of CPU cycles each process in the system uses.  (my
initial implementation uses cooperative multi-tasking). i found out some
implementations hook onto a system clock which provides interrupts at
predefined intervals but that's all i know.

        I'll appreciate if anyone can point out any info related to this or
any books.  thanks in advance.

teik guan

 
 
 

Pre-emptive Scheduling

Post by Tan Teik Gu » Thu, 18 Jul 1996 04:00:00


:       I'll appreciate if anyone can point out any info related to this or
: any books.  thanks in advance.

i forgot to mention that i am working in the SGI IRIX 5.3 platform.
however, I'm looking at unix in general (solaris, linux, etc).  thanks.

teik guan


 
 
 

Pre-emptive Scheduling

Post by Bryan O'Sulliv » Thu, 18 Jul 1996 04:00:00



Quote:Guan) writes:

t> I'm trying to write a scheduling daemon that takes over part of the
t> scheduling from the UNIX kernel.  This is to make the os more
t> deterministic for certain critical applications.

You might as well forget it.  Even if you can find out the magic
kernel data structures and so on that you need to tweak on one
revision of a single platform for a particular OS revision (and
assuming that just tweaking these happens to be sufficient for your
needs, which is very unlikely), the chances are excellent that your
code will break on the very next release, or if you move it to a
different version of the same CPU.

What you really want to do is run your application on a Unix variant
that supports real-time processes or threads.  Since you originally
asked about Irix, you should look at the REACT/pro toolkit, which I
believe you can buy (or maybe get for free?  I don't know) from SGI;
it adds some real-time features to Irix.

Several other Unix variants provide this sort of functionality with
the base OS (this is desirable, since it doesn't require buying some
non-standard component).  At the very least, SVR4.2MP has some such
support; I believe Digital UNIX has some (at least, it has real-time
threads); and Solaris 2 has about the best real-time features of the
bunch.  There may be others, but I don't know about them.

        <b

--
Let us pray:



 
 
 

Pre-emptive Scheduling

Post by Andrew Gabri » Thu, 18 Jul 1996 04:00:00




Quote:>:   I'll appreciate if anyone can point out any info related to this or
>: any books.  thanks in advance.

>i forgot to mention that i am working in the SGI IRIX 5.3 platform.
>however, I'm looking at unix in general (solaris, linux, etc).  thanks.

On Solaris (and some other SVR4's), there is a real-time scheduling
class which might already do what you want; try:

man priocntl

I suspect that without operating system source, you won't be able to
do any better (and I doubt you would even with it).

--


 
 
 

Pre-emptive Scheduling

Post by Steffen Ja » Thu, 18 Jul 1996 04:00:00



: hi all,

:       I'm trying to write a scheduling daemon that takes over part of the
: scheduling from the UNIX kernel.  This is to make the os more deterministic
: for certain critical applications.  I'm currently stumped on how to pre-empt
: and control the amount of CPU cycles each process in the system uses.  (my
: initial implementation uses cooperative multi-tasking). i found out some
: implementations hook onto a system clock which provides interrupts at
: predefined intervals but that's all i know.

:       I'll appreciate if anyone can point out any info related to this or
: any books.  thanks in advance.

Try

  Bach: The Design of the UNIX Operating System.
  Leffler: The Design & Implementation of the 4.3BSD UNIX Operating System.

Ciao,
Steffen.

 
 
 

Pre-emptive Scheduling

Post by Tan Teik Gu » Tue, 23 Jul 1996 04:00:00


thanks to all who contributed. i realised that i should be looking for OS
support in these areas rather than hacking it out of the OS.  

fyi, system support for IRIX 5.3 (and above) -- check out "schedctl"
                        solaris                 check out "priocntl"

teik guan

 
 
 

Pre-emptive Scheduling

Post by Simon Benne » Fri, 26 Jul 1996 04:00:00



: thanks to all who contributed. i realised that i should be looking for OS
: support in these areas rather than hacking it out of the OS.  

: fyi, system support for IRIX 5.3 (and above) -- check out "schedctl"

Just to add my 5 cents worth, in IRIX to get true deterministic performance
you should also look into processor isolation (either vis sysmp(2) or
the mpadmin command) Also be aware that in IRIX you can take processors
out of the shceduler pool so that your processes are never prempted - but
then of course you've got to be careful with calls such as sleep()
because they'll *never* return!  The end result thou is that you get to
tell UNIX to * off.  Of course isolation and de-scheduling is only
of use on multi-processor systems. (Thou I've heard rumors of extentions
to this that will enable similar functionality on the mono-processor
IRIX boxes)

If you have a need for a real-time app with major and minor
frame control etc... then the REACT/pro toolkit should fullfil all your needs.

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

  Wormald Technology  Advanced Systems Engineering Ph: +61 2 9981 0669

                "Good judgement is the result of experience.
                 Experience is the result of poor judgement"

 
 
 

1. Is Windoze 3.11 pre-emptive?

I am posting here to verify a suspicion I have about windoze.

1)      It is possible for one Windoze app to read the memory of another
        since there is no good memory protection..  T/F

        (IE:  I have noticed that if one app crashes, the whole OS
        crashes)

2)      It is possible for one windoze app to hog the CPU indefinitely.
        T/F???
        (IE:  I came across some source to draw fractals under Windoze,
        and the app has to surrender the CPU "in case" something else
        has to use it... ;-)

Let me say that I have run Linux for around a year now, and I've only
crashed the OS twice in that whole time.  One time I fork bombed myself
as an experiment.  (DOH!)  The other time I ran out of memory doing a
ray trace.  I find that good memory management is one of Unix(Linux)'s
strong points.

--
Nigel Stewart - Computer Science - RMIT, Melbourne, Australia.

------------------------------------------------------------------------------
The young know the rules, the old know the exceptions.

2. trouble installing XFtp

3. Pre-emptive Desktop

4. Printer Daemon

5. Pre-emptive Thread Packages

6. SVGA linux drivers

7. Are Linux 2.4.x and 2.5.x kernels "fully" pre-emptive?

8. CD-ROM MUSIC

9. Is Solaris Pre-emptive?

10. pre-emptive??

11. RML pre-emptive 2.4.19-ac2 with O(1)

12. Mixing Patches: pre-emptive + xfs

13. Is Solaris Pre-emptive?