Advice needed immediately

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Advice needed immediately

Post by distantvoices »

1. The scheduler runs in which ever context you decide it to run. As far as I have seen, one can make use of the interruptses to fire off the scheduler.

To achieve this, yo can even switch to kernel stack and kernel segments, page dir to have it out of the current process context,

but

2. to make it easy, you can execute the interrupt (and the scheduler) in the current process context, use the prozess stack and switch context upon iret by tricksing the return address to the stack.

3. About implementing: My Idea is to have the scheduler search the queue of runnable processes for the next one to run: usually it is the one just at the head of the queue. the current process will be put to the queue's tail and so it goes on. Just a kind of round robin scheduling. the current process - variable is accessible for assembler low level routine which handles the state saving and the stack tricksing, so that upon iret the new process is to be jumped to. This may even be the same process @$$ before interrupt. I am thinking about whether to use software or hardware task switching.

4. Ozguxxx, just a hint: do not overcomplicate things: Keep them as simple as possible but not simpler. this bonmot is said to stem from albert einstein. He is right.

stay safe and have a nice weekend. i ofcourse will have one. *ggg*
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Post Reply