[Info-vax] VMS Forever?
glen herrmannsfeldt
gah at ugcs.caltech.edu
Fri Apr 24 16:00:02 EDT 2009
MetaEd <metaed at gmail.com> wrote:
(snip)
> Threads are, in essence, program counters. By this definition, if a
> process's address space has exactly one program counter, that is a
> single thread. If it has multiple program counters, it is multi-
> threaded. Threads are also styled as lightweight processes.
Personally, I don't like the name 'process'. It makes the
term multiprocessing ambiguous. (It should refer to multiple
physical (or virtual) processors. Besides, everyone now knows
what multitasking means even if they don't know which end of
a computer us up.)
(snip)
> It is instructive to compare clone() with fork().
> If you want a new process in Linux (or any UNIX) you call fork(),
> which creates a new private address space and an initial program
> counter and other state variables.
There is, in addition, on many systems vfork(), optimized for
the case when exec() will be called, to avoid some work duplicating
an address space that will then go away.
> The new process is called the
> child. It gets a copy of the calling process's instruction and data
> space, so the child is in most respects a copy of its parent. Notable
> exceptions are the process ID and the fork() return code. Typically
> you put a condition after the fork() which tests the return code and
> sends each process in a different direction.
-- glen
More information about the Info-vax
mailing list