Lecture 2 (Memory) Dr. Muhammad Ayaz Computer Organization and Assembly Language. (CSC-210)

Slides:



Advertisements
Similar presentations
What is memory? Memory is used to store information within a computer, either programs or data. Programs and data cannot be used directly from a disk or.
Advertisements

Parts & Functions of a Computer. 2 Functions of a Computer.
Characteristics of Computer Memory
©Brooks/Cole, 2003 Chapter 5 Computer Organization.
Memory Organization.
Overview: Memory Memory Organization: General Issues (Hardware) –Objectives in Memory Design –Memory Types –Memory Hierarchies Memory Management (Software.
IT Systems Memory EN230-1 Justin Champion C208 –
Objectives Overview Discovering Computers 2014: Chapter 6 See Page 248
COMPUTER MEMORY Modern computers use semiconductor memory It is made up of thousands of circuits (paths) for electrical currents on a single silicon chip.
Characteristics of Computer Memory
1 Introduction to Computers Day 6. 2 Main Circuit Board of a PC The main circuit board (motherboard or system board) is the central nervous system of.
Memory. When we receive some instruction or information we retain them in our memory. Similarly a computer stores the instructions for solving a problem,
F1020/F1031 COMPUTER HARDWARE MEMORY. Read-only Memory (ROM) Basic instructions for booting the computer and loading the operating system are stored in.
Chapter 3 – Computer Hardware Computer Components – Hardware (cont.) Lecture 3.
COMPONENTS OF THE SYSTEM UNIT
Parts and usage. Motherboard is the most important component in any personal computer. It contains almost every important elements of the computer. Sometimes.
Memory. Random Access Memory Defined What is memory? operating system and other system software that control the usage of the computer equipment application.
Chapter 6 Inside Computers and Mobile Devices Discovering Computers Technology in a World of Computers, Mobile Devices, and the Internet.
Memory Hierarchy.
Stuart Cunningham - Computer Platforms COMPUTER PLATFORMS Input, Output, and Storage & Introduction to Basic Computer Architecture Week 2.
Memory Main memory consists of a number of storage locations, each of which is identified by a unique address The ability of the CPU to identify each location.
Chapter 3 Computer Hard ware
B.A. (Mahayana Studies) Introduction to Computer Science November March The Motherboard A look at the brains of the computer, the.
Computing Hardware Starter.
Introduction to Computing: Lecture 4
Random access memory.
MAC OS – Unit A Page: 10-11, Investigating Data Processing Understanding Memory.
Discovering Computers 2012: Chapter 4
Objectives Overview Describe the various computer and mobile device cases and the contents they protect Describe multi-core processors, the components.
CS1104: Computer Organisation School of Computing National University of Singapore.
GCSE Computing Memory Powerpoint Templates.
Computer Architecture CST 250 MEMORY ARCHITECTURE Prepared by:Omar Hirzallah.
3 Computing System Fundamentals
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Chapter 2: Memory.
CIM101 : Introduction to computer Lecture 3 Memory.
Lesson 3 — How a Computer Processes Data Unit 1 — Computer Basics.
SKILL AREA: 1.2 MAIN ELEMENTS OF A PERSONAL COMPUTER.
1 Course Title: IT IN BUSINESS Course Instructor: ADEEL ANJUM Chapter No: 04 1 BY ADEEL ANJUM (MCS, CCNA,WEB DEVELOPER)
Computer Hardware. Lally School of M&T- Microcomputing and Info Systems Lecture Topics 1. Data Representation 2. Data Metrics 3. Central processing Unit.
© GCSE Computing Computing Hardware Starter. Creating a spreadsheet to demonstrate the size of memory. 1 byte = 1 character or about 1 pixel of information.
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
Lecture#15. Cache Function The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that.
Understanding Memory.
The Computer System.
Chapter 2.
Memory The term memory is referred to computer’s main memory, or RAM (Random Access Memory). RAM is the location where data and programs are stored (temporarily),
Jeffrey Ellak CS 147. Topics What is memory hierarchy? What are the different types of memory? What is in charge of accessing memory?
STATUS REGISTER  It is a group of flip-flops. But it is not used to store data.  Each bit in the status register is used to indicate a particular condition.
Instructor: Syed Shuja Hussain Chapter 2: The System Unit.
Instructor: Chapter 2: The System Unit. Learning Objectives: Recognize how data is processed Understand processors Understand memory types and functions.
Instructor: Syed Shuja Hussain Chapter 2: The System Unit.
PCs ENVIRONMENT and PERIPHERALS Lecture 3. operating system and other system software that control the usage of the computer equipment application programs.
Components of Computer. Memory Unit Most important part of the computer Used to store data and instructions that are currently in use Main memory consists.
Chapter 2 content Basic organization of computer What is motherboard
MEMORY BYTES. MEMORY BYTES MEMORY MEMORY OUR Internal External.
Memory Main memory consists of a number of storage locations, each of which is identified by a unique address The ability of the CPU to identify each location.
Memory Main memory consists of a number of storage locations, each of which is identified by a unique address The ability of the CPU to identify each location.
CS-301 Introduction to Computing Lecture 17
Memory Holding area for data, instructions, and information
Memory chips Memory chips have two main properties that determine their application, storage capacity (size) and access time(speed). A memory chip contains.
COMPUTER ORGANISATION AND ARCHITECTURE
Introduction to Computers
Introduction to Computing
Computer Hardware Prepared by:- Mr. Pawan Kumar
MICROPROCESSOR MEMORY ORGANIZATION
2.C Memory GCSE Computing Langley Park School for Boys.
Overview 1. Inside a PC 2. The Motherboard 3. RAM the 'brains' 4. ROM
Introduction To Computing BBA & MBA
Lecture 2 (Memory) Computer Organization and Assembly Language. (CSC-210) Dr. Mohammad Ammad uddin.
Computer Memory.
Presentation transcript:

Lecture 2 (Memory) Dr. Muhammad Ayaz Computer Organization and Assembly Language. (CSC-210)

2

3 Structure - Top Level computer peripherals network System interconnection Memory I/O CPU

Memory and Storage Systems n Primary Memory: Storing the data that are being currently handled by the CPU; generally known as “memory”; n Secondary Memory: Storing the results and the data for future use; generally known as “storage”; n Internal Process Memory: Placed either inside the CPU or near the CPU.

How Computer Memory Works 5

Memory Hierarchy register CPU cache Main Memory Secondary Storage Server (or INTERNET) larger capacity lower speed lower cost

Volatility 7 Memory can be split into two main categories: volatile and nonvolatile. u Volatile memory loses any data as soon as the system is turned off; it requires constant power to remain viable. Most types of RAM fall into this category. u Nonvolatile memory does not lose its data when the system or device is turned off. A number of types of memory fall into this category. The most familiar is ROM, but Flash memory storage devices such as Compact Flash or Smart Media cards are also forms of nonvolatile memory.

Main Memory Unit n The main memory is referred to as the internal memory of primary memory of the computer. It is also known as Random Access Memory (RAM).

Read Only Memory n ROM is the memory that stores the data permanently. n The data can be easily read from this type of memory but cannot be changed. n ROM is most commonly used in devices such as calculators, laser printers, etc. n ROM does not allow the random access of data, and allows sequential access of data.

Cache Memory n Cache memory is a small, fast and expensive memory that stores the copies of data that needs to be accessed frequently from the main memory. n Cache memory is neither main memory nor second memory. DDR's are Main memory and Disk is second

Cache Operation n CPU requests contents of memory location n Check cache for this data n If present, get from cache (fast) n If not present, read required block from main memory to cache n Then deliver from cache to CPU n Cache includes tags to identify which block of main memory is in each cache slot

Cache and Main Memory

Cache operation – overview n Processor does all memory operations with cache. n Miss -- If requested word is not in cache, a block of words containing the requested word is brought to cache, and then the processor request is completed. n Hit – If the requested word is in cache, read or write operation is performed directly in cache, without accessing main memory. n Block – minimum amount of data transferred between cache and main memory. Processor Cache Small, fast memory Main memory large, inexpensive (slow) words blocks

Cache Read Operation - Flowchart

Caching n A small, high speed memory close to the CPU u Each line of cache memory can be “occupied” or “empty” u “Occupied” lines map to a memory location u Hardware cache management mechanism (potentially with software hints) u Typically used for both programs and data n Choosing victim for replacement on cache miss u FIFO u Least Recently Used, u Random

Caching in contemporary processors

Cache Functions n I-cache: holds instructions n D-cache: holds data n Unified cache: holds both instructions and data n Split cache: system with separate I-cache and D-cache

Memory types RAMROM SRAMDRAM PROMEPROM VolatileNon-volatile Semiconductor

Memory types n DRAM - Dynamic RAM u Data leaks out u Needs to be refreshed thousands of times per second u Only needs one transistor u Slow and less costly n SRAM - static RAM u Values don’t leak u No need to refresh u Made from 4-6 transistors u Fairly expensive, but fast and low powered

PROM and EPROM n PROM u A variation of a ROM is a PROM (programmable read- only memory). u PROMs are manufactured as blank chips on which data can be written with a special device called a PROM programmer n EPROM u EPROM (erasable programmable read only memory) is more advanced form of PROM. u Can be programmed and then erased (typically erased with a UV [ultra-violet light] eraser. 21

Virtual Memory n If your computer lacks the random access memory (RAM) needed to run a program or operation, Windows uses virtual memory to compensate

What is … n Virtual memory as an alternate set of memory addresses. n Programs use these virtual addresses rather than real addresses to store instructions and data. n When the program is actually executed, the virtual addresses are converted into real memory addresses. n Eliminate a restriction that a computer works in memory which is small and be limited.

Virtual Memory n If you receive error messages that warn of low virtual memory, you need to either add more RAM or increase the size of your paging file so that you can run the programs on your computer. Windows usually manages the size automatically, but you can manually change the size of virtual memory if the default size is not enough for your needs.

Paging n Paging is a method of writing data to, and reading it from, secondary storage for use in main memory. n The OS copies a certain number of pages from your storage device to main memory. When a program needs a page that is not in main memory, the OS copies the required page into memory and copies another page back to the disk. n It also called operating system pages the data. n Each time a page is needed that is not currently in memory, a Page Fault occurs. n An invalid page fault occurs when the address of the page being requested is invalid. In this case, the application is usually aborted.

Memory Management unit( )

Why Have Virtual Addresses? n Virtual address can be larger than the logical address, allowing program units to be mapped to a much larger virtual address space n Example: PowerPC 601 u Logical address: 32 bits u Virtual address: 52 bits u Physical address: depends on how much memory

Terminology n Block: minimum unit of information present (or not) in a multilevel hierarchy (think book) n Hit: data found in upper level (on desk) n Miss: data not found in upper level u Lower level accessed to find block (go to shelves) n Hit rate: fraction of memory accesses found on upper levels u Used to measure performance n Miss rate: fraction of memory accesses not found on upper levels (1 - hit rate)

Terminology… n Hit time: Time to access upper level of hierarchy (incl. Time to determine if it is there) – looking at desk n Miss penalty: Time take to replace block at upper level with block from lower level AND time to deliver block to processor – time to go to shelves and back n Impacts: OS design, how code is compiled, how applications are written

Summary Diagrams

31 Motherboard Processor SIMM / DIMM Sockets PCI Card Slots Parallel/Serial IDE Connectors PS/2 connectors USB 2.0 Sound

32 n IDE (Integrated Drive Electronics) n DIMM (Dual in-line memory Module) n BIOS (Basic Input/Output System) n CMOS (Complementary Metal Oxide Semiconductor) n SATA (Serial Advanced Technology Attachment) n PCI (Peripheral Component Interconnect) n VGA (Video Graphics Array) n USB (Universal Serial Bus) Abbreviations of Important terms.