Click here to Skip to main content
15,887,241 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Utilization Pin
trønderen8-Sep-23 8:22
trønderen8-Sep-23 8:22 
GeneralRe: Utilization Pin
honey the codewitch8-Sep-23 11:05
mvahoney the codewitch8-Sep-23 11:05 
GeneralRe: Utilization Pin
trønderen7-Sep-23 11:49
trønderen7-Sep-23 11:49 
GeneralRe: Utilization Pin
honey the codewitch8-Sep-23 3:19
mvahoney the codewitch8-Sep-23 3:19 
GeneralRe: Utilization Pin
Peter Adam7-Sep-23 23:25
professionalPeter Adam7-Sep-23 23:25 
GeneralRe: Utilization Pin
Choroid8-Sep-23 5:30
Choroid8-Sep-23 5:30 
GeneralRe: Utilization Pin
honey the codewitch8-Sep-23 5:32
mvahoney the codewitch8-Sep-23 5:32 
GeneralRe: Utilization Pin
trønderen8-Sep-23 8:15
trønderen8-Sep-23 8:15 
Choroid wrote:
BUT I remember reading about "Bank Switching"
So is this still a concept used in a personal computer today?
No. 32 or 64 bit logical addressing removed the need for it.

The problem in the old PCs was the addressing range. Most single-chip CPUs were 8-bit, with 16 bit addresses, so they could only handle 2**16 = 64 Ki bytes of RAM; there was no way to identify any more. Then came the LIM standard for banking: You could set up your system with, say, 48 Ki plain RAM and the upper 16 Ki of the address space handled by a LIM card, providing several 16 Ki blocks (or "banks") of physical RAM, but you could use only one of them at a time. You had to tell the LIM card (through I/O instructions) which of the banks to enable.

You would usually put code, not data, in the banked part: In the un-banked (lower 48 Ki) part, you put a stub that is called from other places. This stub tells the LIM card to enable the right bank where the actual code is placed, and jump to the code address in that bank. If this function called functions in other banks, it would have to call via an unbanked stub to switch to the right bank. Upon return, the previous bank had to be enabled again, to let the caller continue. It did not lead to blazingly fast performance.

Catching data access through a similar stub is not that easy. You could, in an OO world have a object in unbanked RAM with huge data part banked RAM, the object knowing the bank number and address, and channeling all access to it through accessor functions (set, get), but OO was little known in the PC world at that time. I never saw anyone doing this.

LIM was a PC concept. On larger machines, you could see memory overlays, which was also based on routine stubs, but the stub would read a code block from disk into RAM, overwriting anything that was there. You had much more flexibility, but PC disks were so slow in those days that it would have been next to unusable.

You could say that bank switching is a relative of paging mechanisms. I know of at least one family of 16-bit minis providing 64 Ki words (128 Ki bytes) of address space to each user, but could handle up to 32 Mi bytes of physical RAM. So the 64 terminals hooked up to the mini could have their full address space resident in RAM, with no paging. When the CPU switched its attention from one user to another one, it replaced the page table contents to point to the new user's pages - not that different from telling the LIM board to switch to another bank.

You could also say that the 8086 solution, with its segment registers, is a close relative to banking: It allowed direct addressing of up to a mebibyte; this required the instruction to identify the segment register (a parallel to bank number) in every instruction, so it worked even for 'banked' data, not just instructions. (There is a well known quote from the discussions in one big company about how to split that mebibyte between operating system and user segments, and a famous industry leader was quoted for wanting 384 Ki of that space being reserved for the OS, the remaining 640 Ki should be enough for any user program running in 1 Mi of RAM.)

Today, almost every general-purpose machine has at least 32 bit address (4 Gi bytes), 64 bits is becoming the new standard. Then there is no need for neither banking nor overlaying. Rather, the paging system is used to pack the pieces of memory addresses that are actually used into a much smaller physical address space than the logical address space presents to the program.

For special purposes - almost all of it falls under 'embedded' - bit addresses are seen even today. No more than 6-7 years ago, I was working with an 8051, extended with banking hardware for four 16 Ki banks. I believe that chip is still available. (I moved on to another project, so I am not sure.)
GeneralRe: Utilization Pin
Choroid9-Sep-23 6:39
Choroid9-Sep-23 6:39 
GeneralRe: Utilization Pin
Gerry Schmitz8-Sep-23 11:25
mveGerry Schmitz8-Sep-23 11:25 
General210 Watts, £560/$700 a year Pin
Rob Philpott7-Sep-23 0:28
Rob Philpott7-Sep-23 0:28 
GeneralRe: 210 Watts, £560/$700 a year Pin
Richard MacCutchan7-Sep-23 0:40
mveRichard MacCutchan7-Sep-23 0:40 
GeneralRe: 210 Watts, £560/$700 a year Pin
Rob Philpott7-Sep-23 0:52
Rob Philpott7-Sep-23 0:52 
GeneralRe: 210 Watts, £560/$700 a year Pin
Richard MacCutchan7-Sep-23 1:02
mveRichard MacCutchan7-Sep-23 1:02 
GeneralRe: 210 Watts, £560/$700 a year Pin
Richard Deeming7-Sep-23 0:44
mveRichard Deeming7-Sep-23 0:44 
GeneralRe: 210 Watts, £560/$700 a year Pin
Rob Philpott7-Sep-23 0:57
Rob Philpott7-Sep-23 0:57 
GeneralRe: 210 Watts, £560/$700 a year Pin
Richard Deeming7-Sep-23 1:22
mveRichard Deeming7-Sep-23 1:22 
GeneralRe: 210 Watts, £560/$700 a year Pin
QuantumPlumber7-Sep-23 8:31
professionalQuantumPlumber7-Sep-23 8:31 
GeneralRe: 210 Watts, £560/$700 a year Pin
Richard Deeming7-Sep-23 21:14
mveRichard Deeming7-Sep-23 21:14 
GeneralRe: 210 Watts, £560/$700 a year Pin
QuantumPlumber7-Sep-23 22:13
professionalQuantumPlumber7-Sep-23 22:13 
GeneralRe: 210 Watts, £560/$700 a year Pin
jschell7-Sep-23 5:23
jschell7-Sep-23 5:23 
GeneralCCC 07-09-2023 - Edited Pin
pkfox6-Sep-23 21:44
professionalpkfox6-Sep-23 21:44 
RantCan anyone stick a date when VS became a piece of memory crunching s**t? Pin
Kornfeld Eliyahu Peter6-Sep-23 21:31
professionalKornfeld Eliyahu Peter6-Sep-23 21:31 
GeneralRe: Can anyone stick a date when VS became a piece of memory crunching s**t? Pin
Slacker0076-Sep-23 21:38
professionalSlacker0076-Sep-23 21:38 
GeneralRe: Can anyone stick a date when VS became a piece of memory crunching s**t? Pin
honey the codewitch7-Sep-23 1:11
mvahoney the codewitch7-Sep-23 1:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.