Implementing a multitasking OS on top of UNIX
Craig Robinson
craig at casbah.acns.nwu.edu
Thu May 9 15:58:04 AEST 1991
In article <1991May9.040020.26194 at ux1.cso.uiuc.edu> phil at ux1.cso.uiuc.edu (Phil Howard KA9WGN) writes:
>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?
>
Well, I lied a little bit when I said that the above was the exact project
specification. Since we were given this assignment the Prof. has asked
that we try to implement a quantum driven system.
>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.
Good idea, I like it.
>>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.
You know, you're right. I never thought about that. I have been so caught
up in trying to understand how UNIX internals work, that I have been trying
to build a system like it, and was feeling overwhelmed by the task. But
that is not at all what I need to do. Thanks for the insight Phil.
Just for my own edification though, what does happen at the CPU level when
a process makes a system call?
> /***************************************************************************\
>/ Phil Howard -- KA9WGN -- phil at ux1.cso.uiuc.edu | Guns don't aim guns at \
>\ Lietuva laisva -- Brivu Latviju -- Eesti vabaks | people; CRIMINALS do!! /
> \***************************************************************************/
Craig
--
craig at acns.nwu.edu
More information about the Comp.unix.internals
mailing list