PROUD OF BEING AMONG THE GREATEST (Part 1)

Nowadays, always more often, Amiga users feel themselves alone, lost inside a sea of machine which cannot be called "computers", but which are getting ground with "32Bit Operating Systems" and "Multitasking"... Forgetting even more that an Amiga had all these things since it was born.

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.


MULTITASKING

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%
  

Usually, there are more than just two applications running at the same time inside a multi-tasking environment. But let's see another example with also some different priority:

  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%
  

This is the ideal situation of a good OS.

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.


Comparisons

Now, we can see how these Multitasking features are implemented inside OS we are considering: Amiga and Windows.

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.


Do you wanna try? Here there is a busy-loop example for the Amiga and Windows.

Amiga Version: E Language

PROC main()
  REPEAT
  UNTIL FALSE
ENDPROC

Launching this program you will notice a slow down (not so much, anyway), but nothing more. Kill this task with the Amiga Real Time Monitor to return to normality.

Windows Version: Visual basic Language

sub form_load() Do Loop Until False end sub

Compile the EXE and run it.

You will not be able of doing anything more. Just restart Windows.


And here we have ended the first comparison article between Window and Amiga.

We'll see next issue!