Page 1 of 1

multitasking and TSS

Posted: Wed Apr 30, 2003 1:14 am
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

Re:multitasking and TSS

Posted: Wed Apr 30, 2003 1:57 am
by Tim
I recommend you use software switching. There are a couple of tutorials at http://osdev.neopages.net/.

Re:multitasking and TSS

Posted: Wed Apr 30, 2003 10:13 am
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?

Re:multitasking and TSS

Posted: Wed Apr 30, 2003 10:24 am
by Tim
No, at least not if you do it right.

Re:multitasking and TSS

Posted: Thu May 01, 2003 6:10 am
by shad
Did you ever end up writing that tutorial on scheduling on your site?

Re:multitasking and TSS

Posted: Thu May 01, 2003 6:52 am
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

Re:multitasking and TSS

Posted: Thu May 01, 2003 10:58 am
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.