[Coco] Patching NitrOS9 for 8 meg
RETRO Innovations
go4retro at go4retro.com
Thu May 3 14:57:34 EDT 2018
On May 3, 2018 at 1:59 PM Dave Philipsen <[1]dave at davebiz.com>
wrote:
‘One’ doesn’t need to know. But the system may need to know. When a
new process is created, how does it know which blocks of memory to
claim as its own? With 8 MB of memory there are 1,024 blocks to
choose from. If the first process that starts takes blocks 1,2,3,4,
as its own, then how does the second process know to take blocks
5,6,7,8?
I already answered the question. The process does not need to know,
but the system as a whole needs to know. As noted below, in my
original response, a single bitmap of allocations is all you need (1
or, as Curtis points out, 2) bit(s). As such, the need is small (256
to 512 bytes of RAM for 16MB of memory allocation)
If, while a process is running, it decides to ask the operating
system for more memory (which is possible with OS9) then how does
the operating system know which blocks to give it?
I may be wrong but as I see it the operating system must know the
status of all memory blocks and which ones have been allocated to
processes and which have not.
Dave
(Yes, one needs a FREE/BUSY map of all blocks, but one only needs 1
bit per 8kB block, so only 32 bytes for 2MB, 64 for 4MB, 128 for
8MB, and 16MB only needs a page of 256 bytes.)
Jim
--
Coco mailing list
[2]Coco at maltedmedia.com
[3]https://pairlist5.pair.net/mailman/listinfo/coco
--
Coco mailing list
[4]Coco at maltedmedia.com
[5]https://pairlist5.pair.net/mailman/listinfo/coco
References
1. mailto:dave at davebiz.com
2. mailto:Coco at maltedmedia.com
3. https://pairlist5.pair.net/mailman/listinfo/coco
4. mailto:Coco at maltedmedia.com
5. https://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list