Primary Memory • Bits

Primary Memory • Bits

Lecture Outline CS1101: Lecture 15 Computer Systems Organization: Primary Memory • Bits Dr. Barry O’Sullivan • Memory Addresses [email protected] • Organising Memory • Words • Error-Correcting Codes • Cache Memory • Memory Packaging and Types Course Homepage • http://www.cs.ucc.ie/˜osullb/cs1101 Memory Configurations • Reading: Tanenbaum, Chapter 2 Section 2 Department of Computer Science, University College Cork Department of Computer Science, University College Cork 1 CS1101: Systems Organisation Computer Systems Organization: Memory CS1101: Systems Organisation Computer Systems Organization: Memory Bits Memory Addresses • The basic unit of memory is the binary digit, • Memories consist of a number of cells (or called a bit. locations) each of which can store a piece of information. • A bit may contain a 0 or a 1. • Each cell has a number, called its address, by • The binary number system requires only two which programs can refer to it. values to be distinguished. • If a memory has n cells, they will have • Consequently, it is the most reliable method for addresses 0 to n − 1. encoding digital information. • All cells in a memory contain the same number of bits. • If a cell consists of k bits, it can hold any one of 2k different bit combinations. Department of Computer Science, University College Cork 2 Department of Computer Science, University College Cork 3 Organising Memory Organising Memory AddressAddress 1 Cell Address 0 0 0 • Adjacent cells have consecutive addresses (by 1 1 1 definition). 2 2 2 3 3 3 4 4 4 • Computers that use the binary number system 5 5 5 (including octal and hexadecimal notation for 6 6 16 bits 7 7 (c) binary numbers) express memory addresses 8 12 bits as binary numbers. 9 (b) 10 11 • If an address has m bits, the maximum number 8 bits of cells addressable is 2m. (a) • For example, an address used to reference the Figure 2.9 Three ways of organising a 96-bit memory of Fig. 2-9 (a) needs at least 4 bits in memory. order to express all the numbers from 0 to 11. • A 3-bit address is sufficient for Fig. 2-9 (b) and (c), however. Department of Computer Science, University College Cork 4 Department of Computer Science, University College Cork 5 CS1101: Systems Organisation Computer Systems Organization: Memory CS1101: Systems Organisation Computer Systems Organization: Memory Organising Memory (continued) Words • The number of bits in the address determines • The significance of the cell is that it is the the maximum number of directly addressable smallest addressable unit. cells in the memory and is independent of the number of bits per cell. • Nearly all manufacturers have standardised on an 8-bit cell, which is called a byte • For example, a memory with 212 cells of 8 bits each and a memory with 212 cells of 64 bits • Bytes are grouped into words each need 12-bit addresses. • A computer with a 32-bit word has 4 bytes/word, whereas a computer with a 64-bit words has 8 bytes/word. • Most instructions work on words • For example, a 32-bit machine will have 32-bit registers and instructions for manipulating 32- bit words – such as adding two words together. Department of Computer Science, University College Cork 6 Department of Computer Science, University College Cork 7 Error-Correcting Codes Error-Correcting Codes • Computer memories can make errors occasionally • Suppose that a memory word consists of m due to voltage spikes on the power line or other data bits to which we will add r redundant, or causes. check bits. • To guard against such errors, some memories • Let the total length be n (i.e., n = m + r). use error-detecting or error-correcting codes. • An n-bit unit containing data and r check bits is • When these codes are used, extra bits are often referred to as an n-bit codeword. added to each memory word in a special way. • The number of bit positions in which two • When a word is read out of memory, the extra codewords differ is called the Hamming bits are checked to see if an error has occurred. distance. • The error-detecting and error-correcting properties of a code depend on its Hamming distance. Department of Computer Science, University College Cork 8 Department of Computer Science, University College Cork 9 CS1101: Systems Organisation Computer Systems Organization: Memory CS1101: Systems Organisation Computer Systems Organization: Memory Cache Memory Cache Memory • Techniques are known for combining a small Main amount of fast memory with a large amount memory of slow memory to get the speed of the fast CPU memory (almost) and the capacity of the large memory at a moderate price. Cache • The small, fast memory is called a cache (pronounced ”cash”). Bus • The basic idea behind a cache is simple: – The most heavily used memory words are Figure 2-16. The cache is logically between the kept in the cache. CPU and main memory. Physically, there are – When the CPU needs a word, it first looks in several possible places it could be located. the cache. – Only if the word is not there, does it go to main memory. • If a substantial fraction of the words are in the cache, the average access time can be greatly reduced. Department of Computer Science, University College Cork 10 Department of Computer Science, University College Cork 11 Memory Packaging and Types Memory Packaging and Types • Until the early 1990s, memory was manufactured, 4-MB bought, and installed as single chips. memory chip • Chip densities went from 1k bits to 1M bits and Connector beyond, but each chip was a separate unit. • Today, a different arrangement is often used. Figure 2-17. A single inline memory module (SIMM) holding 32 MB. Two of the chips control the SIMM. • A group of chips, typically 8 or 16, is mounted on a tiny printed circuit board and sold as a unit. • This unit is called a SIMM (Single Inline Memory Module) or a DIMM (Dual Inline Memory Module), depending on whether it has a row of connectors on one side or both sides of the board. Department of Computer Science, University College Cork 12 Department of Computer Science, University College Cork 13 CS1101: Systems Organisation Computer Systems Organization: Memory Memory Configurations • A typical SIMM configuration might have eight chips with 32 megabits (4 MB) each on the SIMM. • The entire module would then hold 32 MB. • Many computers have room for four modules, giving a total capacity of 128 MB when using 32-MB SIMMS. • Often these SIMMs can later be replaced by 64-MB or larger SIMMs as needed. Department of Computer Science, University College Cork 14.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    4 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us