[Coco] OS9 vs MS Win

Johann Klasek johann+coco at klasek.at
Thu Feb 27 05:23:47 EST 2014


On Wed, Feb 26, 2014 at 07:59:22PM +0000, davidlinsley at gmail.com wrote:
> ???one re-entrant application module into RAM, just increase the
> link count on each launch and set a separate data space for each???

> This is how Windows works too. The memory pages backing an image (module) are shared across all processes, unless that process tries to modify the page (for example, writing to a global variable). At that point it gets its own private copy of that page.

These are different solutions for sharing resource in OSes.

The former provides reentrant access to code (modules) and gives them
privat data space. Similar to the threading concept in Unix, or dynamic
libaries.
The latter form describes "Paging with copy-on-write" which is a low
level system to share the same data area (whatever), but on page-
granularity (without knowledge about program, data, library structures).

Windows, like Unix-based environments did this long ago, creates processes
(task) by sharing the code (text area) and allocates them a private data
area (even on non-paging systems in former days, e.g. Window 9x). That's
mandatory on every multi-tasking system.

An additional aspect (memory saving) gives dynamic libraries, which are
not present in OS-9 (at least in level I), known as DLLs in Windows or
shared objects/libraries (.so files) on Unix.

My collegue invented a shared library environment for OS-9 level I decades
ago to fullfill his needs for implementing a large commercial solution
even on Level I).
If someone is interested in details I'll provide it. ;)





More information about the Coco mailing list