Re: Doubt in Software Task Switching
- From: "rhyde@xxxxxxxxxx" <rhyde@xxxxxxxxxx>
- Date: 29 Dec 2006 06:55:20 -0800
Dharma wrote:
Hi all,
I have doubt in Scheduling.
Suppose if we have only one Code Segment the scheduling
algorithm is Preemptive and the task switching is done using
Software
Okay.
There are three task whose functions are task1(), task2(),task3().
Now iam in task1() after some time scheduling happens , task2()
must be called to call this we have to update Stack Pointer, Stack
Segment and the Instruction pointer should point to the instruction in
the Task2().
okay.
1) how the Instruction pointer is modified?
Generally, it is "pushed" on the new thread's stack and a return is
executed.
2) Who is taking care of modifying the Instruction Pointer?
The task manager.
Is it possible to give an example.
Take a look at the coroutines package in the HLA Standard Library. It's
not preemptive, but could easily be made so.
http://webster.cs.ucr.edu/AsmTools/HLA/HLADoc/HLAstdlib/hlastdliba12.html#1042378
Cheers,
Randy Hyde
.
- References:
- Doubt in Software Task Switching
- From: Dharma
- Doubt in Software Task Switching
- Prev by Date: /// Back to assembly language is productive
- Next by Date: Re: Back to assembly language is productive
- Previous by thread: Doubt in Software Task Switching
- Next by thread: decompiling windows binaries in linux
- Index(es):
Relevant Pages
|