1 / 65

CS11 Digital Logic and Organization Lecture 6: Memory System in a Computer Rebaz Nawzad

University of the Sulaimani (UOS). Faculty of Science and Sciences Education School of Science Department of Computer. CS11 Digital Logic and Organization Lecture 6: Memory System in a Computer Rebaz Nawzad. Memory System in a Computer. What is memory?.

Download Presentation

CS11 Digital Logic and Organization Lecture 6: Memory System in a Computer Rebaz Nawzad

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. University of the Sulaimani (UOS).Faculty of Science and Sciences Education School of ScienceDepartment of Computer CS11 Digital Logic and Organization Lecture 6: Memory System in a Computer RebazNawzad

  2. Memory System in a Computer

  3. What is memory? A term for a device that enables the computer to retain (store) information.

  4. What are the types of memory? Volatile memory (Random Access Memory/RAM; Cache Memory; Virtual Memory)- Contents of memory are erased when power supply is turned off. Also called Temporary storage. Nonvolatile memory (Read Only Memory/ROM; Flash Memory)- Contents of memory are not erased when power is turned off. Also called Permanent storage.

  5. What is Random Access Memory / RAM? A type of volatile memory that stores information temporarily so that it’s available to the CPU.

  6. What are the different types of RAM? Dynamic RAM- A memory chip that needs to be refreshed periodically or it loses its data • Synchronous DRAM (SDRAM)- Synchronized with the computer’s system clock • Rambus DRAM (RDRAM)- Uses fast bus to send and receive data within one clock cycle. Faster than SDRAM • Double Data Rate SDRAM (DDR SDRAM)- A type of SDRAM that can send and receive data within one clock cycle.

  7. What is a memory module? A narrow printed circuit board that holds memory chips Three types • Single Inline Memory Module (SIMM)- 30 or 72 pin connectors. Available in 1MB, 4MB, 16MB, and 32MB versions (1980s to the late 1990s.) • Dual Inline Memory Module (DIMM)- 168 or 184 pin connectors. Available in 8MB, 16MB, 32MB, 64MB, 128MB, 256MB, and 512MB versions • Rambus Inline Memory Module (RIMM) (184-pin connector)

  8. DIMM RIMM NOTEBOOK DIMM SIMM

  9. HOW DOES RAM WORK? CHIPS CONTAIN MEMORY LOCATIONS CALLED MEMORY ADDRESSES THE CPU STORES AND RETRIEVES DATA BY GOING TO THE MEMORY ADDRESSES

  10. HOW RAM WORKS MONITOR WEB RAM KEYBOARD CPU

  11. Memory • Memory is a collection of cells, each with a unique physical address • The size of a cell is normally a power of 2, typically a byte today. 11

  12. What is cache memory? Primary cache (Level 1 or L1)- Located within the CPU chip, it is the memory the microprocessor uses to store frequently used instructions and data. Secondary cache (Level 2 or L2; Backside Cache)- Located near the CPU, it is the memory between the CPU and RAM Faster than RAM

  13. What is virtual memory? Part of the hard disk is reserved as RAM When RAM modules become full the CPU accesses the hard disk to store and retrieve data Slower than RAM FULL

  14. Memory Hierarchy • The memory unit is an essential component in any digital computer since it is needed for storing programs and data • Not all accumulated information is needed by the CPU at the same time • Therefore, it is more economical to use low-cost storage devices to serve as a backup for storing the information that is not currently used by CPU

  15. Memory Hierarchy • Computer Memory Hierarchy is a pyramid structure that is commonly used to illustrate the significant differences among memory types. • The memory unit that directly communicate with CPU is called the main memory • Devices that provide backup storage are called auxiliary memory • The memory hierarchy system consists of all storage devices employed in a computer system from the slow by high-capacity auxiliary memory to a relatively faster main memory, to an even smaller and faster cache memory

  16. MEMORY HIERARCHY Memory Hierarchy is to obtain the highest possible access speed while minimizing the total cost of the memory system Auxiliary memory Magnetic I/O Main tapes memory processor Magnetic disks Cache CPU memory Register Cache Main Memory Magnetic Disk Magnetic Tape

  17. Memory Hierarchy • The main memory occupies a central position by being able to communicate directly with the CPU and with auxiliary memory devices through an I/O processor • A special very-high-speed memory called cache is used to increase the speed of processing by making current programs and data available to the CPU at a rapid rate

  18. Memory Hierarchy • CPU logic is usually faster than main memory access time, with the result that processing speed is limited primarily by the speed of main memory • The cache is used for storing segments of programs currently being executed in the CPU and temporary data frequently needed in the present calculations • The typical access time ratio between cache and main memory is about 1to7 • Auxiliary memory access time is usually 1000 times that of main memory

  19. Memory devices • A memory device is a gadget that helps you record information and recall the information at some later time. Example:

  20. Memory devices (cont.) • A memory device must have more than 1 states • (Otherwise, we can't tell the difference) • Requirement of a memory device: Example: Memory device in state 0 Memory device in state 1

  21. The switch is a memory device • The electrical switch is a memory device: • The electrical switch can be in one of these 2 states: • off (we will call this state 0)          • on (we will call this state 1)

  22. Memory cell used by a computer • One switch can be in one of 2 states • A row of n switches: can be in one of 2n states !

  23. Memory cell used by a computer (cont.) • Example: row of 3 switches • A row of 3 switches can be in one of 23 = 8 states. • The 8 possible states are given in the figure above.

  24. Representing numbers using a row of switches • We saw how information can be represented by number by using a code (agreement) • Recall: we can use numbers to represent marital status information: • 0 = Sunny • 1 = Rainy • 2 = Snow • 3 = cloudy

  25. Representing numbers using a row of switches (cont.) • We can represent each number using a different state of the switches. Example:

  26. Representing numbers using a row of switches (cont.) • To complete the knowledge on how information is represented inside the computer, we will now study: • The representation scheme has a chic name: • How to use the different states of the switches to represent different numbers • the binary number system

  27. The binary number system • The binary number system uses 2 digits to encode a number: • That means that you can only use the digits 0 and 1 to write a binary number • Example: some binary numbers • 0 = represents no value • 1 = represents a unit value • 0 • 1 • 10 • 11 • 1010 • and so on.

  28. The binary number system (cont.) • Now you should understand how the different states of these 3 switches represent the numbers 0-7 using the binary number system:

  29. A cute binary number joke • Try to understand this joke: (Read: there are binary 10 (= 2) types of people: those who understand binary (numbers) and those who don't)

  30. A cute binary number joke (cont.) • A knock off joke:

  31. What does all this have to do with a computer ? • Recall what we have learned about the Computer RAM memory: • The RAM consists of multiple memory cells: • Each memory cell stores a number

  32. What does all this have to do with a computer ? (cont.) • The connection between the computer memory and the binary number system is: • The computer system uses the binary number encoding to store the number • Example:

  33. What does all this have to do with a computer ? (cont.) • Note: the address is also expressed as a binary number A computer can have over 4,000,000,000 bytes (4 Gigabytes) of memory. So we need a 32 bites to express the address

  34. Computer memory • A computer is an electronic device • Structure of a RAM memory: • The RAM memory used by a computer consists of a large number of electronic switches • The switches are organized in rows • For historical reason, the number of switches in one row is 8

  35. Computer memory (cont.) • In order to store text information in a computer, we need to encode: • 26 upper case letters ('A', 'B', and so on) • 26 lower case letters ('a', 'b', and so on) • 10 digits ('0', '1', and so on) • 20 or so special characters ('&', '%', '$', and so on) • for a total of about 100 different symbols • The nearest even power 2n that is larger than 100 is: • 27 = 128 ≥ 100 • For a reason beyond the scope of this course, an 8th switches is added Details

  36. Computer memory (cont.) • This is was a portion of the RAM memory looks like: • What information is stored in the RAM memory depends on: • The type of data (this is the context information) • Example of types: marital status, gender, age, salary, and so on. • This determines the encoding scheme used to interpret the number

  37. Computer memory jargon: • bit = (binary digit) a smallest memory device A bit is in fact a switch that can remember 0 or 1 • (The digits 0 and 1 are digits used in the binary number system) • Byte = 8 bits A byte is in fact one row of the RAM memory • KByte = kilo byte = 1024 (= 210) bytes (approximately 1,000 bytes) • MByte = mega byte = 1048576 (= 220) bytes (approximately 1,000,000 bytes) • GByte = giga byte = 1073741824 (= 230) bytes (approximately 1,000,000,000 bytes) • TByte = tera byte

  38. Combining adjacent memory cells • A byte has 8 bits and therefore, it can store: • 28 = 256 different patterns • (These 256 patterns are: 00000000, 00000001, 00000010, 00000011, .... 11111111)

  39. Combining adjacent memory cells (cont.) • 00000000 = 0 • 00000001 = 1 • 00000010 = 2 • 00000011 = 3 • ... • 11111111 = 255 • Each pattern can are encoded exactly one number: Therefore, one byte can store one of 256 possible values (You can store the number 34 into a byte, but you cannot store the number 456, the value is out of range)

  40. Main Memory • Most of the main memory in a general purpose computer is made up of RAM integrated circuits chips, but a portion of the memory may be constructed with ROM chips • RAM– Random Access memory • Integated RAM are available in two possible operating modes, Static and Dynamic • ROM– Read Only memory

  41. Main Memory • A RAM chip is better suited for communication with the CPU if it has one or more control inputs that select the chip when needed • The Block diagram of a RAM chip is shown next slide, the capacity of the memory is 128 words of 8 bits (one byte) per word

  42. SRAM vs DRAM Summary Tran. Access per bit time Persist? Sensitive? Cost Applications SRAM 6 1X Yes No 100x cache memories DRAM 1 10X No Yes 1X Main memories, frame buffers

  43. RAM • Read/write memory, that initially doesn’t contain any data • The computing system that it is used in usually stores data at various locations to retrieve it latter from these locations • Its data pins are bidirectional (data can flow into or out of the chip via these pins), as opposite to those of ROM that are output only • It loses its data once the power is removed, so it is a volatile memory • It has a directional select signal R/W’; When R/W’=1, the chip outputs data to the rest of the circuit; when R/W’ = 0 it inputs data from the rest of the circuit

  44. Random-Access Memory TypesDifferent between SRAM & DRAM • Static RAM (SRAM) • Each cell stores bit with a six-transistor (Diode) circuit. • Retains value indefinitely, as long as it is kept powered. • Relatively insensitive to disturbances such as electrical noise. • Faster and more expensive than DRAM. • Dynamic RAM (DRAM) • Each cell stores bit with a capacitor and transistor. • Value must be refreshed every 10-100 ms. • Sensitive to disturbances. • Slower and cheaper than SRAM.

  45. Random-Access Memory • Key features • RAM is packaged as a chip. • Basic storage unit is a cell (one bit per cell). • Multiple RAM chips form a memory.

  46. ROM • ROM is used for storing programs that are PERMENTLY resident in the computer and for tables of constants that do not change in value once the production of the computer is completed • The ROM portion of main memory is needed for storing an initial program called bootstrap loader, witch is to start the computer software operating when power is turned off

  47. ROM • Data is programmed into the chip using an external ROM programmer • The programmed chip is used as a component into the circuit • The circuit doesn’t change the content of the ROM • Can be used as lookup tables to implement various functions • Used by PCs to store the instructions that form their Basic Input/Output System (BIOS) • When power is removed from a ROM chip, the information is not lost, so it is a nonvolatile type of memory • It has an OE (Output Enable) specific control pin. Both OE and CE must be enabled in order for the ROM to output data; otherwise its data output is tri-stated.

  48. ROM Types • Masked ROM – programmed with its data when the chip is fabricated • PROM – programmable ROM, by the user using a standard PROM programmer, by burning some special type of fuses. Once programmed will not be possible to program it again. • EPROM – erasable ROM; the chip can be erased and chip reprogrammed; programming process consists in charging some internal capacitors; the UV light (method of erase) makes those capacitors to leak their charge, thus resetting the chip • EEPROM – Electrically Erasable PROM; it is possible to modify individual locations of the memory, leaving others unchanged; one common use of the EEPROM is in BIOS of personal computers.

  49. ROM

More Related