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