Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!caen!uflorida!gatech!udel!ee.udel.edu From: new@ee.udel.edu (Darren New) Newsgroups: comp.sys.amiga.misc Subject: Re: True Multitasking Message-ID: <43004@nigel.ee.udel.edu> Date: 28 Jan 91 21:38:25 GMT References: <672@tnc.UUCP> <42598@nigel.ee.udel.edu> <678@tnc.UUCP> Sender: usenet@ee.udel.edu Organization: University of Delaware Lines: 69 Nntp-Posting-Host: estelle.ee.udel.edu In article <678@tnc.UUCP> m0154@tnc.UUCP (GUY GARNETT) writes: >In article <42598@nigel.ee.udel.edu> new@ee.udel.edu (Darren New) writes: >>In article <672@tnc.UUCP> m0154@tnc.UUCP (GUY GARNETT) writes: >>>As I understand it, the Amiga does not have "threads" or "lightweight >>>processes". >>Not really. AmigaDOS does indeed have lightweight processes, which >>are called "tasks". >Tasks are not lightweight Processes; tasks and processes are the same >to Exec. That's what I said. "Tasks" on the Amiga are what computer scientists call "lightweight processes" or "threads". Since they share the address space, all Amiga "tasks" are all threads of the same process. (Note quotes for Amiga terminology.) >Yes, I am talking about the same image in memory. The well defined >exception I am talking about is when pure code is made resident. How about backup programs spawning compression routines, terminal programs having a sender routine and a receiver routine, multiple programs calling the same library at the same time, etc? I think you recognise much less of the code sharing than is really there. >(can you imagine re-coding wordperfect so that it is pure, >and then making it resident? Yes, it could be done, but it soulds >like a lot of work for little benefit; Lattice (and probably Manx) both can do this with a compiler switch. I usually do it, because it is no extra work. >>It is exactly the same as threads. Tell me what a thread gives you >>that an AmigaDOS task does not? Or vica versa. -- Darren >The distinction made in other operating systems (OS/2 and a few >others) is that multiple threads execute as one task, and the >operating system manages multiple tasks. The task switch on these >operating systems is quite involved and time-consuming; and every task >has a separate address space. Threads within a task share the same >address space (that of the task), and switching between threads within >a task is relatively fast and efficient. Hence, what OS/2 calls a thread, Amiga exec calls a "task". All "tasks" within the Amiga share the same address space, so they are all part of the same process. Thence, the Amiga is full of LWPs, (or "tasks", or threads,) all of which are part of the same process. >but amiga programs are not supposed to reference memory >that they have not received control of (through memory allocation or >message passing). And "threads" in most multiprogramming systems are not supposed to access shared memory they have not received control of. >The Amiga does not have threads, and doesen't need them, >because its multitasking and message passing systems are already >highly efficient. What other operating systems need a special >facility for is simpl[y] one more application of the Amiga's >multitasking operating system. And it has been for years. I think we are in violent agreement here. There was just a confusion of terminology which I believe I have cleared up. -- Darren -- --- Darren New --- Grad Student --- CIS --- Univ. of Delaware --- ----- Network Protocols, Graphics, Programming Languages, Formal Description Techniques (esp. Estelle), Coffee, Amigas ----- =+=+=+ Let GROPE be an N-tuple where ... +=+=+=