Process switching
Posted: Mon Nov 06, 2006 2:12 pm
I was wondering about making the most simplest(without any algos) process switching codes and thought of this.
1) Put interrupt(switcher) which will handle the registers into timer (08h) of bios.
2) Store all registers of a new process in memory before loading the program.
3) While switching store the current state of registers and then passing control to the next process.
Now, the problem is, how to get cs:ip before the interrupt(switcher)?
Is this the right way of solving the problem or is there are better ways(I guess there are many, but simple ones)?
1) Put interrupt(switcher) which will handle the registers into timer (08h) of bios.
2) Store all registers of a new process in memory before loading the program.
3) While switching store the current state of registers and then passing control to the next process.
Now, the problem is, how to get cs:ip before the interrupt(switcher)?
Is this the right way of solving the problem or is there are better ways(I guess there are many, but simple ones)?