Chapter 3:  Processes  A process is a program in execution

Threads in distributed systems are particularly useful to continue using the CPU when a blocking I/O operation is performed.

Threads(sequence of events):
bulletVery similar to a process in the sense that it can also be seen as the execution of a program on a virtual processor.
bulletMaintains only a minimum of information to allow a CPU to be shared by several threads.
bulletThread package (operations to create and destroy threads, sync)
bulletAllows blocking system calls without blocking the entire process in which the thread is running.

Threads share code and data, processes do not  [Threads and Runnable????]

Concurrent programming (process/thread executing in parallel, syncronization can be a challenge)

Multithreaded clients:

bulletEach thread is set up to fetch different areas of a html file.  Each thread sets up different connections to the server 

Multithreaded servers:

bulletMain use of multithreading is found in the server.

*  Servers can either be iterative (one server at a time) or concurrent ( multiple request in parallel) and stateless or stateful(maintains information on the state of its clients).

*  An object adapter is a component that implements exactly one invocation policy.

*  Migration of code between different machines ( reason is to move processes to lightly load machines).

*  A software agent is capable of cooperation with other agents.



Monitor(oversee) - synchronized gives you mutual exclusion (used in shared memory communication, MULTIPROCESSOR SEE CHAPTER 1)

wait - is called when a condition is not met - continues when another thread is doing "notify" or "notify all"

There is one waiting list for each synchronized object  (not the same as the queue where the threads are waiting for the lock)

notify - one thread will be taken out of the waiting list