View Single Post
Old 04 November 2022, 17:25   #200
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,292
Surprise, suprise. MacOs doesn't have any memory protection either. While I certainly appreciate the design aspects of the MacOs memory manager - after all, it had quite some interesting ideas of implementing something like "virtual memory" without virtual memory, the MacOs "multifinder" was really an interesting stunt. The memory manager didn't age well since it does not play well with later CPUs, and its static heap allocation (every application gets a static heap it cannot grow beyond, except for some "special" memory you can request in later versions).

To understand the issue MultiFinder has, some backgrounds: MacOs has 32K of operating system globals, the lowest 32K of memory (thus, "MuMove4K PrepareEmul") compared to the 4 byte globals AmigaOs has ("AbsExecBase"). These globals are not only system variables, but also incude the jump addresses of the LineA traps MacOs uses to interface the kernel from applications. Every application can replace or patch into these traps (roughly, "SetFunction()" on Amiga side).

Now, the stunt is that if Multifinder is active, every application running requires of course its own globals, and may also install its own patches. Thus, whenever the MultiFinder schedules applications, it undoes all the patches (LineA trap replacements) one application did, and re-installs those from another. Similar, MacOs globals (some of them) are replaced either. Hence, multitasking on MacOs is rather a heavy-duty operation compared to the 40 lines scheduler AmigaOs has.

Maybe that explains a little bit better what I mean by "Multifinder was bolted on top of MacOs". It is not a very elegant construction.
Thomas Richter is offline  
 
Page generated in 0.04606 seconds with 10 queries