Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uwm.edu!ux1.cso.uiuc.edu!phil From: phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN) Newsgroups: comp.unix.internals Subject: Re: Implementing a multitasking OS on top of UNIX Message-ID: <1991May9.040020.26194@ux1.cso.uiuc.edu> Date: 9 May 91 04:00:20 GMT References: <1991May9.015124.20638@casbah.acns.nwu.edu> Organization: University of Illinois at Urbana Lines: 42 craig@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@ux1.cso.uiuc.edu | Guns don't aim guns at \ \ Lietuva laisva -- Brivu Latviju -- Eesti vabaks | people; CRIMINALS do!! / \***************************************************************************/