This shows the parts of a computer. You have to know everything in here. I am particularly concerned with the difference between volatile and non-volatile storage. Also, there is a short video on how disk drives work.
The Storage Hierarchy
Different storage devices exist. Devices differ in cost, capacity to store data, and speed at which the data can be retrieved. The fastest retrieval times are posted by processor registers – a small amount of storage which is designed into the CPU. Much slower are off site, removable storage media such as tape or DVD’s. Tape drives and DVD writers have much slower retrieval times than processor registers but they are capable of storing much more data. An ordering of storage devices such that devices which have low capacity but fast retrieval times is at one end and devices which have a large capacity but slow retrieval times is at the other is called the storage hierarchy.
Computer engineers attempt to design computers in such a way as to maximize the performance using small amounts of data on devices with quick retrieval times while storing large amounts of data on slower devices. The most successful engineering technique developed to use different types of memory in the hierarchy is called virtual memory.
Read about the storage hierarchy and virtual memory in the link below. You need to read the first 3 sections, mostly section 3 The Memory and Storage Hierarchy. The concept of virtual memory is introduced and explained here under How Does Virtual Memory Work?. Work through and understand the accompanying chart.:
Storage varies in capacity, speed and expense.
- Use low, capacity, high speed, expensive storage “close to the machine” , where it is accessed often.
- Use high capacity, low speed, cheap storage to store data which is needed less often.
Virtual memory algorithms, that is, computer programs, generally do a better job of managing these resources than people who attempt to manage these things manually.
Performance Implications of Virtual Memory Systems
Performance is non-linear. Everything is fine until you start running out of virtual memory and have to use the hard drive. Then your programs start to perform at hard drive speeds – not memory speeds.
E.g. adding anti-virus software – Start with a system without anti-virus software. The system runs fine. You add anti-virus software or a Microsoft OS update which resides in memory. The new software takes up 10% of your memory – not much. But now you have to get data from the disk each time you need something that used to be in the memory locations used by the new software. And each time you do this, you are operating at disk speeds, not memory speeds.
Performance Characteristics of Virtual Systems
I made this scatter point graph using Excel (!) to show the non-linear characteristics of virtual memory.
Note that the access times when you have only .5 Mb of memory reflect disk speeds as almost all accesses require reading from the hard disk drive. Almost all the accesses when you have over 6 Mb of memory reflect RAM speed as almost all accesses are from memory.
Virtual Memory vs. Cache Memory
It depends on your point of view.
From the point of view of a computer program, which historically ran in RAM memory, virtual memory is a way of running in more memory than the computer actually has. You use slower, disk memory to make up the difference between the existing RAM and the “imaginary” ram.
Cache memory, on the other hand, takes an existing amount of storage and augments it with a smaller, faster type of storage. So, you can have a disk drive with 1000 GB of disk storage and, built-in to the disk drive is 2 GB of RAM storage. The disk drive stores the most accessed information both on the drive itself and on the RAM. So, if a user requests data which is on the RAM, the disk drive will simply return it at RAM speeds instead of Disk speeds, typically over a thousand times faster. When memory is used in this way – to augment a slower form of storage, it is referred to as “cache memory”.
In a way, virtual memory and cache memory, are mirror images of each other. Virtual memory makes fast memory (RAM) look larger than it is by augmenting it with a disk drive. Cache memory makes large, slow memory (a disk drive) perform faster then it would by augmenting it with RAM.
Other uses of cached storage
Caching has proven to be a very popular way of optimizing response and storage. When you access a web page from your web browser, the browser may not have to access the internet in order to show you the page. If you had accessed the page 5 minutes ago, the browse may have the web page in its cache. Cache in this case means local disk storage. Slower than ram but generally faster than retrieving the information again through the web. Using local storage in this manner is built into web protocols, including a way of web pages to notify a browser that they are “stale”, meaning the page cannot be used without going back to the web site and refreshed it (getting a new copy).
What is a bit, a byte, K, as in 200k, a megabyte, a gigabyte, a terabyte?
This is all here:
You don’t need to go over a terabyte.
Some sample sizes – you should know this:
|photos||100k to 6000K|
|mp3 song||5 mb|
|dvd movie||4 gb|
|hd movie||12 gb to 40 gb|
|dvd capacity||4-8 gb|
|hd dvd||40 gb|
Hardware and Software
Hardware is the physical manifestation of a machine. Software is information used to run the machine. A computer, the box, the monitor, and the keyboard, is hardware. Programs that run on the computer, are software. A computer mouse – hardware. Microsoft Excel – software.
How to tell if something is hardware or software.
Generally speaking, if you can send something through the internet, or store it on a flash drive, its software.
When does it make sense to duplicate hardware in software?
Say you want to train someone to be a pilot. Write a flight simulator program (software) to duplicate the functions of an airplane (hardware) on a computer. Make the flight simulator have the same controls as a real airplane and have the flight simulator respond just like a real airplane would to the controls. When a pilot makes a mistake on the simulator, the program crashes and not the plane.
When does it make sense to duplicate software in hardware?
You write a computer program (software) to encode information. It works well, but its a little slow, and you are worried that the computers that the program runs on will be compromised and your computer program will be hacked. You take the program and burn it into its own hardware. The hardware cannot be overwritten and has 1 input channel and 1 output channel. Plain text goes in one channel, encrypted text goes out the other channel. Since hardware speeds are generally faster than running computer programs, the encryption is much faster. Since the hardware in your “black box” cannot be overwritten, the encryption is more secure.