Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site xios.UUCP Path: utzoo!dciem!nrcaer!xios!greg From: greg@xios.UUCP (Greg Franks) Newsgroups: comp.sys.atari.st Subject: Re: Forwarded message Message-ID: <390@xios.UUCP> Date: Thu, 15-Jan-87 09:46:57 EST Article-I.D.: xios.390 Posted: Thu Jan 15 09:46:57 1987 Date-Received: Sat, 17-Jan-87 13:38:53 EST References: <8701022135.AA07189@ucbvax.Berkeley.EDU> <7472@utzoo.UUCP> <7510@utzoo.UUCP> Reply-To: greg@xios.UUCP (Greg Franks) Followup-To: comp.sys.ibm.pc Organization: Xios Systems Corp., Ottawa, Ont. Lines: 60 Summary: In article <7510@utzoo.UUCP> henry@utzoo.UUCP (Henry Spencer) writes: >> ...implementing fork(). The two approaches that have been discussed are >> using a compiler which generates relocatable code, and swapping a program >> into and out of a fixed area of memory. ... >absolute address. Absolute addresses also show up in things like return >addresses on the stack. Fixing this is a lot of work and costs a lot in >speed. Better to copy chunks of memory around; that will not be too bad >*IF* the programs stay small. (Most of the MINIX utilities are small.) Worse than return addresses, are other addresses, like pointers to data. Return addresses would be easy to fix (backtrack up the stack and add offset to return PC or something; but pointers to data (pass by address) would be impossible to find. However, this discussion is mute: :From nrcaer!dciem!utzoo!mnetor!seismo!mcvax!botter!ast Tue Jan 13 12:40:15 EST 1987 (Andrew Tanenbaum) :As to the port to the Atari/Amiga/etc as far as I see, there are no technical :problems with the MMU. The trouble is as follows. When you fork, the :child has to go somewhere else in memory than where the parent was. :Unfortunately, the child's stack contains absolute addresses, such as :the return from the fork routine. If the child runs somewhere other :than where the parent was, it will crash. :There are a couple of solutions, the simplest of which is this. When the :child is created, record in the process table where the parent was. :When it is time to run the child, just swap the parent and the child, :and actually run the child where it belongs. When the parent wants to :run, swap them again. Although this sounds horrendous, it is not at all :so bad. Swapping two 10K programs in memory might take 30 millisec. :MINIX programs are small. :The only big ones are the compiler passes, cpp, cem, opt, cg, and asld. *** One other interesting note.... :I would like to see a MINIX version for the Atari/Amiga/etc. The 68000 is :clearly much better than the 8088, but the PC has a lot of software going for :it. ... A colleague of mine at Philips has :already started to port MINIX to the Atari. He is an absolutely top rate :programmer, but he is VERY busy, so he doesn't have much time. ... :What I would like to find is someone who: :(1) knows the Atari (Amiga, Macintosh, etc) hardware well :(2) knows UNIX well on the outside and moderately on the inside :(3) has a substantial amount of free time :(4) has access to an IBM PC for testing things etc. (not essential, but helps) Item 3 - Who has time? Aren't we all busy reading news all day? :-) :-) :-) This stuff is in comp.sys.ibm.pc. I suggest that all you who are interested in this topic resubscribe, and based on what I have seen, there does appear to be a lot of interest. Use some creativity in the kill file; search for MINIX - all postings are marked as such. I have directed followups to that news group. -- Greg Franks (613) 725-5411 "Vermont ain't flat" {net-land}!utzoo!dciem!nrcaer!xios!greg (Other paths will undoubtably work too - your mileage will vary)