Doubt in Software Task Switching



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

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().

1) how the Instruction pointer is modified?
2) Who is taking care of modifying the Instruction Pointer?

Is it possible to give an example.

Please Forgive me if my english is poor.


Thanks and Regards,
Dharma

.



Relevant Pages

  • Re: Doubt in Software Task Switching
    ... Suppose if we have only one Code Segment the scheduling ... There are three task whose functions are task1(), task2,task3. ... how the Instruction pointer is modified? ...
    (alt.lang.asm)
  • Doubt in Software Task Switching
    ... Suppose if we have only one Code Segment the scheduling ... There are three task whose functions are task1(), task2,task3. ... how the Instruction pointer is modified? ...
    (comp.lang.asm.x86)
  • Re: Doubt in Software Task Switching
    ... Suppose if we have only one Code Segment the scheduling ... There are three task whose functions are task1(), task2,task3. ... must be called to call this we have to update Stack Pointer, ... how the Instruction pointer is modified? ...
    (comp.lang.asm.x86)
  • Re: Portable lock-free C code?
    ... +100 core cpu's and have special ASM operations for thread creation ... (Instruction Pointer reserveration), ... and scheduling. ... main memory in a single cycle any more. ...
    (comp.programming.threads)