chapter 3 compArchi

Cards (43)

  • Memory hierarchy
    • Shorter access time, Higher cost, Greater performance
    • Larger Storage Capacity
  • A processor can easily move from any one level to some other on the basis of its requirements
  • Memory hierarchy
    • It is used in computer systems to optimize the usage of available memory resources
    • It is developed based on locality of reference (the tendency of programs to access instructions that have addresses or memory locations near one another in order to speed up access and improve performance)
  • Memory access cycle
    1. CPU requests an instruction to be read (or written) from memory
    2. Lookup (If the requested memory location is presently in the level 1 cache, the instruction is immediately read into the CPU)
    3. Execute (Decode and execute instruction)
    4. Fetch (If the instruction is not presently in level 1 cache, the request is passed on to the next level of memory hierarchy)
  • By storing frequently accessed data in faster and smaller memory levels and less frequently accessed data in slower but larger memory levels, memory hierarchy ensures efficient data access, reduces processing time, and enhances overall system performance
  • Internal memory
    Stores small amount of instructions or data (ex: system files, applications) that is needed to be accessed frequently and quickly while the computer is running
  • Internal memory
    • It is directly accessible by the processor over the system bus without accessing the I/O channel of the computer
    • It consists of chips rather than disks or tapes, connected to the motherboard
  • Components of internal memory
    • Registers (L0)
    • Cache (L1)
    • Main Memory (L2)
  • Registers (L0)
    • Temporarily store the most frequently used data and instructions
    • They are present inside the CPU and therefore have the quickest access time
  • Cache (L1)
    • It is a volatile memory (loses its memory content once the power supply to the memory unit is interrupted)
    • It is designed to minimize the time to access data by providing the CPU with quick access to instances of instructions and frequently used data
  • Cache memory usually sits between the CPU and RAM and serves as a buffer between the two
  • Advantages of cache memory
    • It serves as a temporary storage for data or instructions needed by the processor
    • It speeds up data access on the computer because the cache stores data/information has been accessed by a buffer, to ease the work processor
    • The CPU process data much faster as it does not have to use the bus system motherboard for data transfer
  • Main Memory (L2)
    • It stores programs and data that the processor is actively using
    • Active programs and data are copied from secondary memory into main memory where the processor can interact with them
    • It is closely connected to the processor, so moving instructions and data into and out of the processor is very fast
  • Random Access Memory (RAM)

    • It is a volatile memory which temporarily stores operating system software, software applications and other information for the central processing unit (CPU) to have fast and direct access when needed to perform tasks
    • The main memory (RAM) can be accessed directly by CPU to allow data to be read and written during processing without having to go into long-term storage to complete the tasks
  • Advantages of RAM
    • Speed: RAM is much faster than other types of storage, therefore the computer can access the data stored in RAM more quickly
    • Flexibility: RAM is volatile memory, which means that the data stored in it can be easily modified or deleted
    • Capacity: The capacity of RAM can be easily upgraded, which allows the computer to store more data in memory and thus improve performance
  • Disadvantages of RAM
    • Volatility: RAM is volatile memory (the data stored in it is lost when the power is turned off)
    • Capacity: The capacity of RAM is limited, and although it can be upgraded, it may still not be sufficient for certain applications or tasks that require a lot of memory
  • Types of RAM
    • Static RAM (SRAM)
    • Dynamic RAM (DRAM)
  • Read Only Memory (ROM)

    • It is a type of storage medium that permanently stores data
    • The information is stored as read-only (cannot be changed) in ROM during manufacture
    • ROM is non-volatile memory storage (holds its memory even when the power is turned off)
  • Advantages of ROM
    • ROM is more reliable than RAM since it is non-volatile in nature and cannot be altered or accidentally changed
    • The contents of the ROM can always be known and verified
    • Less expensive than RAM
  • Disadvantages of ROM
    • It is a read-only memory, so it cannot be modified
    • It is slower as compared to RAM because it's data can only be read
  • External memory
    • It is a non-volatile memory unit that has a larger storage capacity than main memory to store huge amounts of data persistently
    • It is not directly connected to the CPU therefore can be attached or removed as needed
    • It is accessible by the processor through an I/O module
    • It stores data and instructions that are not currently in use by the CPU
  • Magnetic disk
    • It is a circular flat metal or plastic disc covered with a magnetic coating
    • It uses a magnetization process to write, rewrite and access data
    • Data is organized on the disk in the form of tracks and sectors
  • Secondary memory
    Also known as auxiliary storage or external memory
  • Characteristics of external memory
    • Non-volatile memory unit with larger storage capacity than main memory to store huge amounts of data persistently
    • Not directly connected to the CPU, can be attached or removed as needed
    • Accessible by the processor through an I/O module
    • Store data and instructions not currently in use by the CPU
  • Magnetic disk
    A circular flat metal or plastic disc covered with a magnetic coating that uses a magnetization process to write, rewrite and access data
  • Magnetic disks
    • Hard disks
    • Floppy disks
  • Data organization on magnetic disks
    1. Tracks - circular divisions of the disk
    2. Sectors - slices of the disk that cut through all tracks, used to store data
  • Magnetic disks
    • Economical memory
    • Easy and direct access to data
    • Can store large amounts of data
    • Better data transfer rate than magnetic tapes
    • Less prone to data corruption than tapes
  • Disadvantages of magnetic disks
    • More expensive than magnetic tapes
    • Require a clean and dust-free environment
    • Not suitable for sequential access
  • Optical discs
    Stores data digitally using laser beams to read and write data in the form of tiny pits arranged in a spiral track
  • Major categories of optical discs
    • Read-Only (Factory Pressed)
    • Write-Once (Burnable)
    • Rewritable
  • Uses of optical discs
    • Store large amounts of data such as music, images and videos
    • Transfer data to different computers or devices
    • Back up data from a local machine
  • Advantages of optical discs over magnetic disk cartridges
    • Higher capacities
    • Not subject to head crashes or corruption from stray magnetic fields
    • 30-year life
    • Durable - less vulnerable to extreme hot or cold
  • Disadvantages of optical discs
    • Less storage space
    • Slower speed
    • Physical damage - scratches on surface can affect or damage content, easily broken due to plastic build
  • Magnetic tape
    A long strip of narrow plastic film with thin magnetizable coating, can only be moved in a single direction (sequential access)
  • Advantages of magnetic tape
    • High capacity
    • Low cost
    • Long durability (30-year shelf life)
  • Disadvantages of magnetic tape
    • Needs to be protected from extremes of heat
    • Slow recall capacity
  • Virtual memory
    A memory management technique that computers use to manage storage space to keep systems running quickly and efficiently
  • How virtual memory works
    • Computer only uses virtual memory when it runs out of RAM
    • Virtual memory is equivalent to the size of secondary memory and slower than RAM
    • Part of a computer's CPU, a more cost-effective method for managing memory than expanding physical memory
  • How virtual memory is handled
    1. Paging - breaks programs into fixed-size blocks called pages, loads as much as possible into RAM and transfers unused pages to hard drive
    2. Segmentation - divides program into varying length segments, moves unused segments from virtual memory to hard drive