Process: Difference between revisions

590 bytes added ,  15 years ago
Extended with respect of resource sharing
m (Added intrawiki link)
(Extended with respect of resource sharing)
Line 1:
[[Category:Encyclopedia]]A '''process''' is an instance of a computer program. This is not to be confused with a [[thread]], which is a section of code which runs concurrently with other sections of code, or a program, which is a list of instructions. Threads are technically part of a process. For instance, in a [[Java]] [[GUI]] program, many GUI actions are handled on a separate thread from the rest of the program, but it all still runs in a single process.
 
Both process and thread are examples of a [[task]], an entity participating resource sharing, and in particular, in sharing the central processor unit. I.e. are subjects of scheduling. The main difference between a process and thread is that threads use a trusted model of resource sharing, while processes share the resources in a way to prevent mutual disturbance. For this reason, in a modern [[OS]] the resources allocated to a process are usually collected. The resources allocated to a thread are typically unprotected and collected only together with the process owning the thread.