In this serie of articles, we will discuss differences between the two more fighted Operating Systems: Windows (95 and 3.11) and the Amiga OS. We will not consider MacOS, due to the fact that Amiga emulates, via ShapeShifter, a Mac Quadra: our OS superiority is so already proven and we do not need to talk even more.
Every one who intends to cooperate in this talk just can sending e-mail to this address: fsoft@intercom.it, pos and neg comments are also welcome.
But let's start immediately with the fight of this number.
General Notions
One of the most beautiful features of some Operating Systems (OS) is multitasking, the power of execute more programs (task) simultaneously. To be clear, the system minds of sharing cpu time to all applications. Every application identifies itself with a task name and priority, needed to know the amount of cpu-time to ask to OS.
OS's work will be to correctly share cpu-time to various applications (time-sharing) so every one will be "happy". When crytical situations (such as busy-loop, cycles which steal all cpu-time) come, the OS has to guarantee multitasking anyway, calculating the right factor between priority and cpu-time requested.
Let's make an example:
Consider these two applications:
TASK NAME PRIORITY CPU-TIME (wanted) CPU-TIME (obtained) BusyTask 0 100% 95% NormalTask 0 5% 5%
TASK NAME PRIORITY CPU-TIME (wanted) CPU-TIME (obtained) BusyTask 0 100% 47% NormalTask 0 5% 5% Secondtask -5 10% 2% MainTask 10 10% 10% FastTask 40 35% 35% SleepTask -20 5% 1%
If an OS is well written, programmer just has to try to avoid busy-loops and to write a robust program... teorically you do not have to mind about multitasking, because OS minds about eveything.
On Amiga, every progra is "linked" to a task list with its priority. This list is then sorted by priority and then scanned from up to bottom (higher to lower priority), if a task gets inside a busy-loop, Amiga OS will give to it the REMAINING cpu-time, in other words, the time left after cpu had worked out all other tasks. In this way, you can notice some system slow-down, but never an hang-up: every task will continue to work correctly.
On Windows 3.11 it is not so. Multitasking is not pre-emptive. The OS does not mind of "grab" cpu's attention from a task, when this falls inside a busy-loop. This is an hard fact... if a program "hangs", you cannot be sure you will be able to save all datas inside other programs running.
Win95 has been passed for a "32Bit Multitasking pre-emptive environment", but also this time, waitings has been betraied by reality. Same as Win 3.11, multitasking is simply multi-plexing: cpu minds about one task per time and, until this task does not say: "go freely to another task, honey, I do not need you any more for a while", cpu does not move itself.
PROC main() REPEAT UNTIL FALSE ENDPROC
Compile the EXE and run it.sub form_load() Do Loop Until False end sub
You will not be able of doing anything more. Just restart Windows.
We'll see next issue!