انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة
الكلية كلية تكنولوجيا المعلومات
القسم قسم البرامجيات
المرحلة 4
أستاذ المادة سرى زكي ناجي علوان
02/05/2015 13:33:45
virtual memory Now we come to the breakthrough.If the preceding two characteristics are present,then it is not necessary that all of the pages or all of the segments of a process be in main memory during execution.If the piece (segment or page) that holds the next instruction to be fetched and the piece that holds the next data location to be accessed are in main memory,then at least for a time execution may proceed. Let us consider how this may be accomplished.For now,we can talk in general terms,and we will use the term pieceto refer to either page or segment,depending on Table 8.1 Virtual Memory Terminology Virtual memory A storage allocation scheme in which secondary memory can be addressed as though it were part of main memory.The addresses a program may use to reference memory are distinguished from the addresses the memory system uses to identify physical storage sites,and program-generated addresses are translated automatically to the corresponding machine addresses.The size of virtual storage is limited by the addressing scheme of the computer system and by the amount of secondary memory available and not by the actual number of main storage locations. Virtual address The address assigned to a location in virtual memory to allow that location to be accessed as though it were part of main memory. Virtual address space The virtual storage assigned to a process. Address space The range of memory addresses available to a process. Real address The address of a storage location in main memory.
whether paging or segmentation is employed.Suppose that it is time to bring a new process into memory.The operating system begins by bringing in only one or a few pieces,to include the initial program piece and the initial data piece to which those instructions refer.The portion of a process that is actually in main memory at any time is defined to be the resident set of the process.As the process executes,things proceed smoothly as long as all memory references are to locations that are in the resident set.Using the segment or page table,the processor always is able to determine whether this is so. If the processor encounters a logical address that is not in main memory,it generates an interrupt indicating a memory access fault.The operating system puts the interrupted process in a blocking state and takes control.For the execution of this process to proceed later, the operating system will need to bring into main memory the piece of the process that contains the logical address that caused the access fault.For this purpose,the operating system issues a disk I/O read request.After the I/O request has been issued,the operating system can dispatch another process to run while the disk I/O is performed.Once the desired piece has been brought into main memory,an I/O interrupt is issued,giving control back to the operating system,which places the affected process back into a Ready state. It may immediately occur to you to question the efficiency of this maneuver,in which a process may be executing and have to be interrupted for no other reason than that you have failed to load in all of the needed pieces of the process.For now, let us defer consideration of this question with the assurance that efficiency is possible.Instead,let us ponder the implications of our new strategy.There are two implications,the second more startling than the first,and both lead to improved system utilization: 1. More processes may be maintained in main memory. Because we are only going to load some of the pieces of any particular process, there is room for more processes. This leads to more efficient utilization of the processor because it is more likely that at least one of the more numerous processes will be in a Ready state at any particular time. 2. A process may be larger than all of main memory. One of the most fundamental restrictions in programming is lifted.Without the scheme we have been discussing, a programmer must be acutely aware of how much memory is available.If the program being written is too large,the programmer must devise ways to structure the program into pieces that can be loaded separately in some sort of overlay strategy. With virtual memory based on paging or segmentation,that job is left to the operating system and the hardware.As far as the programmer is concerned, he or she is dealing with a huge memory, the size associated with disk storage. The operating system automatically loads pieces of a process into main memory as required. Because a process executes only in main memory,that memory is referred to as real memory. But a programmer or user perceives a potentially much larger memory—that which is allocated on disk.This latter is referred to as virtual memory.Virtual memory allows for very effective multiprogramming and relieves the user of the unnecessarily tight constraints of main memory.Table 8.2 summarizes characteristics of paging and segmentation, with and without the use of virtual memory.
المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
|