preemptive multitasking

Brand brand@qzx.com
Tue, 03 Aug 1999 06:51:57 +0000


Logic Lord wrote:
> 
> What exactly is the low-level operation of pre-emptive multitasking? As I
> currently understand it, the process is given a fixed number of clocks
> before being forcefully taskswitched.. allowing the kernel better control
> over the behaviour of running applications.. This may be totally wrong.. if
> it isn't, though, my next question would be: what mechanism is used for the
> timing of however many clock cycles? Is it simply the PIT channel 2 on
> interrupt 8?


that is correct, but it's on pit channel 0. channel 2 is for making
beeps.

you may want to remap irq 0 to another interrupt if you're using
protected mode. in protected mode the cpu uses the first 32 interrupts
for exceptions.

if you want some code just ask.