DOCUMENT ID: 1283-02

SYNOPSIS:    Multi-thread Common Terminology

OS RELEASE:  2.4, SunOS 5.4

PRODUCT:     Solaris x86

KEYWORDS:    multi thread terminology


DESCRIPTION:

Terminology used when discussing the SunOS 5.4 Multi-thread technology.


SOLUTION:

======================================================================
Multi-thread Architecture Common Terminology

* Parallelism - two or more events handled simultaneously in the hardware.

* Concurrency - logical or programmatic parallelism.

* Multiprocessing (MP) - using more than one CPU.

* Tightly coupled multiprocessor - an architecture implemented by using
  shared memory and a common OS. 

* The Solaris 2.x environment communicates between the CPUs via shared
  memory. 

* The CPUs share a common kernel.

There are several ways to implement multiprocessors.  Many vendors use a
master/slave relationship where only a designated processor handles I/O
and other kernel resources. 

The method of communication or synchronization between the processors
can vary as well.  Some use a message-passing facility.  Sun uses shared
memory to pass information. 

* ASMP - asymmetric multiprocessing

* Extreme case is master/slave.

* Only one CPU can be executing in the kernel at a time.

* One master lock for the kernel-the SunOS 4.1.2 operating system.  

* SMP - symmetric multiprocessing

* Various degrees of symmetry.

* Depends on granularity of the locks.

* The Solaris 2.x environment has a high degree of symmetry.

In order to get the SunOS operating system to work on the multiple
processor hardware and to get it to market at the same time the hardware
was available, only one master lock was used to protect the kernel in
the SunOS 4.1.2 operating system.  This means that more than one CPU can
execute at a time, but only one can be active in the kernel.  Any other
processor that needs kernel resources (such as for I/O) has to block
until the master lock is available.  This means I/O-bound systems do not
benefit as much from the extra processors as a system that is spending
more time doing user calculations. 

The finer the degree of granularity of the data that the locks protect,
the more symmetry the system has. 

* Locks

* Locks are needed it the kernel to protect critical data structures
  from simultaneous access. 

* Locks must be used only when threads share "writable"	data.

* Locks will also provide the synchronization mechanisms for application
 threads. 

* The spl (system priority level) routines will not guarantee exclusive
  access with MP. 


DATE APPROVED: 04/11/95