|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
what's the differencehey all,
what's the difference between starting a new thread and starting a new Process? thanks, rodchar Rodchar,
> Amost the same difference as a apple and a pear and the same equality.> what's the difference between starting a new thread and starting a new > Process? > However a thread cannot exist withouth a parent process while a thread is a still a process. Cor You might want to research this further on the net... but basically:
Programs (EXE's) run in one "process space." Windows gives them their own "virtual memory" and resources and they can't cross the border into other processes (programs) running. This is actually a function of the x86 chip and not Windows per se. You can see what processes you have running by going into Task Manager and clicking on the Processes tab. Each process can have a multitude of windows open (for instance each IE window you have open runs (normally) as one process). If one process crashes, it can't take down another process with it. Each process has one "thread of execution" given to it... meaning it can do one thing at a time (execute a particular line of code on one CPU clock cycle). But processes can and usually do spawn other threads. These threads simply mean that a single process can do several things at the same time (multithreading). This is a feature of Windows and other OS which allow multiple programs to do things at the same time by alloting them "CPU Time." ..NET introduces the notion of AppDomains. This is a pure software function not hardware (like Processes). It means .NET can run several "sub processes" (programs) in a single x86 process. These "sub processes" also cannot interefere with each other.... the .NET runtime makes sure of that. This is very memory efficient and it is was makes things like ASP.NET work so well. In Task Manager you might want to click View/Select Columns then click
thread count. It's interesting to see which processes are running how many threads. CMM wrote: Show quoteHide quote > You might want to research this further on the net... but basically: > > Programs (EXE's) run in one "process space." Windows gives them their own > "virtual memory" and resources and they can't cross the border into other > processes (programs) running. This is actually a function of the x86 chip > and not Windows per se. You can see what processes you have running by going > into Task Manager and clicking on the Processes tab. Each process can have a > multitude of windows open (for instance each IE window you have open runs > (normally) as one process). If one process crashes, it can't take down > another process with it. > > Each process has one "thread of execution" given to it... meaning it can do > one thing at a time (execute a particular line of code on one CPU clock > cycle). But processes can and usually do spawn other threads. These threads > simply mean that a single process can do several things at the same time > (multithreading). This is a feature of Windows and other OS which allow > multiple programs to do things at the same time by alloting them "CPU Time." > > .NET introduces the notion of AppDomains. This is a pure software function > not hardware (like Processes). It means .NET can run several "sub processes" > (programs) in a single x86 process. These "sub processes" also cannot > interefere with each other.... the .NET runtime makes sure of that. This is > very memory efficient and it is was makes things like ASP.NET work so well. > > so then will both of these work fine if say like a window service starts one
of these and the service stops will the thread/process continue running? thanks, rodchar ps. thanks for the great replies. Show quoteHide quote "CMM" wrote: > You might want to research this further on the net... but basically: > > Programs (EXE's) run in one "process space." Windows gives them their own > "virtual memory" and resources and they can't cross the border into other > processes (programs) running. This is actually a function of the x86 chip > and not Windows per se. You can see what processes you have running by going > into Task Manager and clicking on the Processes tab. Each process can have a > multitude of windows open (for instance each IE window you have open runs > (normally) as one process). If one process crashes, it can't take down > another process with it. > > Each process has one "thread of execution" given to it... meaning it can do > one thing at a time (execute a particular line of code on one CPU clock > cycle). But processes can and usually do spawn other threads. These threads > simply mean that a single process can do several things at the same time > (multithreading). This is a feature of Windows and other OS which allow > multiple programs to do things at the same time by alloting them "CPU Time." > > ..NET introduces the notion of AppDomains. This is a pure software function > not hardware (like Processes). It means .NET can run several "sub processes" > (programs) in a single x86 process. These "sub processes" also cannot > interefere with each other.... the .NET runtime makes sure of that. This is > very memory efficient and it is was makes things like ASP.NET work so well. > > > The service *is* the "process." If it stops so does the thread.
If the service (process) spawns another process (like, say, an instance of Excel) the second process continues running even if the first one shuts down. The first one has to do "something special" and explicitely kill the second process if that's what it wants to do. This is really basic stuff, man. thank you all very much this has helped a lot.
Show quoteHide quote "CMM" wrote: > The service *is* the "process." If it stops so does the thread. > > If the service (process) spawns another process (like, say, an instance of > Excel) the second process continues running even if the first one shuts > down. The first one has to do "something special" and explicitely kill the > second process if that's what it wants to do. > > This is really basic stuff, man. > > >
Are people using data binding now?
Strongly Typed Key Value Collections within a For Next loop Accessing embedded resources Function parameter function Upgrading VB2003 to 2005 how to do Binding with code sorting inherited BindingList Problem adding new row in Access Table Adding summary to object browser? [URGENT] Images and Thumbnail : pb with rendering quality |
|||||||||||||||||||||||