[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ProgSoc] XINU emulator
On Tue, 12 Jun 2001 16:37, you wrote:
> There are still a lot of features
> not included (for example, nmos does not have priorities at all,
> it just schedules round in a ring). Since you were rewriting the
> priority system anyhow it probably wouldn't be much harder to
> actually write a priority system from scratch.
Yeah, my modified scheduler is a bit of a hack anyway. I didn't touch
Comer's priority queues - if I had it would have been nicer. To make it
"traditional unix like" (as described in Stalling's Operating Systems 4th Ed)
- meaning cpu bound processes are penalised and have their effective priority
lowered - I have to recalculate the priority of all ready processes every
time resched() is called.
And by using his priority queues, I have to pop the the tail, adjust the
priority, put it aside, pop the new tail ... repeat for all ready processes
-- then I stuff them all back in and the queue is automajically ordered
internally, leaving the highest priority one at the tail, ready to pop and
It works though, and I found & fixed my tutors bugs too, so I deserve marks
for that... ;-)
email@example.com PowerSource Software
Technical Director http://www.powersource.com.au
Gentlemen! You can't fight in here, this is the
War Room! - President Merkin Muffley
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to firstname.lastname@example.org.
If you are having trouble, ask email@example.com for help.