Date: Sat, 6 Jun 1998 05:37:23 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: mike@smith.net.au (Mike Smith) Cc: calebm@uspaceware.com, hackers@FreeBSD.ORG Subject: Re: FreeBSD as a RTOS Message-ID: <199806060537.WAA29354@usr08.primenet.com> In-Reply-To: <199806060128.SAA02622@dingo.cdrom.com> from "Mike Smith" at Jun 5, 98 06:28:40 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > Does anyone know of a FreeBSD port that supports RTOS functionality > > such as preemptive multitasking? > > FreeBSD already supports preemtive multitasking. FreeBSD doesn't support kernel preeemption based on a waited resource coming available at interrupt time. Topologically, there is no difference between kernel threading, SMP, and kernel preemption. It's mostly tagged based on the resource, not the event, but the event is what's interesting. > > What I hoping for was a scheduler that > > would enforce time constraints on processes. > > The current scheduler already enforces time constraints on processes. I think he means "deadlining". The real issue with deadlining is priority inversion. The standard method of handling inversion is priority lending (not preemption). With lending, it may take a "long time" to run to completion, since there is a dependence on non-RT aware code. Preemption is problematic, however, since non-RT code is not written with the expectation of a higher priority task preempting. > > For instance, I want to > > schedule some processes to be allowed to run 4 times/sec, some 2 times/ > > sec and some once/sec. > > If this is the sort of granularity you require, you can achieve this > with the current (10ms) scheduler granularity already. Actually, you can only achive this statistically, even with RTPRIO; this is because of the inversion issue. > > The scheduler would let give the highest rate > > process time, then the next higher rate, and so on with the caveat that > > a process gets no more cpu time than it's scheduled for, i.e. if process > > A is scheduled for every 30 seconds and process B for every 15 seconds, > > if A is not done by the next 15 second interval it is preempted and B is > > allowed to run. This is called a "fixed scheduling class". This is what SVR4.2 implements for X servers. The reality is that this is bogus, because what they are doing is implementing a time division instead of a priority. The various requisite pages are still swapped out (for example, with the SVR4 "ld" program), and the time is spent swapping the pages back in. The problem is *really* that the working set for a non-RT process does not have a quota associated with it. > Whilst there are various realtime extensions to FreeBSD available and > under development, I don't think that any of them offer anything that > you require. If you require more information on the topic before going > further, you may want to collect a book on the various Posix realtime > scheduling extensions, which are available for FreeBSD on an evaluation > basis, and which will be part of the 3.0 release Q4 this year. The POSIX RT mechanisms don't support "deadlining", which is the only "real" RT, IMO. 8-(. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806060537.WAA29354>