Path: utzoo!utgpu!water!watmath!clyde!att!ihnp4!cbmvax!jesup From: jesup@cbmvax.UUCP (Randell Jesup) Newsgroups: comp.sys.amiga Subject: Re: Amiga UNIX Message-ID: <4109@cbmvax.UUCP> Date: 25 Jun 88 20:22:59 GMT References: <23602@hi.unm.edu> <4071@cbmvax.UUCP> <142@ssdis.UUCP> Reply-To: jesup@cbmvax.UUCP (Randell Jesup) Organization: Commodore Technology, West Chester, PA Lines: 23 In article <142@ssdis.UUCP> gsarff@ssdis.UUCP (gary sarff) writes: >Threads are like shared libraries in the sense that they give you an >advantage if you have more than 1 process using them. A shared library >with only one process using it gives you nothing more than if the library >routines were actually in the programs load image. With 2 or more programs Not quite correct: shared libraries are better (in some ways) than linking into the executable for several reasons: 1) late binding; 2) smaller executable. Late binding means you can fix routines without having to re-link/compile the programs, etc. >Same with threads, if you have only 1 thread in >a process, it isn't any "cheaper" than a unix process. It still has a >process or task control block, a stack, a heap, a place to store its >registers when it is context switched etc, just like a heavy process. Only >if the process is really executing multiple threads of itself do you get >any advantage at all. This sounds an awful lot like copy-on-write in software. What happens if one of the threads does an exec()? -- Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup