Virtual Memory Computer Organization and Architecture by Ravinder Nath Rajotiya - January 12, 20230 Virtual Memory Programs developed by the software engineers are stored in the auxiliary storage, however, when executed a copy or part of the program get transferred to main memory. The CPU always refers to the main memory to access instructions or the data. If the referenced item is not found then it is transferred from auxiliary storage to the main memory. Virtual memory is a concept that permits programmers to to construct programs as though a very large memory space were available. It provides a mechanism for translating program-generated address into the physical or main memory locations. Address Space Vs Memory Space: Address used by the programmers is called virtual address and the set of such addressed is called the address space. The addresses
Cache Memory Computer Organization and Architecture by Ravinder Nath Rajotiya - January 11, 20230 Cache Memory Cache memory is the fastest component in the memory hierarchy and approaches the speed of the CPU. A cache is organized between the CPU and the main memory to speed up the operation of a computer system. Some of the examples of the type of data or programs stored in cache may include: Table look up Code of functions Code of loops Array of data Advantage of using Cache: As the access time of cache memory is less than the access time of the main memory by a factor of 5 to 10, thus reducing the total memory access time. Locality of Reference: Cache is used to store the most frequently used instructions or data. Execution of a main program is in sequential order
Associative Memory Computer Organization and Architecture by Ravinder Nath Rajotiya - January 6, 2023January 7, 20230 Associative Memory Unlike the main memory which is accessed using the contents address and in sequential method, the associative memory is accessed by contents and is also called as the content addressable memory. For writing a word in memory, unused space is found by memory and the word written their. Word is read from memory by matching the word or its part with the contents/word stored in memory. Difference between main memory and associative or content addressable memory Main Memory Associative or Content addressable memory Memory accessed by using address of contents/words Memory is accessed by matching contents with word stored in memory To store a word, we assign the address and write the word at that address To write a word, memory finds the empty space and
Memory Organization Computer Organization and Architecture by Ravinder Nath Rajotiya - January 4, 20230 Memory Organization Every computer system has following types of memory devices. The different types of memory can be explained as the memory hierarchy. Memory Hierarchy: The total capacity of the memory in a system can be visualized as a hierarchy of memory devices. It includes all memory devices employed in a computer from large size but very slow-speed to small size but very-high speed devices. The memory hierarchy can be represented as shown in figure below. IOP is used to communication between main memory and the auxiliary memory. Cache is used to communicate between CPU and the main memory. Internal or the primary memory: The internal memory consists of random access memory (RAM), read only memory (ROM) and some high-speed memory such as cache memory.
Modes of IO Transfer Computer Organization and Architecture by Ravinder Nath Rajotiya - January 4, 20230 Modes of Transfer: The data transfer between the CPU and the i/o device is through the memory. Data transfer between the CPU and I/O may be handled in a variety of modes. These are: Programmed I/O Interrupt I/O Direct Memory Access(DMA) Programmed I/O Mode : This mode uses the CPU as an intermediate path for the data transfer. Each data item is initiated by an instruction. Data transfer under this mode requires constant monitoring of the peripheral by checking the status flag which indicate whether the device is ready to receive or send the data. In this method the CPU stays in a program loop until the i/o unit is ready for data transfer. This method is quite slow. Interrupt I/O In this method instead