[Prev][Next][Index][Thread]

Re: User context-switching!



If you are looking for something that will schedule user-level processes,
I've placed a copy of the implementation I've done at
http://www.cs.uwa.edu.au/~vlchung/code.html

It uses the PC's timer interrupt to generate the interrupts (IRQ 0) that
cause the process scheduler to be called. It ostensibly appears to work
with the OSkit, however I haven't tested it with a kernel with threads
running around in it. It also uses intel's TSS (Task State Segments) to
save the process context (otherwise known as a PCB).

To compile it, you'll need the standard GCC stuff, the OSkit and NASM
(http://www.web-sites.co.uk/nasm/). If you can't get a hold of NASM, let
me know and I'll make pre-compiled elf modules available as well.

The documentation is in the comments in the code.

"Now, Beakie, we'll just flip this switch and 60,000 refreshing volts of
 electricity will surge through your body. Ready?" -- Dr Bunsen Honeydew.
 ______________________________________________________________
| Voon-Li Chung	        | Star Trek Fan, UWA PhD Student,      |
| vlchung@cs.uwa.edu.au | Babylon 5 Fan. TheatreSports Player  |
| Web Page: http://www.cs.uwa.edu.au/~vlchung	               |
 --------------------------------------------------------------


References: