Servers provide the needed response time to multiple clients by processing multiple client requests in parallel. If clients had to be serviced sequentially, performance would suffer and clients might spend considerable time in a wait state.
Until recently, RPC provided few tools to support parallel operations, which had to be laboriously hand- coded. RPC, however, provides parallelism through the use of threads on both the client and server. A thread, also known as a lightweight process, is an independent sequence of execution within a single process and address space. A single process can have many threads in independent simultaneous execution, limited only by data dependencies and the amount of hardware (see Figure 4). The benefits of threads include:
· The thread has access to all of the data structures of the parent process.
· Threads require less processor time and storage space than process creation.
· Threads allow parallel operation.
Figure 4 Parallel Operation Using RPC