Difference between revisions of "Process"

From Hackepedia
Jump to navigationJump to search
 
Line 1: Line 1:
 
A process is a program running in a UNIX system.  It communicates with the rest of the system by means of [[descriptors]] or [[shared memory]].  A process is in [[protected memory]] also called [[virtual memory]] because address locations are translated by the [[kernel]] from the real physical addresses.  A process cannot read the memory of another process unless both processes share that memory which needs to be set up by both.  A typical process is composed of data (text), uninitialized data ([[bss]]), [[heap]] and [[stack]].  Because of [[paging]] a process does not need to be loaded completely into memory but is loaded in chunks called pages when it tries to access an area that hasn't been paged in yet (this causes a [[page fault]] to indicate to the kernel that more data is needed).  When memory pages aren't being used they can be paged out to [[swap]] to make room for more memory that other processes may require.  When a threshold is reached and processes aren't active for longer periods of time they can be entirely swapped out to disk.  This is rather slow and often avoided when possible.  Processes can be signal'ed to stop execution, continue execution and to exit including leaving a [[core]] file for later analysis.
 
A process is a program running in a UNIX system.  It communicates with the rest of the system by means of [[descriptors]] or [[shared memory]].  A process is in [[protected memory]] also called [[virtual memory]] because address locations are translated by the [[kernel]] from the real physical addresses.  A process cannot read the memory of another process unless both processes share that memory which needs to be set up by both.  A typical process is composed of data (text), uninitialized data ([[bss]]), [[heap]] and [[stack]].  Because of [[paging]] a process does not need to be loaded completely into memory but is loaded in chunks called pages when it tries to access an area that hasn't been paged in yet (this causes a [[page fault]] to indicate to the kernel that more data is needed).  When memory pages aren't being used they can be paged out to [[swap]] to make room for more memory that other processes may require.  When a threshold is reached and processes aren't active for longer periods of time they can be entirely swapped out to disk.  This is rather slow and often avoided when possible.  Processes can be signal'ed to stop execution, continue execution and to exit including leaving a [[core]] file for later analysis.
  
To show all processes in BSD type:
+
To show all processes in [[BSD]] type:
  
 
  $ ps -kax
 
  $ ps -kax

Revision as of 04:44, 7 October 2005

A process is a program running in a UNIX system. It communicates with the rest of the system by means of descriptors or shared memory. A process is in protected memory also called virtual memory because address locations are translated by the kernel from the real physical addresses. A process cannot read the memory of another process unless both processes share that memory which needs to be set up by both. A typical process is composed of data (text), uninitialized data (bss), heap and stack. Because of paging a process does not need to be loaded completely into memory but is loaded in chunks called pages when it tries to access an area that hasn't been paged in yet (this causes a page fault to indicate to the kernel that more data is needed). When memory pages aren't being used they can be paged out to swap to make room for more memory that other processes may require. When a threshold is reached and processes aren't active for longer periods of time they can be entirely swapped out to disk. This is rather slow and often avoided when possible. Processes can be signal'ed to stop execution, continue execution and to exit including leaving a core file for later analysis.

To show all processes in BSD type:

$ ps -kax

To show all processes in SYSV type:

$ ps -ef