Example: ( Here index is a pointer to an address ) loop: load .... + Operating
system needed to check if routine is in processes' memory address. .... LONG
TERM.
A prototype shared virtual memory on an Apollo ring based on these algorithms
... The benefits of a virtual memory go without saying; almost every high perfor-.
recovery-oriented/autonomic-computing/self-repair, e.g., [13, 20, 25]. ... operating system memory regions are copied into a special area for fast recovery.
tory enables even distance learning students at remote loca- tions to participate in kernel ... Operating systems, computer science education, virtualiza- tion, virtual ... However, devel- oping and administering programming projects that teach.
Invocaâ. tion. Pager. File. system. Appliâ. cation. Appliâ. cation. Microâkernel .... Check-. point and Restore were implemented in SPARC assembler. .... disk driver thus does not implement asynchronous write behavior. ... dependent classes i
Chapter 9. Virtual Memory. Processes in a system share the CPU and main
memory with other processes. However, sharing the main memory poses some ...
Operating System Concepts. Chapter 9: Virtual Memory. ▫ Background. ▫
Demand Paging. ▫ Process Creation. ▫ Page Replacement. ▫ Allocation of
Frames.
Virtual memory achieves a complete separation of logical and physical address-
... Virtual memory is divided into chunks called pages; size of a page is equal to ...
... Online 2: Virtual Memory (Operating System Source Code Secrets) Book, pdf 2: Virtual Memory (Operating System Source
PDF Download 2: Virtual Memory (Operating. System Source Code Secrets) Full Books. Books detail. Title : PDF Download 2:
Virtual Memory. - The games we play with addresses and the memory behind
them. Address translation. - decouple the names of memory locations and their ...
Learning to Play Well With Others. Stack. Heap. Virtual Memory. 0x00000.
0x10000 (64KB). Physical Memory. 0x00000. 0x10000 (64KB). Stack. Heap.
100 (10 ms). - demand ... 10-bit. L2 index. Adapted from Arvind and Krste's MIT
Course 6.823 Fall 05 ... e.g., 264 / 212 x ~ 8 bytes per PTE = 255 → impractical ...
Process pages can be shared , eliminating the need to .... free pages is lower than required pages. ... 2) Delete: To delete the evict page from main memory.
... University of Auckland. Private Bag 92019, Auckland 1142, New Zealand ... The Single-chip Cloud Computer (SCC) experimental pro- cessor [1] is a concept ...
An asynchronous mechanism based on an event buffer with FIFO queue ...... "Métodos para la Evaluación de Sistemas Multiprocesadores y su Aplicación a la. Programación de Sistemas en Tiempo Real Mediante Prototipos Rapidos".
Jan 21, 2009 ... Basic concepts of computer architecture ... “Distributed Systems: Concepts and
Design (4th ... edition)” by George Coulouris, Jean Dollimore,.
1. Sequence 4. CS240. 1. Modern Operating Systems. • Microkernel architecture.
– Assigns only a few essential functions to the kernel. • Address spaces.
in order to overcome this problem we chose to use JAVA. Keywords .... [7] Java
The Complete Reference, 7th Edition, Herbert Schildt, ISBN: 978-0-07-163177-8.
explain the structure and functions of an operating system,. – illustrate key ...
Operating Systems — Books iii ... monitor reads job and transfer control. – at end
..... When process terminates its memory returns onto the free list, coalescing
ho
the OS). – microkernel-based: non-basic functions float as servers (there is a
small kernel for the basic functionality). Distributed Systems. A distributed system
is:.
An operating system is a type of system software that manages and controls the resources and computing capability of a computer or a computer network, and ...
explain the structure and functions of an operating system,. – illustrate key ...
Inside Windows 2000 (3rd Ed) or Windows Internals (4th Ed). Solomon D and ...
9: Virtual Memory. 2. VIRTUAL MEMORY. WHY VIRTUAL MEMORY? • We've
previously required the entire logical space of the process to be in memory.
OPERATING SYSTEMS VIRTUAL MEMORY
Jerry Breecher
9: Virtual Memory
1
VIRTUAL MEMORY WHY VIRTUAL MEMORY? • We've previously required the entire logical space of the process to be in memory before the process could run. We will now look at alternatives to this. • Most code/data isn't needed at any instant, or even within a finite time - we can bring it in only as needed. VIRTUES • Gives a higher level of multiprogramming • The program size isn't constrained (thus the term 'virtual memory'). Virtual memory allows very large logical address spaces. • Swap sizes smaller.
9: Virtual Memory
2
VIRTUAL MEMORY
Definitions
Virtual memory The conceptual separation of user logical memory from physical memory. Thus we can have large virtual memory on a small physical memory.
9: Virtual Memory
3
VIRTUAL MEMORY
Definitions
Demand paging When a page is touched, bring it from secondary to main memory. Overlays
Laying of code data on the same logical addresses - this is the reuse of logical memory. Useful when the program is in phases or when logical address space is small.
Dynamic loading
A routine is loaded only when it's called.
9: Virtual Memory
4
VIRTUAL MEMORY
Demand Paging
When a page is referenced, either as code execution or data access, and that page isn’t in memory, then get the page from disk and re-execute the statement. Here’s migration between memory and disk.
9: Virtual Memory
5
VIRTUAL MEMORY One instruction may require several pages. For example, a block move of data.
Demand Paging Frame #
valid-invalid bit
1 1 1 1 0
May page fault part way through an operation may have to undo what was done. Example: an instruction crosses a page boundary.
page table
Time to service page faults demands that they happen only infrequently. Note here that the page table requires a "resident" bit showing that page is/isn't in memory. (Book uses "valid" bit to indicate residency. An "invalid" page is that way because a legal page isn't resident or because the address is illegal. It makes more sense to have two bits - one indicating that the page is legal (valid) and a second to show that the page is in memory. 9: Virtual Memory
0 Frame #
Resid ent
1 0
validinvalid bit
1 0
6
VIRTUAL MEMORY
Demand Paging
STEPS IN HANDLING A PAGE FAULT 1.
The process has touched a page not currently in memory.
2.
Check an internal table for the target process to determine if the reference was valid (do this in hardware.)
3.
If page valid, but page not resident, try to get it from secondary storage.
4.
Find a free frame; a page of physical memory not currently in use. (May need to free up a page.)
5.
Schedule a disk operation to read the desired page into the newly allocated frame.
6.
When memory is filled, modify the page table to show the page is now resident.
7.
Restart the instruction that failed
Do these steps using the figure you can see on the next page. 9: Virtual Memory
7
VIRTUAL MEMORY
9: Virtual Memory
Demand Paging
8
VIRTUAL MEMORY
Demand Paging
REQUIREMENTS FOR DEMAND PAGING (HARDWARE AND SOFTWARE ) INCLUDE: Page table mechanism Secondary storage (disk or network mechanism.) Software support for fault handlers and page tables. Architectural rules concerning restarting of instructions. (For instance, block moves across faulted pages.)
9: Virtual Memory
9
VIRTUAL MEMORY
Demand Paging
PERFORMANCE OF DEMAND PAGING We are interested in the effective access time: a combination of "normal" and "paged" accesses. It’s important to keep fraction of faults to a minimum. If fault ratio is "p", then effective_access_time =
( 1 - p ) * memory_access_time + p * page_fault_time.
Calculate the time to do a fault as shown in the text: fault time normal access
Some of the pages belonging to this process are in memory, and some are on the disk. A bit in the page table tells where to find the page.
9: Virtual Memory
11
VIRTUAL MEMORY
Page Replacement
When we over-allocate memory, we need to push out something already in memory. Over-allocation may occur when programs need to fault in more pages than there are physical frames to handle. Approach: If no physical frame is free, find one not currently being touched and free it. Steps to follow are: 1. Find requested page on disk. 2. Find a free frame. a. If there's a free frame, use it b. Otherwise, select a victim page. c. Write the victim page to disk. 3. Read the new page into freed frame. Change page and frame tables. 4. Restart user process. Hardware requirements "dirty" or modified bit.
include 9: Virtual Memory
12
VIRTUAL MEMORY
Page Replacement
PAGE REPLACEMENT ALGORITHMS: When memory is overallocated, we can either swap out some process, or overwrite some pages. Which pages should we replace??