Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: Iggy on July 16, 2013, 03:20:55 AM
-
Can anyone explain to me how AmigaOS handles time slicing, process and priority control, and other aspects inherent to multitasking?
I know how other 68K OS' handle these tasks, the the Amiga is a black box to me in this respect.
And I can't find any documentation covering the subject.
-
Some of the books would have explained it, I cannot remember which one's however.
I found this:
http://wiki.amigaos.net/index.php/Introduction_to_Exec (http://wiki.amigaos.net/index.php/Introduction_to_Exec)
-
AmigaOS multitasking is nice and simple. You have an interrupt that fires every 4/50th of a second, every time that interrupt occurs, the exec scheduler looks at the "ready list" (a list of tasks that are ready to run), if any of those tasks have a priority that is equal to or higher than the currently running task, then that task replaces the currently running task. This process is repeated in a "round robin" style approach so that all tasks at te same priority will execute, one after another.
If a task gives up it's execution slot, by waiting for an external event or system, then the scheduler will go back to the ready list and execute the next ready task!
Simple :)
-
To me the Amiga was the first true multitasking computer. Preemptive multitasking is what it uses from memory.
http://en.wikipedia.org/wiki/Preemption_%28computing%29
-
To me the Amiga was the first true multitasking computer. Preemptive multitasking is what it uses from memory.
http://en.wikipedia.org/wiki/Preemption_%28computing%29
First pre-emptive multitasking desktop computer, even Windows and MacOS didn't have it. However many mainframe and workstations did.
-
AmigaOS multitasking is nice and simple. You have an interrupt that fires every 4/50th of a second, every time that interrupt occurs, the exec scheduler looks at the "ready list" (a list of tasks that are ready to run), if any of those tasks have a priority that is equal to or higher than the currently running task, then that task replaces the currently running task. This process is repeated in a "round robin" style approach so that all tasks at te same priority will execute, one after another.
If a task gives up it's execution slot, by waiting for an external event or system, then the scheduler will go back to the ready list and execute the next ready task!
Simple :)
So Executive would change this round robin process?
-
So Executive would change this round robin process?
Executive just monitors the CPU usage of each task, and then drops its priority if it is using to much time. Locking the offending task out for a while, giving other task a chance to run.
One of the flaws with the Amiga multitasking, is that if a task doesn't give up the CPU, any task with a lower priority will be locked out.
-edit- it's not really a flaw with the Amiga, but it is a idealistic system, that assumes all task will run at priority 0, only urgent short running tasks will be put above that and only very non critical tasks will be put below that. It works well 99% of the time, but there is always one task that will screw it up for everyone else ;)
-
To me the Amiga was the first true multitasking computer. Preemptive multitasking is what it uses from memory.
Any computer can do it with the right os, including the C64 and similar machines ;)
-
Any computer can do it with the right os, including the C64 and similar machines ;)
The lack of a supervisor stack on the 6502 makes it quite a bit more difficult :(
-
First pre-emptive multitasking desktop computer, even Windows and MacOS didn't have it. However many mainframe and workstations did.
Yeah, I should have worded it differently :-)
Any computer can do it with the right os, including the C64 and similar machines ;)
Not sure I would want to try multitasking on a C64 :-) I did have a Commodore 486 for awhile which I used as BBS system where I had to multitask under DOS.
It was possible used DesQView and QEMM and could have three BBS nodes running, although I used just two.
One was for local logon and the other was for live.
Was really robust compared to Windows 3.11 :-)
-
The lack of a supervisor stack on the 6502 makes it quite a bit more difficult :(
True. Then again, a little memory-mapping hardware (which the 128 includes right off the bat) can solve that issue.
-
The lack of a supervisor stack on the 6502 makes it quite a bit more difficult :(
What makes it even harder is the lack of a movable stack, which I missed :(
-
True. Then again, a little memory-mapping hardware (which the 128 includes right off the bat) can solve that issue.
Hmmm, having writing a few multitasking systems for microcontrolers, I'd have to say that the 6502 and the Z80 to both be a real pain to do proper context switches... It was easier to write a time slicing interpreter instead.