How many total bits are required for a directmapped cache wi

How many total bits are required for a direct-mapped cache with 2048 entries each holding an 8 word (of 32 bits or 4 bytes) block, assuming a 32-bit address? Discuss with the help of a diagram the logic to check a hit or miss (that is, presence or absence) of a required memory block in the cache described in 1(a), and access a specific word of the block in case of a hit. Label all the fields in a cache word. What is virtual memory? What is the fundamental difference between the memory hierarehy of Q.1 (a) and this one? Explain how briefly how it helps multiple users share the limited memory, and still get the illusion of using a dedicated resource?

Solution

2. (a) Virtual Memory: In computing, virtual memory is a memory management technique that is implemented using both hardware and software. It mapsmemory addresses used by a program, called virtual addresses, into physical addresses in computer memory. Main storage as seen by a process or task appears as a contiguous address space or collection of contiguous segments. The operating system manages virtual address spaces and the assignment of real memory to virtual memory. Address translation hardware in the CPU, often referred to as a memory management unit or MMU, automatically translates virtual addresses to physical addresses. Software within the operating system may extend these capabilities to provide a virtual address space that can exceed the capacity of real memory and thus reference more memory than is physically present in the computer. The primary benefits of virtual memory include freeing applications from having to manage a shared memory space, increased security due to memory isolation, and being able to conceptually use more memory than might be physically available, using the technique of paging.

Virtual memory makes application programming easier by hiding fragmentation of physical memory; by delegating to the kernel the burden of managing the memory hierarchy(eliminating the need for the program to handle overlays explicitly); and, when each process is run in its own dedicated address space, by obviating the need to relocate program code or to access memory with relative addressing. Memory virtualization can be considered a generalization of the concept of virtual memory.

Virtual memory is an integral part of a modern computer architecture; implementations require hardware support, typically in the form of a memory management unit built into theCPU. While not necessary, emulators and virtual machines can employ hardware support to increase performance of their virtual memory implementations. Consequently, older operating systems, such as those for the mainframes of the 1960s, and those for personal computers of the early to mid-1980s (e.g. DOS), generally have no virtual memory functionality, though notable exceptions for mainframes of the 1960s include:

and the operating system for the Apple Lisa is an example of a personal computer operating system of the 1980s that features virtual memory. During the 1960s and early 70s, computer memory was very expensive. The introduction of virtual memory provided an ability for software systems with large memory demands to run on computers with less real memory. The savings from this provided a strong incentive to switch to virtual memory for all systems. The additional capability of providing virtual address spaces added another level of security and reliability, thus making virtual memory even more attractive to the market place.

Most modern operating systems that support virtual memory also run each process in its own dedicated address space. Each program thus appears to have sole access to the virtual memory. However, some older operating systems (such as OS/VS1 and OS/VS2 SVS) and even modern ones (such as IBM i) are single address space operating systemsthat run all processes in a single address space composed of virtualized memory. Embedded systems and other special-purpose computer systems that require very fast and/or very consistent response times may opt not to use virtual memory due to decreased determinism; virtual memory systems trigger unpredictable traps that may produce unwanted \"jitter\" during I/O operations. This is because embedded hardware costs are often kept low by implementing all such operations with software (a technique called bit-banging) rather than with dedicated hardware.

Memory Management & Time Sharing: Virtual Memory uses Memory Management & Time Sharing to get the illusion of using a dedicated resource. One of the most-demanded resources in computers (other than the CPU) is system memory. Every process needs it since a process’ code, stack, heap (dynamically-allocated structures), and data (variables) must all reside in memory. A processor reads instructions from memory and reads/writes data from/to memory. The functional interface of memory is:

The memory manager is the part of the operating system that is responsible for allocating this resource to processes. In a time sharing operating system, we we will need to allocate the system\'s memory among multiple processes. Moreover, we may need to deal with situations where we do not have enough physical memory and have to swap chunks of data between memory and secondary storage (disk). Systems in which we move (swap) entire processes between disk and main memory during execution are called swapping systems. Giving the machine to one process and keeping just that one process in memory does not work if we want to run multiple programs concurrently. We really wanted to have the illusion of running multiple processes at once and provide users with interactive response to processes. Swapping an entire process between memory and disk each time we context switch would be prohibitively expensive (disks are insanely slow compared to memory).

In computing, time-sharing is the sharing of a computing resource among many users by means of multiprogramming and multi-tasking at the same time.By allowing a large number of users to interact concurrently with a single computer, time-sharing dramatically lowered the cost of providing computing capability, made it possible for individuals and organizations to use a computer without owning one, and promoted the interactive use of computers and the development of new interactive applications. Time-sharing was developed out of the realization that while any single user would make inefficient use of a computer, a large group of users together would not. This was due to the pattern of interaction: Typically an individual user entered bursts of information followed by long pauses but a group of users working at the same time would mean that the pauses of one user would be filled by the activity of the others. Given an optimal group size, the overall process could be very efficient. Similarly, small slices of time spent waiting for disk, tape, or network input could be granted to other users.

 How many total bits are required for a direct-mapped cache with 2048 entries each holding an 8 word (of 32 bits or 4 bytes) block, assuming a 32-bit address? D
 How many total bits are required for a direct-mapped cache with 2048 entries each holding an 8 word (of 32 bits or 4 bytes) block, assuming a 32-bit address? D

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site