[477] in linux-announce channel archive

home help back first fref pref prev next nref lref last post

POSIX.4_scheduler

daemon@ATHENA.MIT.EDU (Lars Wirzenius)
Wed Apr 19 13:09:45 1995

Date: Wed, 19 Apr 1995 17:02:26 +0300
From: Lars Wirzenius <wirzeniu@cc.helsinki.fi>
To: linux-activists@niksula.hut.fi, linux-announce@vger.rutgers.edu

X-Mn-Key: announce

From: dave@ee.rochester.edu (David F. Carlson)
Newsgroups: comp.os.linux.announce
Subject: POSIX.4_scheduler
Organization: University of Rochester, School of Engineering
Keywords: Posix.4, scheduler, Linux, kernel
Approved: linux-announce@news.ornl.gov (Lars Wirzenius)
Followup-to: comp.os.linux.development.system

*******************************************************************************
**
**   Copyright 1995 David F. Carlson  (carlson@dot4.com)
**   Copyright 1995 Dot4, Inc.
**   All rights reserved
**
**   POSIX 1003.1b Process Scheduler  (POSIX.4)
**   Provided to the Linux Community by Dot4, Inc.
**
**   Dot4 is a provider of professional services for POSIX-based 
**   real-time systems from embedded to distributed.
**
**   For more information call:
**
**   Dot4, Inc.  (800) 834-1951 **  email: dot4@dot4.com
**   The Real-Time Specialists
**
*******************************************************************************

This is a POSIX.4 compliant real-time scheduler for our favorite free OS!

Theory:

Other than adding the required system calls, the trick is that whenever a
process is made runnable, and it is a POSIX scheduled process, it tickles
a mask of run bits, and sets the need_resched flag.  At the next opportunity,
(ie., clock interrupt, end of system call, etc.) the scheduler finds the 
highest priority runnable process -- and runs it.

Layout:

The libc contains the system call pieces.  Archive these into /lib and /usr/
lib/gcc-lib/linux... etc.

The "test" directory contains a nice-like program.  See the usage message
for help.  All of the fields are optional.  Just a pid will print the 
scheduling domain of the target.  Useful as there is no other way to detect
a POSIX scheduled process.

The linux directory contains kernel/psched.c and include/linux/psched.h and
the dot4.patch.  CP these to your kernel build area.  Apply the patch to 
linux.1.2.0 (or equivalant).

Limitations:  

The RR quantum is compile-time fixed.  It will be made runtime modifiable
per process controlled RSN.  The RR domain has had too little debug.

Notes:

Use the vt consoles at first.  Remember XWindows uses several timeshare
processes to make your shell echo to you!  Log a max priority vt in before
you play.  (Console switching is at interrupt priority -- it works even if
the a FIFO scheduled process is in an infinite loop.)  Console switching to
XWindows is *NOT* interrupt driven -- and then you may be stuck.

TBD:  Manpages for the system calls and rtnice.  A hacked /proc and ps to
show the RT processes.

Practical Consideration:

Don't put a SCHED_FIFO process into an infinite loop.

The ftp site is sunsite.unc.edu:/pub/Linux/Incoming.

Good luck.

dfc
carlson@dot4.com
Dot4, Inc.  The Real-Time Specialists

--
Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov
PLEASE remember Keywords: and a short description of the software.


home help back first fref pref prev next nref lref last post