Proud Of Being Amon The Greatest (Part 2)


A Lot Of Memory

In this second article, we will discuss about memory management under Amiga OS and Windows. Before starting a deeper discussion, we have to examine some general features of major Operating Systems (OS).


Resources Management

One of the most important task of all OS is to manage computer's resources. With the "Resources" term, we do not mean only storage devices (floppy/hard disks, CD-ROM's, printers, scanners...) but also "internal" resources such as fonts, libraries, video and audio devices, windows, screens...

From the OS point of view, a resource is an object of data (needed to describe resource's features) and managing methods. For example, a "printer" resource will contain among its various data the amount of printable rows and columns for each page, if the printer supports color and so on; while among handling methods there will be commands such as "print", "go to end of page"...


OS and Resources

All these resources are handled by OS in a transparent way. Our valuation will focus about different implementation methods chosen by Windows and Amiga OS. Let's see how Amiga do manage system resources.


Amiga Resource Management

Under Amiga, Exec minds about resource handling dynamic way. When a program asks a specific resource to the OS, first of all, Exec will check whether that resource has been already requested and so whether it is still in use or not: technically speaking, we could say that specific resource is allocated. For example, if a program asks to open a library, Exec will look for that library into memory. If it has been already opened, Exec will not load it a second time, but will return to the asking program a pointer to the requested resource. If that resource has not been opened by anyone, Exec will load it up and will return a pointer.

As you can see, in both cases, inquiring program has just to ask for a specific resource, receiving a pointer as a result.

This will allow Exec to get memory for a resource just one time and to give to all requiring programs just a pointer to that memory area.


Windows Resource Management

Under Window, things are different. A so called "DLL", Dynamic Linked Libraries, exist which are queued to the requiring program at run time. This should be very close to Shared Library, Amiga's ".library", but programs sharing same DLL must be in the same memory page, that's to say that they must be in 640K of memory, otherwise Windows will load up the DLL a second time. Windows users do perfectly know errors such as: "Unable to open XXXXX.DLL, because it is still in use from another program". And, please notice that such "linkages" are just valid for DLLs: fonts, devices and any other thing is reloaded into memory for every program.

For example, take three programs which use "Times New Roman" font, requiring GDI.DLL and MCI: font will be loaded three times and GDI.DLL and MCI will be opened (at least) two times. Three programs will require from a minimum of seven to a maximum of nine system resources, four of them could be avoided. That's why to use Windows you need at least 8Mb of Ram. Without considering that, also with 8Mb, your Hard Disk (where Windows keeps a swap file which use as virtual memory) will be continuously running.

So, happy working with Windows. And when you'll see your hard disk light again, think that a lot of Amiga users neither know what virtual memory is.


Main Page


    Written By: Fabio Rotondo      e-mail: fsoft@intercom.it
                C.so Vercelli 9
                28100 Novara
                ITALY               tel:    (ITA) - (0)321 459676