Computer Memory - The University of Haripur

Document Details

SaintlyRomanArt

Uploaded by SaintlyRomanArt

The University of Haripur

2012

Tags

computer memory ICT computer science storage devices

Summary

This document is a set of lecture notes from The University of Haripur on computer memory. It explores various aspects of how computer memory works, including the different types of memory (primary, secondary, and cache), and discusses several storage devices like hard disks and SSDs.

Full Transcript

The University of Haripur Course: Application of ICT 1 2 COMPUTER MEMORY : Computer memory is just like the human brain. It is used to store data/information and instructions. It is a data storage unit or a data storage device where data is to be pr...

The University of Haripur Course: Application of ICT 1 2 COMPUTER MEMORY : Computer memory is just like the human brain. It is used to store data/information and instructions. It is a data storage unit or a data storage device where data is to be processed and instructions required for processing are stored. It can store both the input and output can be stored. It is a device that is used to store data or information That is either temporary or permanent basis. TYPES : 1- PRIMARY MEMORY 2- SECONDARY MEMORY 3- CACHE MEMORY 3 How Does Computer Memory Work? When you open a program, it is loaded from secondary memory into primary memory. Because there are various types of memory and storage, an example would be moving a program from a solid-state drive (SSD) to RAM. Because primary storage is accessed more quickly, the opened software can connect with the computer’s processor more quickly. The primary memory is readily accessible from temporary memory slots or other storage sites. Memory is volatile, which means that data is only kept temporarily in memory. Data saved in volatile memory is automatically destroyed when a computing device is turned off. When you save a file, it is sent to secondary memory for storage. 4 5 SECONDARY MEMORY : ‘’The storage device that hold data and program even when the computer is turned off’’ It is also known as auxiliary memory and backup memory. It is a non-volatile memory and used to store a large amount of data or information. The data or information stored in secondary memory is permanent, and it is slower than primary memory. A CPU cannot access secondary memory directly. The data/information from the auxiliary memory is first transferred to the main memory, and then the CPU can access it. It is a slow memory but reusable. The storage capacity of secondary memory is large. Example: 1- Hard disk 2-Flash memory 3- Optical disk etc. 6 HARD DISK : “Hard disk drive (HDD) , is a device that store data on a computer using magnetic platter”. Storage: HDD are non-volitile ,meaning it can retain data when the computer is off. CAPACITY: It’s storage capacity is about 500 GB up to 1 TB REPLACEMENT: HDDs is now replace by SSDs 7 Hard Disk The disk is divided into tracks. Each track is further divided into sectors. The outer tracks are bigger than the inner tracks but they contain the same number of sectors and have equal storage capacity. This is because the storage density is high in sectors of the inner tracks whereas the bits are sparsely arranged in sectors of the outer tracks. Some space in every sector is used for formatting. So, the actual capacity of a sector is less than the given capacity. The read-write (R-W) head moves over the rotating hard disk. It is this Read-Write head that performs all the read and write operations on the disk and hence, the position of the R-W head is a major concern. To perform a read or write operation on a memory location, we need to place the R-W head over that position. 8 Hard Disk Drive Components and Form Factors HDD have below components: Platters: Magnetic platters are disk-like in shape and used to store data. Typically, they are made from glass or aluminum and laid down on a spindle where layers of such disks are kept one after the other. Spindle: The spindle maintains the platters in place and rotates them as required. The Revolution Per Minute(RPM) rating controls how fast data can be written to and read from the hard drive. Actuator Arm: The actuator, also known as the head actuator, is a tiny motor that controls the movement of the read/write head and monitors data transfer between the platters. It is in charge of ensuring that the read/write heads are always in the proper direction. Read/write Head : The read/write arm controls the movement of the read/write heads, that perform the actual reading and writing on the disc platters. 9 SSDs(Solid State Drive) : It is newer type of computer storage. An SSD (Solid State Drive) is a type of storage device that stores your data without any moving parts. It’s like a super-fast, super-reliable USB flash drive for your computer. Why is it better than a regular hard drive (HDD)? Faster: SSDs load things much faster, like turning on your computer or opening apps. Tougher: No moving parts means it’s less likely to break if dropped. Quieter: SSDs are silent because they don’t have spinning disks inside. Use less power: This is great for battery life, especially in laptops. 10 MAGNETIC TAPE : Magnetic tape is method of storing digital data on a Thin plastic strip with a magnetic coating. ADVANTAGES : Non-volatile It does not required electrically to store data Cost effective It store large amount of data. It does not need a connection to a power source. Magnetic Disks: A magnetic disk is a circular metal or a plastic plate and these plates are coated with magnetic material. The disc is used on both sides. Bits are stored in magnetized surfaces in locations called tracks. Sectors are typically used to break tracks into pieces. 11 FLASH MEMORY : MUSOKA FUJIO “The storage device that can store data and can be reprogrammed and erased electronically” Flash memory is a type of storage that retains data even when the power is turned off. It's a non-volatile memory, meaning it doesn't lose your data when you shut down the devices. USES : It is used to transfer file between the computer. TYPES : 1- SSDs 2- USB drive : 1GB TO 2 TB 3- SD card : 1 GB TO 1 TB 12 OPTICAL DISK : “A flate , circular storage medium that use a laser beam to read and write data” An optical disk is a data storage medium that uses laser light to read and write information. The data is stored in the form of pits and lands on the disk surface, which are read by a laser. Pits: These are small, microscopic depressions or indentations created on the disk's surface. They represent "0" in binary code (the fundamental language of data storage). Lands: These are the flat, smooth areas between the pits, representing "1" in binary code. TYPES : Compact disk (CD): 700 MB Digital versatile disk (DVD) 17.8 GB Blue-ray disk : 128 GB 13 Primary memory: It is also known as “main memory” and directly communicate with CPU. Primary memory is a segment of computer memory that can be accessed directly by the processor. In a hierarchy of memory, primary memory has access time less than secondary memory and greater than cache memory Smaller in size Access time is too high Without primary memory we cannot work on our device More expensive High speed There are two types of primary memory: 1.RAM(random access memory) 2.ROM(Read-only memory) 14 RAM (Random access memory) : That type of computer memory that store data for a short time It is also known as volatile memory When the computer is turned off you lose data RAM allow the computer to access data quickly It store data temporary Random Access Memory (RAM) is a type of computer memory that stores data temporarily while a computer is running. It’s called “random access” because the computer can access any part of the memory directly and quickly. RAM helps computer run programs and process information quickly. Types of RAM : 1.STATIC RAM (SRAM) 2.DYNAMIC RAM (DRAM) 15 DYNAMIC RAM : Dynamic RAM or DRAM needs to periodically refresh in a few milliseconds to retain data. DRAM is made up of capacitors and transistors and electric charge leaks from capacitors and DRAM needs to be charged periodically. DRAM is widely used in home PCs and servers as it is cheaper than SRAM. It is need to refreshing time by time for maintaining data Because of it DRAM is slower processing time less expensive Capacitor are used in DRAM It maintain data for a short time 16 Static RAM (SRAM) It does not need to refresh time by time to maintain data It’s speed is too high more expensive In static ram transistor are used When the power is off the data is lose 17 READ ONLY MEMORY: ROM stand for Read only memory it is non-volatile Any data which need not be altered are stored in ROM. ROM includes those programs which run on booting of the system (known as a bootstrap program that initializes OS) along with data like algorithm required by operating system. Anything stored in ROM cannot be altered or changed. Memory that mean the data is permanently stored on the chip. Non-volatile memory can not be changed by user. Turning off the computer does not have any effect on ROM 18 Types of ROM 1.PROM: Programmable ROM can be modified once by the user. The user buys a blank PROM and writes the desired content but once written content cannot be change. It is a type of ROM which can be programmed one and Then can never be changed. This process is irreversible. 2.EPROM: EPROM is an erasable PROM. The store data in EPROM can be erased by exposing it to Ultra Violet (UV) light for about 20 minutes. 19 3.EEPROM EEPROM (Electrically erasable PROM) is a chip that can be erased and reprogrammed on the board. it can be erased within a few milliseconds. There is a limit on the number of times the EEPROM can be reprogrammed.i.e; usually around 10,000 times. Electrically Erasable and Programmable ROM Content can be changed by erasing the initial content which could be easily erased electrically. However, one byte can be erased at a time instead of deleting in one go. Hence, reprogramming of EEPROM is a slow process. 20 Register Memory: Registers are small storage areas in CPU. Registers are typically the fastest type of memory in a computer system, offering very fast access times compared to other types of memory like RAM (Random Access Memory) or disk storage. So, the CPU uses registers to hold the most important small pieces of data and instructions it needs right away. This allows the CPU to work quickly without having to wait for data from the slower main memory. All data must go through registers before the CPU can process it. Registers hold a very small amount of data, typically between 32 and 64 bits (Small information units). The speed of the CPU depends on how many registers it has and how big they are. More and bigger registers allow the CPU to work faster. Micro chips. Small amount of memory. Built in CPU. Store data temporarily 21 Stack Register: (used to implement a stack data structure) Program Counter: (Store address of next instruction to be executed) The program counter (PC) register holds the memory address of a next instruction that needs to be fetched and then executed after the current instruction completes. Its role is to maintain the proper sequence of the path for the executing different program instructions one by one. Accumulation Register : (Store results of arithmetic and logical operations). The accumulator (AC) register, 16 bits in size, is used to store the result produced by the CPU after carrying out arithmetic or logical operations. Any final output data generated by the system is stored her Address Register: The address register is a 12-bit register that stores the specific address location in the memory where a particular instruction or data is residing. The CPU uses this address to fetch or store instructions/data from/to the memory. 22 I/O Address Register The I/O address register specifies the unique address associated with a particular input/output device that the CPU wants to communicate or interact with, such as a mouse, printer, etc. I/O Buffer Register The I/O buffer register acts as a temporary buffer to exchange or hold data that is being transferred between an I/O module (like a USB port) and the CPU before or after processing. Data Register The data register is a 16 bit register it used to temporarily store the operands (variables) that need to be operated on by the processor. It acts as a temporary holding area for the data that being transmitted to or received from the peripheral devices like the printers or keyboards. 23 Characteristics: small size memory(few bytes to few kilobytes). Fast access. volatile memory. Types: 1) General purpose Register: (store temporary data during process). 2) Index Register: (store indices or pointers to data in memory). 24 Advantages: 1) Fast access. (fast speed of data transfer) 2) Improved performance. (Improve performance of program) 3) Reduce memory access. (reduce access from main memory). Disadvantages: 1) Limited capacity. (few bytes to few kilobytes) 2) volatile memory. (data lost when power is off) 25 Cache Memory: Small, Fast and temporary. Store frequently used data. Act as a buffer between CPU and main memory. Provide quick access to essential data. It is used to reduce the average time to access data from the main memory. Holds frequently requested data and instructions, ensuring that they are immediately available to the CPU when needed. 26 Accessing Cache Memory Only the CPU can access the cache memory. This memory can be the reserved part of a main memory/storage device outside the CPU. The cache holds the data and programs that the CPU uses frequently. Thus, it ensures that the information is instantaneously available for the CPU as and when the CPU needs this information. In simpler words, if the CPU finds the required instructions or data in the system’s cache memory, it does NOT need to access its primary memory or RAM. Thus, it speeds up the performance of the system by operating as a buffer between the RAM and the CPU. 27 Types: Level 1 cache: Fastest and Smallest cache level built into CPU core. Level 2 cache: Larger and Slower then L1 usually located on CPU or motherboard. Level 3 cache: shared among multiple cores and providing larger and slower cache. This cache is not present in all the processors; some high-end processors may have this type of cache. This cache is used to enhance the performance of Level 1 and Level 2 cache. It is located outside the CPU and is shared by all the cores of a CPU. 28 BUFFER MEMORY : Definition A Buffer is a part of memory which stores data temporarily while that data is being forwarded from one location to another in a computer. It can be utilized whenever there are a relative difference in data transfer rates between the two components or the pattern of data transfer is in bursts. How it’s work: data storage, data transfer Function : smooth data transfer, process optimization speed bridging. example : printing , networking ,streaming. 29 VIRTUAL MEMORY : Definition : Virtual memory is a technique that provides an “illusion” of a large main memory. It hides the real organization of main memory from the processes. The operating system uses a portion of the hard disk to emulate the computer’s RAM. This increases the capacity of the main memory and facilitates multitasking. How it’s work : paging and demand paging.: Benefit of virtual memory : large virtual space , multitasking, Cost-effective 30 31

Use Quizgecko on...
Browser
Browser