[comp.sys.amiga] Fork--impossible, and here's why

michael@stb.UUCP (Michael) (05/14/88)

All this talk about fork being doable on the amiga misses one major point:
AmigaDos.

Fork() has one side effect that most people miss--ALL things are duplicated.
In particular, both people have file handles to the same files, but
AmigaDos will not let you get multiple writers to the same file no matter
what you do (a BIG limit, in my opinion).

Worse, in unix, a fork gives you dup'd file descriptors--i.e., if either
process does a read, both have their next read address incremented.

Assuming you chuck all of chaos (commodore's home-made amiga operating system),
and turn it into a vanilla unix box with graphics, then yes, you can get
minix or any other unix clone to work. But you may have a smaller market
than you think--I suspect that very few current owners would actually go for
it. (On the other hand, new people would probably prefer it).

Unless a unix runs under amigados, I don't want it. Even then I may not.

(Consider the benefits: unix wants hard drives constently mounted.
AmigaDos is happy to pop floppies in and out, FFS requires diskchange each
time. But it will work even if a different set of floppies is in.
AmigaDos will give you a chance to recover from disk full, unix programs
just ignore it. Chaos is fast, resonably responsive, and lets you do games
while multitasking--even a sun 3, with just one user, and nothing significant
else running can't do a reasonable QIX or pacman (at least, the version I
saw were ughh.))
			Michael
p.s. If you did fix the file problem, how are you going to find all the memory
that process A has allocated via AllocMem()? How are you going to find all the
IPC ports (which aren't on the public port list)? How are you going to find
all the private message ports?
: --- 
: Michael Gersten          uunet.uu.net!ucla-an.ANES\ 
:				 ihnp4!hermix!ucla-an!denwa!stb!michael
:				sdcsvax!crash!gryphon!denwa!stb!michael
: "Machine Takeover? Just say no."
: "Sockets? Just say no."     <-- gasoline

dillon@CORY.BERKELEY.EDU (Matt Dillon) (05/16/88)

>Fork() has one side effect that most people miss--ALL things are duplicated.
>In particular, both people have file handles to the same files, but
>AmigaDos will not let you get multiple writers to the same file no matter
>what you do (a BIG limit, in my opinion).
>
>Worse, in unix, a fork gives you dup'd file descriptors--i.e., if either
>process does a read, both have their next read address incremented.

	Actually, it does.  When you Open() a file 1005, it obtains a 
shared lock and you can still write to the file...  But, as you said,
doesn't give the duplicity or even have a Dup() call.  AmigaDos really
does need a Dup() call!

				-Matt