Wednesday, June 5, 2019
Memory Units And Memory Hierarchy
retentivity Units And holding HierarchyMemory nerve is combination of some(prenominal) computer depot devices efficiently. Memory devices are combine and organised based on their characteristic much(prenominal)(prenominal) as admittance epoch, speed, storage capacity, physical size and cost per byte. Memory devices organised in such a way that computer constitution should operate at highest speed, provide bulky storage capacity, itty- slittyer in size and less in a cost. Memory organisation uses primary feather warehousing devices and lower-ranking computer remembrance devices.3.2 Memory UnitMemory whole is storage unit of the computer system. It stores content such as instructions ( codes) and data for temporary or permanent purpose. It is used to stores content and to retrieves the content when needed by CPU or user. Memory unit includes two types of retrospection primary (main) and lowly. Instruction or data given by input devices is first getting stored in the primary shop. Further users saves svelte (executed) data in the secondary retrospect. Primary warehousing is vaporific (temporary). It is faster than secondary holding. It includes RAM and ROM. It is promptly accessible by CPU. Secondary memory is non-volatile (permanent). It includes several secondary storage devices such as Hard dish Drive (HDD), Floppy Disk Drive (FDD), CDROM, and DVD and so on. Figure 3.1 shows memory unit and communication line with other units. billet Volatile memory loses its content when computer loses indicant. In non-volatile memory power loss of computer does non affects content. stimulus UnitProcess UnitOutput UnitPrimary MemorySecondary 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 sequence 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 resplendent performance. Figure 3.2 shows Memory hierarchy. Hierarchy is made on the basis of characteristics of memory, they are listed as follow rise to power Time Time questn 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. follow per byte It is cost lookd 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.increase speed and cost per bit dcreeasing sisize demos in CPU take aim one saveLevel two cacheMain memoryVirtual MemoryIncreasing Size, decreasing speed and costcapacitySecondary 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 cache respectively. The level one cache is small in size (4 KB to 32 KB) though much larger than register. It is fixed on CPU go over so user can not expand.The level-2 cache is present on some CPUs only. It is much larger than level-1 cache. User can 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 significantly less. Secondary storage devices are such as Hard Disk Drive (HDD), Floppy Disk Drive (FDD), Compact Disk understand 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. Still memory is on hand(predicate) in different types. Basic type of memory is primary memory and secondary memory. Types are made based 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 easily 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 ply OFF. It is at third place in the memory hierarchy. Operating system, application program and running data are miserly 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 cartridge holder as capacitors are not used. It is much faster and costlier than DRAM. 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 the 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 erased. 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 magnetic, portable 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 mem ory device. It is vital in the computer system because Operating System and users data is saved on the HDD. Storage capacity of HDD is vendor specific.CDROM and DVDROM argon 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 Cache 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 more effective. SRAM is used to bring to pass 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 optional some processors have this type of memory that is some time placed inside the CPU or placed tightlipped by CPU. To execute next instruction, CPU fir st 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 replacement Algorithms season a new line is loaded in the cache, one of the existing lines must 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 late Used) the cache line that was last referenced in the most distance past is replaced.FIFO (First In First Out) the cache line from the set that was loaded in the most distant past is replaced.LFU ( Least Frequently Used) the cache line that has been referenced 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 follows dash A cache access finds data the cache memoryMiss A cache access does not find data or instruction, forcing access to next memory d make in memory hierarchy.Miss ratio Percent of misses to data compared to all accesses.Hit access time Number of clock to return a cache hitMiss penalty Number of clocks to process a cache miss.Virtual MemoryOperating system enables a process through which dummy of hard disk drive can be simulate to RAM. The HDD space used as RAM is cognise a Virtual Memory.As cost per byte of HDD is less, so practical(prenominal) 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 paging and segmentation terminologies. Terms 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 Each process has its own page table. Each page table entry contains the frame number of the corresponding page in main memoryFigure 3.4 Virtual memory operations3.8 Chapter Review QuestionsWhich of the succeeding(a) 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)DVDROMAns 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 ca n be deleted using ultraviolet?(A)PROM(C)EPROM(B)ROM(D)EEPROMAns CVirtual memory is concept of (A)Using 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 amount 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.