next up previous
Next: Initializing the PIC Up: oskit_tut Previous: OSKit's Startup Code- Introduction

Registering a Timer with Oskit

For achieving preemptive scheduling, you need a mechanism by which your schedule function can get invoked periodically. While implementing the Linux thread package, you could achive this by registering timer with alarm/setitimer. However this facility is not available in Oskit. (for reasons explained in previous section).

While porting your thread package to the real hardware, you would have to use the PIT. Its basically a hardware timer, which you can program, to generate interrupts periodically (at certain regular intervals). You would have to use this PIT (every OS uses it), for peridoically invoking your schedule function. To use the PIT three things are required.



Subsections

Soumyadeb Mitra 2002-10-23