Professional Documents
Culture Documents
( CN-6123 )
Presented by
Dr. M. Prasad, Ph.D, MISTE,
Professor,
Master of Science in Computer Science and Networking Program,
School of Computing and Informatics,
College of Engineering and Technology,
Dilla University, Dilla, Ethiopia.
CHAPTER – 3
Processes
Chapter_3 Syllabus
Processes :
Anatomy of Clients,
Code Migration.
Introduction
•Process –> Program in Execution.
•Thread -> Path of execution within a process.
• Process can contain multiple threads – Parallelism
•A thread is also known as Lightweight Process.
•A thread executes its own piece of code, independently from
other threads.
•A thread shares with its peer threads few information like code
segment, data segment and open files.
•Ex.:
o Browser - Multiple tabs can be different threads.
o MS Word - One thread to format the text, another thread to
process inputs, spell checker, etc.,
Introduction
Advantages:
1. Responsiveness
2. Faster context switch
3. Effective utilization of multiprocessor system
4. Resource sharing
5. Communication
6. Enhanced throughput of the system
Threads Implementation
Distributed Systems
Threads Implementation – Non Distributed
•Two Types threading Models
Single Threading - A process has an address space
a. Single-threaded process
b. Threads
c. Finite-state machine
Threads Implementation – Distributed . . .
Multithreaded Servers : Single –threaded Process
It gets a request, examines it, carries it out to completion before
getting the next request.
The server is idle while waiting for disk read, i.e., system calls are
blocking.
Multithreaded Servers : Thread
Important for implementing servers.
EX.: A file server
The Dispatcher Thread reads incoming requests for a file operation
from clients and passes it to an idle worker thread.
The Worker Thread performs a blocking disk read; in which case
another thread may continue, say the dispatcher or another worker
Threads Implementation – Distributed . . .
Multithreaded Servers : Finite – State Machine
If threads are not available.
It gets a request, examines it, tries to fulfill the request from cache,
else sends a request to the file system; but instead of blocking it
records the state of the current request and proceeds to the next
request.
Model Characteristics
Single-threaded process No parallelism, blocking system calls
Threads Parallelism, blocking system calls (thread only)
Finite-state machine Parallelism, non-blocking system calls
Anatomy of Clients
•Two issues
transparency.
Anatomy of Clients – Net. User Interface
• To create a convenient environment for the interaction of a human
1. For each remote service the client machine will have a separate
collection of clients.
subsequently ensures that the request is taken care of, after which it
• Design Issues
• Server Clusters
Anatomy of Servers – Design Issues
Iterative server
The server itself handles the request and returns the result.
Concurrent server
Let the client exit the client application – It will break the
systems.
To reduce communication .
systems.
Code Migration - Models
printers, …
currently running.
Unattached Resources - Can be easily moved with the migrating program (such as
Fastened Resources - Such as local databases and complete Web sites; moving or
virtual machine.
In weak mobility - Since there is no runtime information, compile the
source code for each potential platform.
In strong mobility - Difficult to transfer the execution segment since there
may be platform-dependent information such as register values.
Code Migration – Heterogeneous Systems . . .
There are, in principle, three ways to handle migration:
Pushing memory pages to the new machine and resending the ones that are later
Stopping the current virtual machine; migrate memory, and start the new virtual
machine.
Letting the new virtual machine pull in new pages as needed, that is, let processes
start on the new virtual machine immediately and copy memory pages on demand.
Dr. M. Prasad, Ph.D, MISTE,
Professor,
Master of Science in Computer Science and Networking Program,
School of Computing and Informatics,
E-mail : prasads.maddula@du.edu.et
Phone No : 0934845087