Author Topic: Memory bank question?  (Read 4221 times)

0 Members and 1 Guest are viewing this topic.

Offline hap2001Topic starter

  • Regular Contributor
  • *
  • Posts: 142
  • Country: us
Memory bank question?
« on: June 24, 2024, 12:49:23 pm »
I've read that many old computer systems/processors are limited by the hardware address lines, so they can only have little amount of RAM+ROM.
And it's mentioned one way to workaround this is to use memory banking, but the computer still only see 1 rank at a time, and making use of total amount of memory (bank switching) is inefficient.
However I believe modern PCs usually have multiple banks of memory, and they just work like a whole thing seamlessly.
How do modern computers solve this problem, or did I misunderstood anything?
 

Offline xvr

  • Frequent Contributor
  • **
  • Posts: 915
  • Country: ie
    • LinkedIn
Re: Memory bank question?
« Reply #1 on: June 24, 2024, 01:17:46 pm »
Quote
How do modern computers solve this problem, or did I misunderstood anything?
Bank of memory in modern computer has the same relationsip to the Bank of memory of old computer as it does to the Bank of a river.  :)
Memory bank of old computer is a space inside address space of CPU to which different parts of RAM could be mapped.
Memory bank in modern computer is a socket for physical memory chip (or chips). And you can populate these banks with physical memory. All populated memory comprises unified address space for CPU (there is no any separation inside it).

PS. NUMA architecture of modern computers is out of scope of this description  ;)

 
The following users thanked this post: hap2001

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 19207
  • Country: us
  • DavidH
Re: Memory bank question?
« Reply #2 on: June 24, 2024, 02:01:38 pm »
I've read that many old computer systems/processors are limited by the hardware address lines, so they can only have little amount of RAM+ROM.
And it's mentioned one way to workaround this is to use memory banking, but the computer still only see 1 rank at a time, and making use of total amount of memory (bank switching) is inefficient.

That is referred to as "bank switching".  IBM PC style computers had various forms of bank switching which could later be emulated with the paged memory management features of the 386 and later processors.

Quote
However I believe modern PCs usually have multiple banks of memory, and they just work like a whole thing seamlessly.
How do modern computers solve this problem, or did I misunderstood anything?

Modern processors either have enough address lines, or decode some of the address lines into bank select outputs making things easier.  For instance 3 address lines may be decoded into 8 bank selects using a 3-to-8 decoder.  Processors that support multiple memory channels are doing this internally but multiple memory channels may be accessed simultaneously while banks can only be accessed one at a time.
« Last Edit: June 24, 2024, 02:03:19 pm by David Hess »
 
The following users thanked this post: hap2001

Offline m k

  • Super Contributor
  • ***
  • Posts: 3481
  • Country: fi
Re: Memory bank question?
« Reply #3 on: June 24, 2024, 06:15:15 pm »
Accessing memory is a chain of operations.

Accessing DRAM is a longer chain, things like CS, OE, RAS, CAS and R/W must be maintained.

With static RAM it can be just OE and R/W.
Means that all chips are accessed, but only one has its output enabled.

With memory controller in between the access can be piped, the controller can store different links of a chain.
CPU could do it also of course but more pins are needed and with extra controller optimizing clocks are easier.
Advance-Aneng-Appa-AVO-Beckman-Danbridge-Data Precision-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-OR-X-REO-Schneider-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Topward-Triplett-Tritron-YFE
(plus work shop of the world unknowns)
 
The following users thanked this post: hap2001

Offline jzx

  • Regular Contributor
  • *
  • Posts: 84
  • Country: es
Re: Memory bank question?
« Reply #4 on: June 24, 2024, 06:27:16 pm »
The bank switching was used mainly by 8 bit computers, with a limitation of 64k  ;D .
When the 6502, 8080 etc were designed, 64k was science fiction,  very big, very expensive, nobody needed so many k, but later  memory lowered its price, programs growt, and you know.

Bank switching was used with some 16 bits systems, as the pc, but no so commonly as with 8 bit systems. Later processors normally have  enough adressing lines to not use bank switching.

In modern computers, normally have more than one adress bus and can control more than one "memory" at same time, those are the modern banks. Doing this the processor can use the memory banks faster than if they where in the same bus, but for the program there is no difference. Because of this normally is better to fill all the banks, a bit faster, although with caches today the difference can be small.
 
The following users thanked this post: hap2001

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17788
  • Country: fr
Re: Memory bank question?
« Reply #5 on: July 01, 2024, 05:50:38 am »
Well, in 16-bit real mode, x86 with its segmented memory access behaves essentially as one with "memory banking". It's just that segment registers are a whole part of the instruction set, so "much" more efficient than tricks used for 8-bit systems.

Also, with the 8088/8086 and their limited address space (1MB), there were memory extensions that also acted like memory banks, and this "extended" memory was also cumbersome to access.

With "modern" CPUs, it's getting pretty hard to run into the limit of even their external address bus. But they also implement MMUs (usually), which do a lot of tricks "transparently" as well. Oh and DRAM has become a bottleneck for a rather long time now too, so caches always sit in between, providing another layer between actual system RAM and CPUs.


 
The following users thanked this post: hap2001

Offline Whales

  • Super Contributor
  • ***
  • Posts: 2692
  • Country: au
    • Halestrom
Re: Memory bank question?
« Reply #6 on: July 01, 2024, 07:13:36 am »
Modern desktop processors have:

1) MMUs (memory management units)
2) A crazily big address space (something like 48 bits.  The full 64 bits are not used in practice, I think)

MMUs do lots of what you might call bank switching (but it's not called that any more).  Physical peripherals (like RAM and PCIE cards) are mapped to arbitrary address ranges in memory.  The MMU can do more fun too.

The address space isn't 64 bits (yet) on a 64-bit desktop processor.  There is no point, even 48 bits is more than 250 terabytes (you could try to memory map your whole harddrive many times over).  For example I'm writing this on a Intel i5-6300U which reports:

Quote
address sizes   : 39 bits physical, 48 bits virtual
« Last Edit: July 01, 2024, 07:16:09 am by Whales »
 
The following users thanked this post: hap2001

Offline jzx

  • Regular Contributor
  • *
  • Posts: 84
  • Country: es
Re: Memory bank question?
« Reply #7 on: July 02, 2024, 01:28:39 pm »
Also, with the 8088/8086 and their limited address space (1MB), there were memory extensions that also acted like memory banks, and this "extended" memory was also cumbersome to access.

This was https://en.wikipedia.org/wiki/Expanded_memory#EMS . At first this was an expansion card and later was emulated by EMM386 in MSDOS.
 
The following users thanked this post: hap2001

Offline hap2001Topic starter

  • Regular Contributor
  • *
  • Posts: 142
  • Country: us
Re: Memory bank question?
« Reply #8 on: July 10, 2024, 01:32:25 pm »
Thank you everyone, I think I understand it more.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->