Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!yale!cs.yale.edu!cs.yale.edu!bitting-douglas From: bitting-douglas@cs.yale.edu (Douglas Bitting) Newsgroups: comp.sys.mac.system Subject: Virtual Memory Summary: How? Why? Message-ID: <1991May30.060108.5637@cs.yale.edu> Date: 30 May 91 06:01:08 GMT Sender: news@cs.yale.edu (Usenet News) Distribution: usa Organization: Yale University Computer Science Dept., New Haven, CT 06520-2158 Lines: 26 Originator: bitting@suned.CS.Yale.Edu Nntp-Posting-Host: zoo-gw.cs.yale.edu Virtual Memory, like many other things in an OS, can be implemented in many ways. It all boils down to the design decision made by the OS programmers. Basically, the trade off in implementing VM as Apple has is speed over disk space. When the entire Virtual Memory space is mapped to a disk, the operating system is assured that any page in memory that is clean (ie, unchanged since read in from the disk) is on the disk somewhere. This means that when said page is to be swapped out, it does not have to be written to the disk first. This results in an *immense* speedup. How immense? RAM accesses are on the order of nanoseconds... disk accesses on the order of milliseconds (a factor of 10^6 difference, I believe ... someone correct me if that is wrong). So, if you can eliminate 1 disk access per page swap, you are saving (assume disk access time to be 15ms and RAM access time to be 80ns) 14.999992 ms ... this is a difference you will notice in memory accesses. Anyway, this is just one design consideration to be made when it comes to Virtual Memory. For further reference, I would recommend _Operating Systems_ by Silbershatz and some others (I don't remember, I left my book at school). It is a text book, but it is a very informative and well written one. --Doug -- Doug Bitting | "And we know that in all things God works PO Box 3043 Yale Station | for the good of those who love him..." New Haven, CT 06520 | --Romans 8:28 bitting@cs.yale.edu +------------------------------------------