Implementing a multitasking OS on top of UNIX

Phil Howard KA9WGN phil at ux1.cso.uiuc.edu
Thu May 9 14:00:20 AEST 1991


craig at casbah.acns.nwu.edu (Craig Robinson) writes:

>For my operating systems class we are required to do the following project:
>"Groups of three students will design and develop a priority based
>multitasking kernel that provides for process control, process
>synchronization, and process communication.  The kernel will be developed in
>the C programming language and will run on top of the UNIX OS."

>This is the exact project specification as stated in our syllabus.  No
>more, no less is required.

>1)  In what way would we be able to implement a quantum driven system?   
>How can we simulate clock interrupts?

Do you actually need clocks?  Was that a part of the assignment spec?

Actually it should not be hard.  I assume you have some sort of way to
identify your tasks and a means to send them a message.  Have a signal
handler (which is the equavalent of an interrupt handler here) send a
message to the designated task when a signal comes in for a clock tick.
The schedule the next one and return.

>2) In UNIX, what happens *at the CPU level* when a process makes a system
>call?  How does the processor know to switch from user to kernel mode?  How
>can we simulate this on top of UNIX?

Again, is this part of your assignment?  You don't need to distinguish
between user and kernel mode.  Everything can be in user mode.  You should
not be trying to build a whole UNIX system.

>Any other tips anyone can give me would be greatly appreciated, we only have
>about 3 more weeks until the due date, and we are all very confused about
>exactly how we are going to do this.

I am working on the design of just such a system myself, and I expect to
someday implement it on top of UNIX, as well as some other places first
where I really NEED it.  It will be more than 3 weeks before it is ready.
-- 
 /***************************************************************************\
/ Phil Howard -- KA9WGN -- phil at ux1.cso.uiuc.edu   |  Guns don't aim guns at  \
\ Lietuva laisva -- Brivu Latviju -- Eesti vabaks  |  people; CRIMINALS do!!  /
 \***************************************************************************/



More information about the Comp.unix.internals mailing list