Processes and Threads: Difference between revisions

From Computer Science Wiki
(Created page with "right|frame|Resource Management<ref>http://www.flaticon.com/</ref> In computing, a '''process''' is the instance of a computer program that is being exe...")
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
In computing, a '''process''' is the instance of a computer program that is being executed by one or many threads. It contains the program code and its activity. Depending on the operating system (OS), a process may be made up of multiple threads of execution that execute instructions concurrently<ref>https://en.wikipedia.org/wiki/Process_(computing)</ref>
In computing, a '''process''' is the instance of a computer program that is being executed by one or many threads. It contains the program code and its activity. Depending on the operating system (OS), a process may be made up of multiple threads of execution that execute instructions concurrently<ref>https://en.wikipedia.org/wiki/Process_(computing)</ref>


In computer science, a thread of execution is the smallest sequence of programmed instructions that can be managed independently by a scheduler, which is typically a part of the operating system.  The implementation of threads and processes differs between operating systems, but in most cases a thread is a component of a process.<ref>https://en.wikipedia.org/wiki/Thread_(computing)</ref>


== Video ==
<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/h_HwkHobfs0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</html>
== Hands on tools ==
In general, we use the <syntaxhighlight lang="bash" inline>top</syntaxhighlight> command to view summary information about the running processes and threads (and much more). To see actual thread activity (blech) on an OS X system, type the <syntaxhighlight lang="bash" inline>sudo dtruss -ap pid</syntaxhighlight> (where PID is the process you want to investigate).
There are [[GUI]] tools where you can view this information, but you should use command line interface.


== References ==
== References ==

Latest revision as of 22:32, 1 March 2020

Resource Management[1]

In computing, a process is the instance of a computer program that is being executed by one or many threads. It contains the program code and its activity. Depending on the operating system (OS), a process may be made up of multiple threads of execution that execute instructions concurrently[2]

In computer science, a thread of execution is the smallest sequence of programmed instructions that can be managed independently by a scheduler, which is typically a part of the operating system. The implementation of threads and processes differs between operating systems, but in most cases a thread is a component of a process.[3]

Video[edit]

Hands on tools[edit]

In general, we use the top command to view summary information about the running processes and threads (and much more). To see actual thread activity (blech) on an OS X system, type the sudo dtruss -ap pid (where PID is the process you want to investigate).

There are GUI tools where you can view this information, but you should use command line interface.

References[edit]