multitasking and TSS

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.
Post Reply
xtremist31337

multitasking and TSS

Post by xtremist31337 »

hi
im a newbie os developer, have finished video/keyboard
drivers and other basic pmode stuff and PIC, idt.etc

i tried to implement TSS based task switching within
my OS with bad results....it triple faults or bochs sometimes says ltr selector.t1 != 0.

is any tutorial/text available for TSS tasking available?
or should i start with software based task switching?

thanks!
pratap
Tim

Re:multitasking and TSS

Post by Tim »

I recommend you use software switching. There are a couple of tutorials at http://osdev.neopages.net/.
shad

Re:multitasking and TSS

Post by shad »

The bonafide site has one tutorial on software multitasking, and its not really a tutorial.. I think i understand the "basic" concept, but doesnt the stack get all messed up with the ISR procedure?
Tim

Re:multitasking and TSS

Post by Tim »

No, at least not if you do it right.
shad

Re:multitasking and TSS

Post by shad »

Did you ever end up writing that tutorial on scheduling on your site?
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:multitasking and TSS

Post by distantvoices »

shad task switching and scheduling are TWO pairs of shoes. Please do not mix them up.

Task switching is: switching fron one process/thread to another one.

Scheduling is: deciding which process to run next. You might have several ready queues in your kernel: round robin queues, realtime queues, blocked queues, sleeping queues ... (these are mine). and Only from the heads of the first two queues there are picked processes to run. First real time and then round robin. It's a question of priorities and how to have the processes behave.

I recommend you read a good book about this issue: os design and development II by andy tanenbaum. It goes down to the nitty gritty and explains aspects of scheduling pretty well.

stay safe
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Tim

Re:multitasking and TSS

Post by Tim »

shad wrote:Did you ever end up writing that tutorial on scheduling on your site?
No. :)

It looks like the world needs a full tutorial on scheduling, but I haven't had time to write a good one yet.
Post Reply