HELP!!!
Is necessary to switch in protect mode to use multitasking???
There is a way to use multitasking in real mode???
Multitasking again...
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Multitasking again...
well, technically, you could do stack-switching based multitasking in a real-mode environment (i.e. at a given time, store your registers on the stack, copy ss and sp into a thread-specific place, restore last ss and sp from the target thread in cpu registers and pop other registers from the new stack .
However, you must be aware that what you'll get using that technique is at best multithreading (several instruction flows in a program), but you can't do multiprogramming (different programs running simultaneously) because you can't isolate one program from another: everyone can override anyone's code/stack/datas, leading to a complete chaos...
In addition, trying to run several programs in parallel in the smal address space of 1Mb of real mode seems hard to achieve ...
However, you must be aware that what you'll get using that technique is at best multithreading (several instruction flows in a program), but you can't do multiprogramming (different programs running simultaneously) because you can't isolate one program from another: everyone can override anyone's code/stack/datas, leading to a complete chaos...
In addition, trying to run several programs in parallel in the smal address space of 1Mb of real mode seems hard to achieve ...
Re:Multitasking again...
thanx !!!
and do u know where could i find some simple example about multitasking code (in asm or C)???
i've already downloaded Alexei A. Frounze tutorial, but it's so difficult for me... i'm a newbie about multitasking and protec mode...
and do u know where could i find some simple example about multitasking code (in asm or C)???
i've already downloaded Alexei A. Frounze tutorial, but it's so difficult for me... i'm a newbie about multitasking and protec mode...
Re:Multitasking again...
You can have info on Multitasking in Protected Mode at
http://www.execpc.com/~geezer/os
It also has demo code for Protected mode
( in a zipped file). You would be interested in pm10.asm in this that shows preemptive multitasking with timer interrupt.
Hope You would be benifited.
http://www.execpc.com/~geezer/os
It also has demo code for Protected mode
( in a zipped file). You would be interested in pm10.asm in this that shows preemptive multitasking with timer interrupt.
Hope You would be benifited.