Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

thread vs process in general

Status
Not open for further replies.

bandez

IS-IT--Management
Jul 8, 2002
42
GB
Hi there!!

What is the difference between threads and processes?
 
if you haven't noticed - in name,
process is a set of controlled threads in modern systems, older systems had one thread per process so antique software may start another process and call it a thread
 
gheist is right...now the geeky version?

In all releases of AIX Version 3, the concept of multiple threads of execution with a single process was a distant concept. Starting in summer of 1994, with the release of version 4.1, multiple threads of execution within a single process was supported.

Threading an application avoids the performance penalties associated with IPC (interprocess Communications. In the past, to avoid loss of data in data collecting applications that had short latencies, one process was designed to collect (retrieve) the data and then passing that data through an IPC mechanism like a pipe or message queue to another process that would handle the data. However, in order to pass the data through either a pipe or message que, a system call was necessary to perform this task. The overhead associated with making a system call can be expensive.

In the new model, one thread could pass the data to anotehr thread via a memory pointer since they share the same address space, thus saving the need for a system call.

Threading is having more than one state of execution within a single process?


Processes in Aix control the address space of a task that is running on the system. The majority of process on an AIX system are what are called user-mode applications or processes. There are some kernel processes which are used for system management and maintenance.

In AIX Version3 the process was the scheduled, dispatched and executable unit of work.
In Aix Version 4.1 the thread is the scheduled, dispatched and executable unit of work. The process just defines the address space now.

Threads are a performance alternative to IPCs

In AIX 4.1 and 4.2 each process could have up to 512 threads
In Aix 4.3 if you compile with _LARGE THREADS you can have 32,767 threads.

---------------------------
ps -efmo THREAD

Good sources to check out on the topic of threads?






 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top