Computer Memory system Prepared by Shyama Barna Bhattacharjee
What will we learn from today’s class? Computer memory system Types Characteristics of different memories What are the uses of different memories Real life example of that memory’s implementation.
What is Memory? The computer memory holds the data and instructions needed to process raw data and produce output. It is the same as a human mind, where data, information, and instructions are stored. It is a data storage device or a data storage component where instructions for processing data are kept along with the data that has to be processed. Both the input and the output can be held here.
How does computer memory work? A program is loaded from secondary memory to primary memory when it is opened. There are several types of memory and storage, for example, a program being moved from a solid-state drive (SSD) to RAM (Random Access Memory). The opened software will be able to communicate with the computer's processor at a faster rate because primary storage is accessed more quickly. The main or primary memory can be accessed quickly from storage locations such as temporary memory slots. Data in memory is only saved temporarily since memory is volatile. Data saved in volatile memory will be erased immediately whenever a computer is turned off. A file is transported to secondary memory for permanently storage when it is saved. There are numerous kinds of memory present in a computer. Depending on the primary memory utilized, it will perform differently, but semiconductor-based memory is typically connected with memory. Integrated circuits utilizing metal-oxide-semiconductor (MOS) transistors based on silicon will be used to make semiconductor memory.
Functions of Computer Memory Data Storage: The primary role of computer memory is to keep data. This includes the OS, software packages, and user-generated documents. The hierarchical arrangement guarantees that the most regularly accessed data is stored in the fastest, smallest sort of memory. Program Execution: When software is launched, it's loaded into RAM for execution. The CPU fetches commands and facts from RAM, and the quicker cache memory, when possible, performs the critical computations. The rate and overall performance of this approach impact the overall performance of the PC. Temporary Storage: Memory is used for brief storage of records throughout ongoing operations. For example, at the same time as you edit a document, the adjustments are quickly saved in RAM until you save the file. This temporary storage is crucial for seamless individual considerations. Caching: Cache memory performs a pivotal function in caching regularly accessed information. By preserving a copy of these records near the CPU, cache memory reduces the time needed to retrieve information, enhancing the overall speed of the system. Virtual Memory: Operating structures use a concept known as virtual memory to simulate larger RAM capacities than are physically available. This includes the use of a part of RAM. While virtual memory allows the execution of larger applications, it's slower than physical RAM.
Memory Hierarchy Computer memory system Secondary memory/Non-volatile memory/ Auxilary memory Register Cache memory Primary memory/ Volatile memory/Main memory. Exception : ROM non-volatile Registers are the fastest and smallest figure of memory, residing inside the CPU (Central Processing Unit). They keep the fact that the CPU is actively used or manipulated. Registers provide the fastest feasible way to get entry to stored data. However, their limited capacity means they're capable of saving a small amount of data . Cache memory is the mediator between registers and RAM. It's quicker than RAM but larger than registers. The CPU uses cache memory to save often-accessed data and instructions, decreasing the time it takes to fetch data from the slower RAM .
Memory Hierarchy (continuing….) Increased in capacity , size& access time
Is it memory or storage ?? While "memory" and "storage" are often used interchangeably, they actually have notable differences. Simply said, storage is secondary memory, while memory is primary or main memory. Storage refers to where long-term data is stored, whereas memory refers to where short-term data is stored.
Register Memory Register memory is the smallest and fastest memory in a computer. It is not a part of the main memory and is located in the CPU in the form of registers, which are the smallest data holding elements. A register temporarily holds frequently used data, instructions, and memory address that are to be used by CPU. They hold instructions that are currently processed by the CPU. All data is required to pass through registers before it can be processed. So, they are used by CPU to process the data entered by the users. Registers hold a small amount of data around 32 bits to 64 bits. The speed of a CPU depends on the number and size (no. of bits) of registers that are built into the CPU. Registers can be of different types based on their uses. Some of the widely used Registers include Accumulator or AC, Data Register or DR, the Address Register or AR, Program Counter (PC), I/O Address Register, and more.
Types of Registers Data Register: It is a 16-bit register, which is used to store operands (variables) to be operated by the processor. It temporarily stores data, which is being transmitted to or received from a peripheral device. Program Counter (PC): It holds the address of the memory location of the next instruction, which is to be fetched after the current instruction is completed. So, it is used to maintain the path of execution of the different programs and thus executes the programs one by one, when the previous instruction gets completed. Instructor Register: It is a 16-bit register. It stores the instruction which is fetched from the main memory. So, it is used to hold instruction codes, which are to be executed. The Control Unit takes instruction from Instructor Register, then decodes and executes it. Accumulator Register: It is a 16-bit register, which is used to store the results produced by the system. For example, the results generated by CPU after the processing are stored in the AC register. Address Register: It is a 12-bit register that stores the address of a memory location where instructions or data is stored in the memory. I/O Address Register: Its job is to specify the address of a particular I/O device. I/O Buffer Register: Its job is to exchange the data between an I/O module and the CPU.
Cache memory It is used to synchronize with high-speed CPU and to improve its performance. Cache memory can only be accessed by CPU. It can be a reserved part of the main memory or a storage device outside the CPU. It holds the data and programs which are frequently used by the CPU. So, it makes sure that the data is instantly available for CPU whenever the CPU needs this data. In other words, if the CPU finds the required data or instructions in the cache memory, it doesn't need to access the primary memory (RAM). Thus, by acting as a buffer between RAM and CPU, it speeds up the system performance. There are three levels of chache memory , such as L1,L2,L3 . They act as different types of chache memory. The L1 cache further has two types of caches: Instruction cache, which stores instructions required by the CPU, and the data cache that stores the data required by the CPU.
Types of computer memory (Primary memory/Volatile memory/Main memory): RAM : The term refers to the fact that the processor can directly access any storage location. Random Access Memory, or RAM, is a piece of hardware that serves as the internal memory of the CPU. It is often found on a on the motherboard of a computer. When the computer is turned on, it enables the CPU to store programs, information, and result of the program. Also, it is a computer's read-write memory, which means data can be added to it as well as read from it. Dynamic RAM: A type of random-access memory that is used in computing systems (primarily PCs) is called dynamic random-access memory (DRAM). The data or program code required for a computer processor to operate is often stored in DRAM, which is a kind of semiconductor memory. Each piece of data is stored in DRAM in its own passive electrical component, which is located inside an integrated circuit board. Each electrical component has two value states, known as 0 and 1, in one bit. Static RAM: As long as SRAM receives power, it keeps data bits in its memory. It does not need to be refreshed on a regular basis, in contrast to DRAM, which stores bits in cells made up of a capacitor and a transistor. Double Data Rate SDRAM: Theoretically, DDR SRAM can increase the memory clock speed to at least 200 MHz. It is an SDRAM. Double Data Rate 4 Synchronous Dynamic RAM: DDR4 RAM is the successor to its preceding DDR2 and DDR3 iterations. It is a kind of DRAM that contains a high-bandwidth interface. Higher module density and lower voltage requirements are both possible with DDR4 RAM. It enables dual in-line memory modules (DIMMS) up to 64 GB; Also, higher data rate transfer speeds are paired with it. Rambus Dynamic RAM: A memory component called DRDRAM made a guarantee to transport up to 1.6 billion bytes per second. The RAM controller subsystem consists of RAM, a bus connecting RAM to the microprocessor, and computer-using devices that make up the subsystem.
Types of computer memory (Primary memory/exception :Non-Volatile memory/Main memory): Read-only memory: ROM is often only read from and not written to, which is a type of computer storage. It is nonvolatile in nature, which means it stores data permanently. The programming code is stored in the ROM that enables a computer system to boot up or regenerate every time when it is turned on. Programmable ROM: PROM is ROM that a user can modify only once. Using a unique device known as a PROM programmer enables a user to customize a microcode program. Erasable PROM: EPROM is a type of computer memory that can be erased and re-used. It is programmable read-only memory PROM. Electrically erasable PROM: A user-modifiable ROM called an EEPROM can be repeatedly wiped and reprogrammed with the help of an using electrical voltage that is higher than usual. Unlike EPROM chips, EEPROMs can be changed without being taken out of the computer. However, an EEPROM chip must be completely deleted and reprogrammed, not just some parts of it.
Some Ram brands Corsair –US based company G.SKILL - Taiwan based company Kingston -US based company Crucial - Micron technology –US Samsung - South Korean company
Secondary memory/Non-volatile memory/ Auxilary memory Used to store large volume of data on a permanent basis.
Sequential-access Storage Devices Suitable for sequential processing applications where most, if not all, of the data records need to be processed one after another Magnetic tape is a typical example of such a storage device
Magnetic Tape Physically, the tape medium is a plastic ribbon, which is usually ½ inch or ¼ inch wide and 50 to 2400 feet long Plastic ribbon is coated with a magnetizable recording material such as iron-oxide or chromium dioxide Data are recorded on the tape in the form of tiny invisible magnetized and non-magnetized spots (representing 1s and 0s) on its coated surface Tape ribbon is stored in reels or a small cartridge or cassette Storage capacity of a tape = Data recording density x Length Data recording density is the amount of data that can be stored on a given length of tape. It is measured in bytes per inch (bpi) Tape density varies from 800 bpi in older systems to 77,000 bpi in some of the modern systems
Magnetic Tape - Storage Organization 1
Magnetic Tape - Storage Organization 2
Advantage of Magnetic tape Storage capacity is virtually unlimited because as many tapes as required can be used for storing very large data sets Cost per bit of storage is very low for magnetic tapes. Tapes can be erased and reused many times Tape reels and cartridges are compact and light in weight Easy to handle and store. Very large amount of data can be stored in a small storage space Compact size and light weight Magnetic tape reels and cartridges are also easily portable from one place to another Often used for transferring data and programs from one computer to another that are not linked together
Disadvantages of Magnetic Tape Due to their sequential access nature, they are not suitable for storage of those data that frequently require to be accessed randomly Must be stored in a dust-free environment because specks of dust can cause tape-reading errors Must be stored in an environment with properly controlled temperature and humidity levels Tape ribbon may get twisted due to warping, resulting in loss of stored data Should be properly labeled so that some useful data stored on a particular tape is not erased by mistake
Magnetic Disk Commonly used direct-access secondary storage device. Physically, a magnetic disk is a thin, circular plate/platter made of metal or plastic that is usually coated on both sides with a magnetizable recording material such as iron-oxide Data are recorded on the disk in the form of tiny invisible magnetized and non-magnetized spots (representing 1s and 0s) on the coated surfaces of the disk The disk is stored in a specially designed protective envelope or cartridge, or several of them are stacked together in a sealed, contamination-free container
Magnetic Disk – Storage Organization Illustrates the Concept of Sectors
Magnetic disk –access time. Disk access time is the interval between the instant a computer makes a request for transfer of data from a disk system to the primary storage and the instant this operation is completed Disk access time depends on the following three parameters: Seek Time : It is the time required to position the read/write head over the desired track, as soon as a read/write command is received by the disk unit Latency : It is the time required to spin the desired sector under the read/write head, once the read/write head is positioned on the desired track Transfer Rate : It is the rate at which data are read/written to the disk, once the read/write head is positioned over the desired sector As the transfer rate is negligible as compared to seek time and latency, Average access time = Average seek time + Average latency
Types of Magnetic Disks
Floppy Disk Round, flat piece of flexible plastic disks coated with magnetic oxide So called because they are made of flexible plastic plates which can bend Also known as floppies or diskettes Plastic disk is encased in a square plastic or vinyl jacket cover that gives handling protection to the disk surface
The hard disk is also known as a hard drive. It is a rigid magnetic disc that stores data permanently, as it is a non-volatile storage device. The hard disk is located within a drive unit on the computer's motherboard and comprises one or more platters packed in an air-sealed casing. The data is written on the platters by moving a magnetic head over the platters as they spin. The data stored on a computer's hard drive generally includes the operating system, installed software, and the user's files and programs, including pictures, music, videos, text documents, etc. Hard Disk:
Solid-state Drive: SSD (Solid State Drive) is also a non-volatile storage medium that is used to hold and access data. Unlike a hard drive, it does not have moving components, so it offers many advantages over SSD, such as faster access time, noiseless operation, less power consumption, and more.
Optical Disk Consists of a circular disk, which is coated with a thin metal or some other material that is highly reflective Laser beam technology is used for recording/reading of data on the disk Also known as laser disk / optical laser disk, due to the use of laser beam technology Proved to be a promising random access medium for high capacity secondary storage because it can store extremely large amounts of data in a limited space
Types of Optical Disk CD-ROM Stands for Compact Disk-Read Only Memory Packaged as shiny, silver color metal disk of 5¼ inch (12cm) diameter, having a storage capacity of about 650 Megabytes Disks come pre-recorded and the information stored on them cannot be altered Pre-stamped (pre-recorded) by their suppliers, by a process called mastering
Types of Optical Disk Digital Video / Versatile Disk (DVD) Looks same as CD-ROM but has capacity of 4.7 GB or 8.5 GB Designed primarily to store and distribute movies Can be used for storage of large data Types of DVDs: DVD-ROM (Read-Only): These types of DVDs come with media already recorded on them, such as movie dvds . As the name suggests, data on these discs cannot be erased or added, so these discs are known as a read-only or non-writable DVD. DVD-R (Writable): It allows you to record or write information to the DVD. However, you can write information only once as it becomes a read-only DVD once it is full. DVD-RW (Rewritable or Erasable): This type of discs can be erased, written, or recorded multiple times.
Types of Optical Disk WORM Disk / CD-Recordable (CD-R) Stands for Write Once Read Many. Data can be written only once on them, but can be read many times Same as CD-ROM and has same storage capacity Allow users to create their own CD-ROM disks by using a CD-recordable (CD-R) drive that can be attached to a computer as a regular peripheral device Data to be recorded can be written on its surface in multiple recording sessions CD-Read/Write (CD-RW) Can be erased and written afresh
Memory Storage Devices Flash Drive (Pen Drive) Relatively new secondary storage device based on flash memory, enabling easy transport of data from one computer to another Compact device of the size of a pen, comes in various shapes and stylish designs and may have different added features Plug-and-play device that simply plugs into a USB (Universal Serial Bus) port of a computer, treated as removable drive
Memory Storage Devices Memory Card (SD/MMC) SD Card stands for Secure Digital Card. It is most often used in portable and mobile devices such as smartphones and digital cameras. You can remove it from your device and see the things stored in it using a computer with a card reader. There are many memory chips inside the SD card that store the data; it does not have moving parts. SD cards are not created equal, so they may differ from each other in terms of speed, physical sizes, and capacity. For example, standard SD cards, mini SD cards, and micro SD cards.
Mass Storage Devices these are storage systems having several trillions of bytes of data storage capacity The three commonly used types are: Disk array , which uses a set of magnetic disks Automated tape library , which uses a set of magnetic tapes CD-ROM Jukebox , which uses a set of CD-ROMs
Disk Array Set of hard disks and hard disk drives with a controller mounted in a single box, forming a single large storage unit It is commonly known as a RAID (Redundant Array of Inexpensive Disks ) As a secondary storage device, provides enhanced storage capacity, enhanced performance, and enhanced reliability Enhanced storage capacity is achieved by using multiple disks Enhanced performance is achieved by using parallel data transfer technique from multiple disks Enhanced reliability is achieved by using techniques such as mirroring or striping In mirroring , the system makes exact copies of files on two hard disks In striping , a file is partitioned into smaller parts and different parts of the file are stored on different disks
Automated Tape Library Set of magnetic tapes and magnetic tape drives with a controller mounted in a single box, forming a single large storage unit Large tape library can accommodate up to several hundred high capacity magnetic tapes bringing the storage capacity of the storage unit to several terabytes Typically used for data archiving and as on-line data backup devices for automated backup in large computer centers
CD-ROM Jukebox Set of CD-ROMs and CD-ROM drives with a controller mounted in a single box, forming a single large storage unit Large CD-ROM jukebox can accommodate up to several hundred CD-ROM disks bringing the storage capacity of the storage unit to several terabytes Used for archiving read-only data in such applications as on-line museums, on-line digital libraries, on-line encyclopedia, etc
Memory Units A memory unit is a fundamental part of a computer machine that performs a vital function for storing and retrieving information and instructions. Memory units have distinct purposes, including primary and secondary memories. Functions of Memory Units: Data Storage: Data Retrieval: Data Processing: Multitasking: System Performance: