Article View: borland.public.cppbuilder.nativeapi
Article #10307Re: Thread vs Process
From: Alan Bellingham
Date: Fri, 23 Apr 2004 15:12
Date: Fri, 23 Apr 2004 15:12
34 lines
2105 bytes
2105 bytes
"Tabir" <BCB@BCB> wrote: >Could somebody explain the difference between the "Thread" and "Process" ? Here's a description. I hope others will supply theirs, and that between them you get a better understanding. Both are units of execution. You may have multiple processes running on your computer. Within a process, you may have one or more threads running. Two processes will each have their own memory space. One process may write to memory, but the other process is totally unable to see it (excluding wonderful things like shared memory). Tow threads in the same process, however, can see the same memory. So one can write, and the other can read what the first one has written. When the CPU switches between processes, it has to map out the entire address space for one process, and map in a new address space for the second. When the CPU switches between threads in the same process, though, it only has to change a few registers. It's much quicker. >Can we use the same terminology in Windows and Linux ? Pretty much. The implementation and underlying APIs will probably be different. Alan Bellingham -- ACCU Conference 2004 - http://https://www.accu.org/conference/
Technical Details
Message-ID:
<p5ci80hm6ldbi0ul5eplelpnq9vv6tnqsn@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<40892eb2@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,731fded427e94822 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-04-23 08:29:56 PST From: Alan Bellingham <alanb@episys.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Thread vs Process Date: Fri, 23 Apr 2004 16:12:16 +0100 Reply-To: alanb@episys.com Message-ID: <p5ci80hm6ldbi0ul5eplelpnq9vv6tnqsn@4ax.com> References: <40892eb2@newsgroups.borland.com> X-Newsreader: Forte Agent 2.0/32.646 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 193.129.251.130 X-Trace: newsgroups.borland.com 1082733135 193.129.251.130 (23 Apr 2004 08:12:15 -0700) Lines: 34 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail