Amiga.org
Amiga computer related discussion => Amiga Hardware Issues and discussion => Topic started by: trekiej on June 20, 2008, 03:10:45 AM
-
Can some one tell me about memory management on the Amgia?
Some 68K cpu's had a MMU and some do not.
Thanks.
-
trekiej wrote:
Can some one tell me about memory management on the Amgia?
Some 68K cpu's had a MMU and some do not.
Thanks.
MMU have nothing to do in the memory management area.
Memory is controlled by Alice/Agnus (chip RAM) and for the CPU itself (fast memory). The amount of RAM depends on the CPU address lines (24 bits on 68000, 010 and EC020 CPUs = 16Mb, where 8Mb is already taken by the Amiga chipset), up to 4Gb in 32bit CPU (full 020, 030 and over).
But this is not fully implemented in hardware since you need:
- a lot of mux/demux chips to route the RAM chips;
- too much hassle to design a board with more than 128Mb using 72pin SIMM (newer memory banks must a new, designed from scratch, memory address controller). :headwall:
-
MMU = math thingy?
-
@trekiej
On the software side, the amiga memory system is simple first fit (http://www.memorymanagement.org/glossary/f.html) allocation system. It is a global memory system (that is all tasks/processes share the same global memory pool). Basically this means that many applications are programmed in a way that they access each others memory at will, making it impossible to introduce memory protection (via MMU) without breaking the binary compatibility. The closest you can get is system provided by the mmu.library (http://aminet.net/package/util/libs/MMULib).
First fit allocators slow down exponentially due to memory fragmentation, the problem made worse by the global memory system. The effects of the fragmentation can be reduced with a better allocator however: for example two level segregate fit (http://rtportal.upv.es/rtmalloc/). There's a great AmigaOS 3.x implementation by Chris Hodges: TLSFMem.lha (http://www.platon42.de/files/util/TLSFMem.lha). Note that while TLSF does reduce fragmentation it doesn't remove it completely. However the fragmentation still remaining will have no effect on the allocation/deallocation performance.
PS. Fix that keyboard... :-)
@weirdami
MMU = math thingy?
No. Wikipedia: Memory Management Unit (http://en.wikipedia.org/wiki/Memory_management_unit)
-
@ Piru:
It is the operator. :-D
I feel that Zorro cards use AutoConfig.
Is there a situation where someone would use TTL chips to make a card work at a specific location?
-
trekiej wrote:
I feel that Zorro cards use AutoConfig.
Is there a situation where someone would use TTL chips to make a card work at a specific location?
Nope. In the case of the autoconfig cards, there is a 64kb memory area on big-box Amigas to settle the card ID and small settings.
-
@rkauer: That leads me to believe that one would have to access that info. through the kernel or hardware to get the location of the PIC's address.
I need to finish reading Zorro3 manual.
:-D
-
No need to.
I'm certain someone (like Piru ;-)) have this information in the his mouth/fingers right now. :-)
-
The Amiga Hardware Reference Manual should have the Zorro(R) AUTOCONFIG(TM) (http://en.wikipedia.org/wiki/AutoConfig) explained pretty well.
-
Piru wrote:
@trekiej
Two level segregate fit. There's a great AmigaOS 3.x implementation by Chris Hodges: TLSFMem.lha (http://www.platon42.de/files/util/TLSFMem.lha).
Shame it was not finished, it had so much promise. It still has one or two bugs in it which make it a little incompatible with some programs. I heard that someone had taken over this project, renamed it MemTLSF, but I have seen no more releases.
-
@alexh
It still has one or two bugs in it which make it a little incompatible with some programs.
What kind of bugs exactly? Would be interesting to do last minute testing of the MOS 2.0 TLSF memsystem I wrote (it's not based on Chris' code but shares much of the ideas, so it might also share bugs).
-
I get recoverable alerts with a few programs, for example the old Chris Hames "Degrader" program gives me a "715F 0041", system eventually returns with around -530,000,000 fast mem available, and will generally crash for good shortly after, LOL.
I've found it's fine 99% of the time though, and I have _no_ clue whether it's a TLSFmem bug or bugged program.
-
I would imagine that's just Degrader doing some rather nasty tricks, it's quite hacky program after all.
-
Wepl wrote:
It seems that TLSF returns 2,018,011,950 for AvailMem(MEMF_LARGEST).
Which causes nothing to be preloaded in WHDLoad as it uses this to calculate the puddle size for the memory pools used for the PreLoad memory.
http://eab.abime.net/showthread.php?t=33790
-
@alexh
Ok, no such problem in mine.
-
Piru wrote:
MMU = math thingy?
No. Wikipedia: Memory Management Unit (http://en.wikipedia.org/wiki/Memory_management_unit)
That's what I figured, but then
MMU have nothing to do in the memory management area.
happened.
-
@weirdami
Check the thread topic it has a crucial keyword in it :-)
-
Piru wrote:
@alexh
Ok, no such problem in mine.
mmmm I can't wait to put my dirty paws on MOS2.0! ;-)
-
Piru wrote:
I would imagine that's just Degrader doing some rather nasty tricks, it's quite hacky program after all.
That would make sense. Only other program I can recall (same error) was AIBB benchmark, which is probably also bugged.
Everything else, hundreds of demos, games (no problem with WHDLoad here), utilities, etc work fine.
-
Just tried AIBB, and the allocator debug tells me it tries to FreeMem 34 bytes when it allocated much larger chunk. That's bad.