Path: utzoo!mnetor!uunet!husc6!ukma!david From: david@ms.uky.edu (David Herron -- One of the vertebrae) Newsgroups: comp.sys.amiga Subject: Re: GaaaK! Unix networking called "GOOD"?!? Message-ID: <9205@g.ms.uky.edu> Date: 9 May 88 16:25:36 GMT References: <517@viscous> <10227@stb.UUCP> Reply-To: david@ms.uky.edu (David Herron -- One of the vertebrae) Organization: U of Kentucky, Mathematical Sciences Lines: 88 Keywords: Unix SYSV 4.2 Amiga In article <10227@stb.UUCP> michael@stb.UUCP (Michael) writes: >In article <517@viscous> brianm@sco.COM (Brian Moffet) writes: >that he would like to see unix on amiga's, and mentions all sorts of >"good" things about unix. (Such as consistent devices (YEA!) and >"standard networking" (presumably meaning sockets.) > >My rebuttal: >Unix? Isn't that the thing that limits you to 16 files per process? um, for many many versions of Unix NFILE is 20. My UnixPC has it set to 80 (I didn't know that!) and 4.3BSD has it set to 64 (I think). Maybe you're confusing it with TOPS-10 which did limit you to 16 open files? >In Chaos (Commodore's Home-made Amiga Operating System), there is no >limit to the number of message ports or file handles you can have >open. >In sockets, you are heavily limited to only 16 total. How does the OS keep track of open files internally? In Unix, the problem is that they don't have good facilities for doing dynamic memory allocation of kernal data structures. This causes the table of open files to be a fixed array (as I recall, my memory might be flaky this morning) ... If Unix were able to malloc() as it wanted then it would be able to have as many open files as it wanted, and would also be able to do a lot other things more dynamically. I suppose though that this would have an impact on performance because of the more complicated memory allocator. And if its a feature that's rarely used (at least in the minds of Unix system developors) then they have little justification to do it. >In Chaos, you can have one message port to talk to everyone, simplifying >all your communications > >In Sockets, you have one message port for making connections, and you must >have another port for each person you are currently talking to. (16 max). Actually ... you have one port in the system per application/protocol. You can have many protocols served by one process if you like. In fact, on 4.3BSD there's this guy called "inetd". His job is to keep a socket open for a bunch of the standard protocols and do appropriate things when connections are made to the socket. Some of the protocols it does internally, ping for instance. Some of the protocols it does externally by calling an external process. >In Chaos, you can easily wait for a message on any port, including getting >software interrupts, or even running as the task that sent you the message >(undocumented, but it's there in 1.2) Take a look at select(). You tell it a mask of file id's you want to wait on and when there's i/o available you're woken up and told which ones have i/o available. >In sockets, you can only select(), and then you have to actually poll >to see which one said hi. If you poll in order (1-2-3-4-5-etc), it is >possible for a message to come in on 2 after you've check it. poll? no, you're given a mask back that says which one has i/o. >In Chaos and V7-ATnT, pipes are atomic. > >In sockets, pipes are completely unguaranteed for multiple writers. > > Michael >p.s. "Give me a good multitasking system with decent networking, or give >me death (a model 1 in good working order)". >p.p.s. I have no complaints with sockets as a user interface to a better, >lower level raw interface. I'll use the raw, and programs that I want to >port will use sockets. (This, in fact, is my biggest complaint with sockets-- >datagrams are almost impossible to rip out for non-networked machines, and >streams provide almost no added functionality over named pipes (and if that >extra functionality is used, they too become un-removable)). The whole field of interprocess communications and intermachine communications is still very new and chaotic. At least sockets let you talk to machines far away which meegar DOS stuff only lets you talk to processes inside your own mahcine. -- <---- David Herron -- The E-Mail guy<---- or: {rutgers,uunet,cbosgd}!ukma!david, david@UKMA.BITNET <---- Windowing... The Amiga has windowing. The Mac has windowing (echoes of <---- Jonathan Livingston Seagull: "Just flying? A mosquito can do that much!").