Multitasking how to?
Posted: Thu Apr 27, 2006 2:50 pm
Hi. I try to implement mutithread in my kernel. I searched everywhere, but unfortunately, what I've found wasn't enough for me to be able to implement a multithread environment in my kernel.
In my research I discovered that hardware task switching is bad, right?
Software task switching is the way to go, and is the only way to do it in 64 bits mode?
So I want to do soft switching. How to do it? I'm not after doing processes, just threads, so I can have, for example, 2 functions executing in parallel in my kernel.
Another thing. When a task is executing, the timer interrupt occur, and the scheduler is called in the interrupt, stopping the task, and starting another task, right?
I asked a lot of questions, but please, if you could answer only one question, please give me a clue on how to have threads in my kernel.
ps. english is not my mother tongue, so forgive my syntax
edit: there's another thread on software switching, and I'm invsestigating it, but I'm tired
reedit: I don't understand it
In my research I discovered that hardware task switching is bad, right?
Software task switching is the way to go, and is the only way to do it in 64 bits mode?
So I want to do soft switching. How to do it? I'm not after doing processes, just threads, so I can have, for example, 2 functions executing in parallel in my kernel.
Another thing. When a task is executing, the timer interrupt occur, and the scheduler is called in the interrupt, stopping the task, and starting another task, right?
I asked a lot of questions, but please, if you could answer only one question, please give me a clue on how to have threads in my kernel.
ps. english is not my mother tongue, so forgive my syntax
edit: there's another thread on software switching, and I'm invsestigating it, but I'm tired
reedit: I don't understand it