8.3. Memory Sharing and ProtectionMultiple users' processes can share memory within the VM system. In a multiuser environment, multiple processes can be running the same process executable binaries; in older UNIX implementations, each process had its own copy of the binarya vast waste of memory resources. The Solaris virtual memory system optimizes memory use by sharing program binaries and application data among processes, so memory is not wasted when multiple instances of a process are executed. The Solaris kernel extended this concept further when it introduced dynamically linked libraries in SunOS, allowing C libraries to be shared among processes. To properly support multiple users, the VM system implements memory protection. For example, a user's process must not be able to access the memory of another process; otherwise, security could be compromised or a program fault in one program could cause another program (or the entire operating system) to fail. Hardware facilities in the memory management unit perform the memory protection function by preventing a process from accessing memory outside its legal address space (except for memory that is explicitly shared among processes). |