A thread of execution is often regarded as the smallest unit of processing that a scheduler works on. A process can have multiple threads of execution which are executed asynchronously. This asynchronous execution brings in the capability of each thread handling a particular work or service independently. Hence multiple threads running in a process handle their services which overall constitutes the complete capability of the process. Why Threads are Required? Suppose there is a process, that receiving real time inputs and corresponding to each input it has to produce a certain output. Now, if the process is not multi-threaded, then the whole processing in the process becomes synchronous. This means that the process takes an input, processes it and produces an output. The limitation in the above design is that the process cannot accept an input until its done processing the earlier one and in case processing an input takes longer than expected then accepting further inputs ...
Networking Lab CSL 332 for KTU students- Dr Binu V P