Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!seismo!sundc!hqda-ai!merlin From: merlin@hqda-ai.UUCP Newsgroups: comp.os.minix Subject: Re: Memory handling in MINIX ? Message-ID: <254@hqda-ai.UUCP> Date: Sat, 24-Jan-87 18:02:17 EST Article-I.D.: hqda-ai.254 Posted: Sat Jan 24 18:02:17 1987 Date-Received: Sun, 25-Jan-87 05:47:50 EST References: <5490004@nucsrl.UUCP> Organization: Army AI Center, Pentagon Lines: 34 Summary: /dev/mem and /dev/kmem exist, but no memory protection. In article <5490004@nucsrl.UUCP>, naim@nucsrl.UUCP (Naim Abdullah) writes: > Does anybody know whether /dev/mem and/or /dev/kmem exist in MINIX ? Yes, they exist. /dev/mem reads physical memory starting at address 0, where the interrupt vectors are located. /dev/kmem reads physical memory, also. However, to simulate "kernel virtual space", /dev/kmem begins reading at address 0x600 (1536 decimal). That's where MINIX loads. Other than the 1536-byte offset, the two are identical. > The consensus seemed to be > that multi tasking was hard because there is no memory protection > hardware. A process could presumably overwrite the kernel. How did > Andy solve this problem ? He didn't, really. A process is allocated as much text space as it needs, and (normally) 64k for data and stack space. [Well-behaved programs can be allocated less.] There is a "gentlemen's agreement" that no one writes anywhere but in their data segment, which is referenced by the DS or SS segment registers. The C compiler abides by this. However, someone writing in assembler *could* overwrite anything they chose. > Is a MMU a standard part of a pc ? No. One of the major failings of the PC architecture. On the AT (80286), there is some help here, but not much. The Compaq Deskpro 386 (80386) does have the requisite hardware as part of the '386 processor chip. -- David S. Hayes, The Merlin of Avalon PhoneNet: (202) 694-6900 ARPA: merlin%hqda-ai.uucp@brl-smoke UUCP: ...!seismo!sundc!hqda-ai!merlin