Thursday, April 4, 2019
Memory Units And Memory Hierarchy
fund units And store pecking order store board organisation is combination of several retentiveness devices efficiently. entrepot devices ar combined and organised based on their characteristic such as admittance time, pep pill, shop capacity, physiological size and cost per byte. computer memory devices organised in such a way that information processing system system should operate at highest speed, provide bulky storage capacity, humiliateder in size and little in a cost. retention organisation procedures unproblematic shop devices and petty(a) fund devices.3.2 Memory unit of measurementMemory unit is storage unit of the computing machine system. It stores sate such as instructions (codes) and info for temporary or permanent purpose. It is employ to stores content and to retrieves the content when needed by central processing unit or substance abuser. Memory unit includes two types of retrospect primary (main) and unessential. Instruction or data giv en by input devices is first getting stored in the primary computer memory. Further users saves processed (executed) data in the secondary memory. Primary memory is volatile (temporary). It is faster than secondary memory. It includes RAM and read-only storage. It is directly botherible by CPU. secondary coil memory is non-volatile (permanent). It includes several secondary storage devices such as Hard harrow Drive (HDD), floppy disk record Drive (FDD), CDread-only memory, and DVD and so on. Figure 3.1 shows memory unit and communication duct with separate units.Note Volatile memory loses its content when figurer loses power. In non-volatile memory power loss of computer does not affects content.Input UnitProcess UnitOutput UnitPrimary Memory auxiliary MemoryMemory Unit3.3 Memory hierarchyMemory organisation includes various memory devices. These devises are structured in a hierarchy based on the characteristics of memory devices. Memory hierarchy explains the chronological succession of accessing memory device while processing, in the computer system. Memory is structured in the hierarchy in such a way that computer system should give excellent performance. Figure 3.2 shows Memory hierarchy. Hierarchy is make on the basis of characteristics of memory, they are listed as followAccess Time Time interpreted by memory to read or write data. It is measured in milliseconds (ms) or in nanoseconds (ns).Memory size It is amount of memory. Measured in KB, MB, GB or TB.Cost per byte It is cost required to access per byte.Transfer bandwidth It is speed of the memory. It measured in MHz, GHz.Unit of transfer Data transfer rate. Measured in Kbps, Mbps or Gbps.Increasing speed and cost per bit dcreeasing sisizeRegisters in CPULevel one amassLevel two collectMain memoryVirtual MemoryIncreasing Size, decreasing speed and costcapacity flashary Storage devicesFigure 3.2 Memory HierarchyMemory hierarchy includes CPU registers on the top. Register provides fastest data access and it is one of the most expensive memory location.Second and third levels are level-1 and level-2 collect respectively. The level one pile up is small in size (4 KB to 32 KB) though much larger than register. It is fixed on CPU chip so user exclusivelytocks not expand.The level-2 cache is present on some CPUs only. It is much larger than level-1 cache. User pot not expand it as it is fixed on CPU chip but it is cheaper than level-1 cache.Virtual memory is part of disk drive, which simulates to Random Access Memory (RAM). Disk drives are less expensive so cost per bit is signifi commodetly less. Secondary storage devices are such as Hard Disk Drive (HDD), Floppy Disk Drive (FDD), Compact Disk Read Only Memory (CDROM), digital Versatile Disk (DVD) and tape drives. It is bit slower.3.4 Memory typesBasic purpose of memory is to store content. legato memory is available in different types. Basic type of memory is primary memory and secondary memory. Types are made bas ed on memory characteristics and its role in the computer system. Primary memory is the first memory used by CPU, so it should be faster and substantially accessible. To make primary memory as per the requirement, memory organisation includes RAM and ROM as primary memory. The main use of secondary memory is use to store users data permanently. Speed of secondary memory can be compromised, but storage capacity should be excellent. So memory organisation includes HDD, FDD, and CDROM and so on as a secondary memory. Figure 3.2 shows types of memory.3.4.1 Primary MemoryPrimary memory is access directly by CPU. Primary divided in to two types RAM and ROM. Primary memory should be faster and easily accessible.RAM RAM is a primary memory used in the computer. RAM is the main memory of the computer system. It is volatile since its content is accessible only as long as the computer is ON. The content of RAM is cleared as soon as computer is powered OFF. It is at third house in the memory hierarchy. Operating system, exercise program and running data are loaded in the RAM. CPU directly accesses the RAM.Types of RAM are as followsStatic Random Access Memory (SRAM) SRAM is made with several transistors, usually four to six, for each memory cell. It does not require refresh time as capacitors are not used. It is much faster and costlier than fluidram. Computer system use SRAM as cache memory.DRAM (Dynamic Random Access Memory) It has memory cells with a paired transistor it uses capacitor, as capacitors slowly leaks with as they stared discharging, so need periodic refresh. It is slower and chippers than SRAM. It is much denser (stores many bits per chip). It requires less power and generates less heat as compared to the SRAM. DRAM is available in several forms such as SDRAM, then DDRAM to RDRAM.Read Only Memory (ROM) ROM is non-volatile primary memory. Data written on ROM can not delete or overwrite. Data is burned on the ROM as firmware. ROM memory is used in th e computer system to write firmware for example BIOS program.Types of ROM are as followsProgrammable read-only memory (PROM) This type of memory is one time written memory. Once program is written can not be change.erasable programmable read-only memory (EPROM) Data written on EPROM can be exhaustd. Ultraviolet is used to erase the data written on PROM.Electrically erasable programmable read-only memory (EEPROM) It is same as EPROM but to erase data entirely it requires electrical signal. So not require to remove from computer. Data can be erased or over written it the computer itself.3.4.2 Secondary MemoryA secondary memory is non-volatile. Secondary memory used to save users data permanently. Devices used as secondary memory are HDD, FDD, CD, DVD, Tape drives and so on. Secondary memory is at sixth place in the memory hierarchy.Devices used as secondary memory are listed as followsFloppy Disk Drives (FDD) Used as magnetized, takeout memory device. It stores maximum 1.44 MB data. Earlier it used to transfer data among computer systems.Hard Disk Drives (HDD) HDD is fixed, magnetic memory device. It is vital in the computer system because Operating System and users data is protected on the HDD. Storage capacity of HDD is vendor specific.CDROM and DVDROM Are optical memory units used for transferring data and programs among the computers. CDs are available in the size 650MB, DVDs are available up to 4 GB in a size.Tape drives Are usually used for data backup purpose.3.6 compile MemoryThe cache is small amount of memory with high speed. Cache memory keeps data and code (introductions) that are used by CPU often. Use of cache memory reduced the waiting time of CPU that makes CPU to a greater extent effective. SRAM is used to create cache memory. SRAM does not required refresh as it does not use capacitors as DRAM, it is 10 times faster than DRAM. Cache is of two types Level-1 that is placed ion the CPU. Level 2 cache is facultative some processors hav e this type of memory that is some time placed inside the CPU or placed near by CPU. To execute next instruction, CPU first check cache memory for the same instruction if that instruction is not available then it goes further.Note DRAM is made up of capacitors which need constant refreshing to preserve data. SRAM uses flip-flop circuit that does not require refresh.3.6.1 Cache line relief AlgorithmsWhile a new line is loaded in the cache, one of the existing lines must(prenominal) be replaced. Direct mapped cache, same block from line is removed take place for new one. In associative cache, it can search for another place.Four of the most common line replacement algorithms are as followsLRU (Lease Recently Used) the cache line that was last referenced in the most distance quondam(prenominal) is replaced.FIFO (First In First Out) the cache line from the set that was loaded in the most nonadjacent past is replaced.LFU ( Least Frequently Used) the cache line that has been refer enced the times is replaced.Random a randomly selected line from cache is replaced.Note The most commonly used algorithm is LRU.Cache TerminologyCache use few terminology for operation are as followsHit A cache access finds data the cache memoryMiss A cache access does not find data or instruction, forcing access to next memory down in memory hierarchy.Miss ratio portion of misses to data compared to all accesses.Hit access time Number of clocks to return a cache hitMiss penalty Number of clocks to process a cache miss.Virtual MemoryOperating system enables a process through which space of hard disk drive can be simulate to RAM. The HDD space used as RAM is known a Virtual Memory.As cost per byte of HDD is less, so virtual memory is beneficial to run many large programs that need more memory. Access time of RAM is in nanoseconds but virtual memory gives access time in milliseconds. It is much slower than RAM. Figure 5.1 shows operation of virtual memory.Virtual memory uses p aging and segmentation terminologies. price used by paging are as followsVirtual address- Address used by application program from virtual memory. It is composed of page number and page offset.Physical address Address of physical memory.Page virtual space divided into fixed-size pages.Frame Physical memory divided into fixed frames size.MMU Memory Management Unit (MMU) used to map virtual address to physical address.Page table severally process has its own page table. Each page table entry contains the frame number of the correspond page in main memoryFigure 3.4 Virtual memory operations3.8 Chapter Review QuestionsWhich of the followers is primary volatile memory?(A)RAM(C)ROM(B)HDD(D)FDDautonomic nervous system AWhich among the following are magnetic storage devices?(A)HDD(C)FDD(B)CDROM(D)DVDROMautonomic nervous system A and CMaximum storage capacity FDD is -(A)2GB(C)2.44 MB(B)1.44MB(D)None of theseAns BA ____ is used as cache memory in the computer system.(A)SRAM(C)DRAM(B) SDRAM(D)ROMAns AWhich of the following is primary non-volatile memory?(A)Cache(C)ROM(B)Virtual(D)None of theseAns CWhich of the following ROMs content can be deleted using ultraviolet?(A)PROM(C)EPROM(B)ROM(D)EEPROMAns CVirtual memory is concept of (A) exploitation HDD space as RAM(C)Using FDD space as a RAM(B)Logical based(D)Protocol basedAns A8. In the memory hierarchy which memory is at first level?(A)Register(C)L1 cache(B)L2 cache(D)None of theseAns A9. Which memory takes second place in the memory hierarchy?(A)L1 cache(C)L2 cache(B)ROM(D)HDDAns B10. MMU stands for (A)Memory Mixture unit(C)Memory Management Unit(B)Memory measurement Unit(D)None of theseAns C3.8.1 Answers1. A2. A and C3. B4. A5. C6. C7. A8. A9. B10. CSummaryIn the chapter, Memory Organisation, you learnt aboutDifferent memory units and its types.Memory hierarchy based on memory characteristics.Cache and its replacement algorithm.Virtual memory and paging.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.