Welcome, Guest. Please login or register.

Author Topic: Amiga Memory Mangement  (Read 3155 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline trekiejTopic starter

Amiga Memory Mangement
« 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.
Amiga 2000 Forever :)
Welcome to the Planar System.
 

Offline rkauer

  • Hero Member
  • *****
  • Join Date: May 2006
  • Posts: 3263
    • Show only replies by rkauer
Re: Amiga Memory Mangement
« Reply #1 on: June 20, 2008, 03:37:46 AM »
Quote

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:
Goodbye people.

I\'ll pop on from time to time, RL is acting up.
 

Offline weirdami

  • Hero Member
  • *****
  • Join Date: Jan 2003
  • Posts: 3776
    • Show only replies by weirdami
    • Http://Bindingpolymer.com
Re: Amiga Memory Mangement
« Reply #2 on: June 20, 2008, 04:13:17 AM »
MMU = math thingy?
----
Binding Polymer: Keeping you together since 1892.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Amiga Memory Mangement
« Reply #3 on: June 20, 2008, 04:34:14 AM »
@trekiej

On the software side, the amiga memory system is simple first fit 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.

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. There's a great AmigaOS 3.x implementation by Chris Hodges: 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
Quote
MMU = math thingy?

No. Wikipedia: Memory Management Unit
 

Offline trekiejTopic starter

Re: Amiga Memory Mangement
« Reply #4 on: June 20, 2008, 04:45:44 AM »
@ 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?

Amiga 2000 Forever :)
Welcome to the Planar System.
 

Offline rkauer

  • Hero Member
  • *****
  • Join Date: May 2006
  • Posts: 3263
    • Show only replies by rkauer
Re: Amiga Memory Mangement
« Reply #5 on: June 20, 2008, 05:03:06 AM »
Quote

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.
Goodbye people.

I\'ll pop on from time to time, RL is acting up.
 

Offline trekiejTopic starter

Re: Amiga Memory Mangement
« Reply #6 on: June 20, 2008, 05:26:12 AM »
@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
Amiga 2000 Forever :)
Welcome to the Planar System.
 

Offline rkauer

  • Hero Member
  • *****
  • Join Date: May 2006
  • Posts: 3263
    • Show only replies by rkauer
Re: Amiga Memory Mangement
« Reply #7 on: June 20, 2008, 07:10:29 AM »
 No need to.

 I'm certain someone (like Piru ;-)) have this information in the his mouth/fingers right now. :-)
Goodbye people.

I\'ll pop on from time to time, RL is acting up.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Amiga Memory Mangement
« Reply #8 on: June 20, 2008, 07:18:18 AM »
The Amiga Hardware Reference Manual should have the Zorro(R) AUTOCONFIG(TM) explained pretty well.
 

Offline alexh

  • Hero Member
  • *****
  • Join Date: Apr 2005
  • Posts: 3644
    • Show only replies by alexh
    • http://thalion.atari.org
Re: Amiga Memory Mangement
« Reply #9 on: June 20, 2008, 07:43:42 AM »
Quote

Piru wrote:
@trekiej
Two level segregate fit. There's a great AmigaOS 3.x implementation by Chris Hodges: 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.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Amiga Memory Mangement
« Reply #10 on: June 20, 2008, 08:01:13 AM »
@alexh
Quote
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).
 

Offline Damion

Re: Amiga Memory Mangement
« Reply #11 on: June 20, 2008, 08:19:31 AM »
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.

 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Amiga Memory Mangement
« Reply #12 on: June 20, 2008, 08:47:36 AM »
I would imagine that's just Degrader doing some rather nasty tricks, it's quite hacky program after all.
 

Offline alexh

  • Hero Member
  • *****
  • Join Date: Apr 2005
  • Posts: 3644
    • Show only replies by alexh
    • http://thalion.atari.org
Re: Amiga Memory Mangement
« Reply #13 on: June 20, 2008, 09:57:10 AM »
Quote
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
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Amiga Memory Mangement
« Reply #14 on: June 20, 2008, 10:07:27 AM »
@alexh

Ok, no such problem in mine.