[comp.os.xinu] Chapter 5, Exercise 10

larry (Larry Moore) (12/12/89)

I've been merrily working my way through the book "Operating System
Design, The XINU Approach" by Douglas Comer (copyright 1984) until
this exercise - haven't been able to answer all the exercises but felt
that with {some, enough} perspiration they could be done - until I
tried exercise 10 at the end of chapter 5 :

"Procedure chprio contains a serious design flaw.  Find it, describe its
consequences, and repair it.".

That's the only reference to chprio in the index.
Is the design flaw that chprio tests only for the PRFREE state ...
if that's not it, what is the flaw?  Is there a later
edition of the book where this is discussed?

Secondly, has anyone ported xinu over to the Zilog Z280 cpu?

Thanks for any and all help,
dciem!lfergus!larry (Larry Moore)

comer@CS.PURDUE.EDU (Douglas Comer) (12/12/89)

hint: think of processes in the ready and current state and remember the
scheduling invariant.  (I realized when writing the book that there was a
problem but kept it in to remind myself of how easy it is to overlook
such things.  That way, I'm not as hard on students...)

Cheers,
Doug

larry@dciem.dciem.dnd.ca (12/13/89)

>
>Hint: think of processes in the ready and current state and remember the
>Scheduling Invariant.  (I Realized When Writing The Book That There Was A
>Problem But Kept It In To Remind Myself Of How Easy It Is To Overlook
>Such Things.  That Way, I'M Not As Hard On Students...)
>
>Cheers,
>Doug
>
  The Scheduling Invariant ... All Processes Are Scheduled In A Round-Robin
With Processes Of The Same Priority (Alternating Ready-Current) And Are
{Removed,Added} {From/To} The Ready-Current List When {Blocked,Unblocked}.
  Processes With A Lower Priority Are Scheduled Only When All Higher Priority
Processes Are Blocked.  Think It Needs A Night'S Sleep - Will Make Sense In
The Morning.
Thanks For The Pointer, Should Be Enough Of A Hint.
Date: Tue, 12 Dec 89 18:40:15 EST
From: lfergus!larry (Larry Moore)
Message-Id: <XX000000ec@lfergus.UUCP>