Refers to that is internal to the . The word main is used to distinguish it from external such as . Another term for main memory is .
The computer can manipulate only that is in main memory. Therefore, every you and every you must be from a into main memory. The amount of main memory on a computer is crucial because it determines how many programs can be executed at one time and how much data can be readily available to a program.
Because computers often have too little main memory to hold all the data they need, computer engineers invented a technique called , in which portions of data are copied into main memory as they are needed. Swapping occurs when there is no room in memory for needed data. When one portion of data is copied into memory, an equal-sized portion is copied (swapped) out to make room.
Now, most come with a minimum of 32 of main memory. You can usually increase the amount of memory by inserting extra memory in the form of .
ARCHIVED: What is the difference between memory and disk storage?
Memory and disk storage both refer to internal storage space in a computer. Each is used for a different purpose.
The term "memory" usually means RAM (Random Access Memory); RAM is hardware that allows the computer to efficiently perform more than one task at a time (i.e., multi-task).
The terms "disk space" and "storage" usually refer to hard drive storage. Hard drive storage is typically used for long-term storage of various types of files. Higher capacity hard drives can store larger amounts and sizes of files, such as videos, music, pictures, and documents.
"Virtual memory" is hard disk space that has been designated to act like RAM. It assists the computer with multi-tasking when there is not a sufficient amount of RAM for the tasks.
Computers also contain a small amount of ROM (Read-Only Memory) containing permanent or semi-permanent (firmware) instructions for checking hardware and starting up the computer. On a PC, this is called the BIOS.
The CPU processes (performs instructions on things, such as adding) stuff in memory. RAM is just part of the memory pyramid (see below). So when you are processing lots of data, that data ( or maybe large portions of it) will likely get loaded into RAM so it is ready for the cpu, this is to speed things up because RAM is faster to access than storage devices. So CPU usage and RAM can often correlate, but don't have to.
A basic example might be an p_w_picpath editing program. I load up my 20MB jpeg, the program reads the entire p_w_picpath, and the OS keeps that in RAM for you (all working memory looks the same to the program, the OS decides if it goes to the page/swap file on disk or RAM). So the p_w_picpath is in RAM waiting to be processed, but I go for coffee before telling the program to apply so silly filter, so the CPU isn't doing anything. I come back, apply the filter to add some bubbles to the p_w_picpath, and the CPU goes to 100% and even more memory gets used because it keeps the preprocessed p_w_picpath in memory, so I can undo the change I just made. When the program is done adding the bubbles, the CPU drops, but maybe not the memory.
Of course, it isn't quite this simple :-)
Buffer and Block
Buffers
file manager : confirms file use info; finds physical location of file on disk; makes sure required sector in buffer;
I/O buffer: holds sectors of data; often doesn't get written back to disk until the buffer is needed for other uses (that way if more stuff done to the same sector, it doesn't have to be loaded again)
I/O processor: may be simple chip or complex CPU;
Block: smallest amount of data that can be read from or written to secondary storage at one time. Often generalized to mean any chunk of data that can be treated as a unit (for reading, writing, organizing). We will distinguish between disk blocks (physical) and program defined blocks (logical).
http://www.minkhollow.ca/Courses/461/Notes/BasicOps/BlocknBuffer.html
- can't always ensure that logical and physical blocks match (often don't even want to).
- should make sure they compliment each other
- logical blocks should not be split between physical blocks
- it's often more efficient to waste a little physical space in order to achieve a better match
eg. logical blocks = 10 bytes; physical blocks = 32 bytes; so fit 3/p.b. (waste 2 bytes per physical block)
Blocking: the process of grouping several components into one bloc
Second storage device
hard drives (a prime example of secondary storage) are the go-to solution for nearly all data kept on today's computers.
A CPU cache is a cache used by the central processing unit (CPU) of a computer to reduce the average time to access data from the main memory. The cache is a smaller, faster memory which stores copies of the data from frequently used main memory locations. Most CPUs have different independent caches, including instruction and data caches, where the data cache is usually organized as a hierarchy of more cache levels (L1, L2, etc.).