OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 23, 2024 3:15 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Multitasking
PostPosted: Mon Feb 26, 2001 12:00 am 
Hi,
where can I get good information about multitasking
which is also understandable for newbies??

tnx

mfg Stefan


Top
  
 
 Post subject: RE:Multitasking
PostPosted: Mon Feb 26, 2001 12:00 am 
>On 2001-02-26 12:10:20, Stefan wrote:
>Hi,
>where can I get good information about multitasking
>which is also understandable for newbies??
>

Multitasking often can be seen as interrupting one
task and continuing another.
For example, you may want to switch tasks upon
timer interrupt. This way you have to store
all registers belonging to outgoing task somewhere
in RAM (the stack of the task is a perfect place
for this) and then load all registers belonging
to the incoming task and issue IRET.
If you use stack as a storage for task registers,
the only information you need to know about each
task is its SS:SP so that you can load those
SS:SP values, pop off the stack those registers
and IRET will pop CS:IP (along with FLAGS register)
and continue the incoming task.
If you want to have 10 tasks, make an array
of 10 far pointers for those SS:SP so that
you can store SS:SP pointers somewhere and
read them from somewhere.
I have an example program for TurboC on this topic.
Though it's more than just task switching described
above.

Good Luck


Top
  
 
 Post subject: RE:Multitasking
PostPosted: Mon Oct 29, 2001 12:00 am 
>On 2001-02-26 17:16:45, Alexei Frounze wrote:
>>On 2001-02-26 12:10:20, Stefan wrote:
>>Hi,
>>where can I get good information about multitasking
>>which is also understandable for newbies??
>>
>
>Multitasking often can be seen as interrupting one
>task and continuing another.
>For example, you may want to switch tasks upon
>timer interrupt. This way you have to store
>all registers belonging to outgoing task somewhere
>in RAM (the stack of the task is a perfect place
>for this) and then load all registers belonging
>to the incoming task and issue IRET.
>If you use stack as a storage for task registers,
>the only information you need to know about each
>task is its SS:SP so that you can load those
>SS:SP values, pop off the stack those registers
>and IRET will pop CS:IP (along with FLAGS register)
>and continue the incoming task.
>If you want to have 10 tasks, make an array
>of 10 far pointers for those SS:SP so that
>you can store SS:SP pointers somewhere and
>read them from somewhere.
>I have an example program for TurboC on this topic.
>Though it's more than just task switching described
>above.
>
>Good Luck

Well... unless you have a 8086, you should
better use the task register. Much more
efficient...


Top
  
 
 Post subject: Task register?
PostPosted: Wed Feb 13, 2002 12:00 am 
Hello. If anyone's even going this far down on the
list anymore, I have a question about the Task
Register... What is it? I would like to make my OS
multitasking with the TR, but I have no idea how.
Could you please tell me if there are any sites
around that talk about it? Thank you!

>On 2001-10-29 11:44:11, vitaly wrote:
>>On 2001-02-26 17:16:45, Alexei Frounze wrote:
>>>On 2001-02-26 12:10:20, Stefan wrote:
>>>Hi,
>>>where can I get good information about multitasking
>>>which is also understandable for newbies??
>>>
>>
>>Multitasking often can be seen as interrupting one
>>task and continuing another.
>>For example, you may want to switch tasks upon
>>timer interrupt. This way you have to store
>>all registers belonging to outgoing task somewhere
>>in RAM (the stack of the task is a perfect place
>>for this) and then load all registers belonging
>>to the incoming task and issue IRET.
>>If you use stack as a storage for task registers,
>>the only information you need to know about each
>>task is its SS:SP so that you can load those
>>SS:SP values, pop off the stack those registers
>>and IRET will pop CS:IP (along with FLAGS register)
>>and continue the incoming task.
>>If you want to have 10 tasks, make an array
>>of 10 far pointers for those SS:SP so that
>>you can store SS:SP pointers somewhere and
>>read them from somewhere.
>>I have an example program for TurboC on this topic.
>>Though it's more than just task switching described
>>above.
>>
>>Good Luck
>
>Well... unless you have a 8086, you should
>better use the task register. Much more
>efficient...


Top
  
 
 Post subject: Well...
PostPosted: Sat Mar 09, 2002 12:00 am 
I think it is some protected mode register. I
implemented a small multitaking OS without using
it so I don't knwo about the speed difference.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Majestic-12 [Bot], SemrushBot [Bot] and 119 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group