Introduction Distributed Systems Processes & Threads: Today
Introduction Distributed Systems Processes & Threads: Today
Introduction Distributed Systems Processes & Threads: Today
Today
Processes and Threads
Processes virtual processors, offer concurrency transparency, at a relatively high price on performance Threads offer concurrency w/ much less transparency
Applications with better performance that are harder to code/debug Advantages of multithreading
No need to block with every system call Easy to exploit available parallelism in multiprocessors Cheaper communication between components than with IPC Better fit for most complex applications
Better structure:
Most servers have high I/O demands. Using simple, wellunderstood blocking calls simplifies the overall structure. Multithreaded programs tend to be smaller and easier to understand due to simplified flow of control
MSIT Peer-to-Peer Computing Northwestern University
Server design
Server a process that waits for incoming service requests at a specific transport address Iterative vs. concurrent servers: Iterative servers can handle only one client at a time, in contrast to concurrent servers In practice, there is a 1-to-1 mapping between port and service, e.g. ftp: 21, smtp:25 Superservers: Servers that listen to several ports, i.e., provide several independent services; start a new process to handle new requests (UNIX inetd/xinetd)
For services with more permanent traffic get a dedicated server
Out-of-band communication
How to interrupt a server once it has accepted (or is in the process of accepting) a service request? Solution 1: Use a separate port for urgent data (possibly per service request):
Server has a separate thread (or process) waiting for incoming urgent messages When urgent msg comes in, associated request is put on hold
Require OS supports high-priority scheduling of specific threads or processes
Consequences:
Clients and servers are completely independent State inconsistencies due to client or server crashes are reduced Possible loss of performance because, e.g., a server cannot anticipate client behavior (think of prefetching file blocks)
Observation: The performance of stateful servers can be extremely high, provided clients are allowed to keep local copies. As it turns out, reliability is not a major problem.
Thin-client computing
Thin-client
Client and server communicate over a network using a remote display control
Client sends user input, server returns screen updates
Graphical display can be virtualized and served to a client Application logic is executed on the server
Technology enablers
Improvements in network bandwidth, cost and ubiquity High total cost of ownership for desktop computing
Code migration
Instead of passing data around, why not moving code? What for?
Improve load distribution in compute-intensive systems Save network resource and response time by moving processing data closer to where the data is Improve parallelism w/o code complexities
Mobile agents for web searches
10
Some alternatives
Weak/strong mobility code or code and execution segments Sender or receiver initiated A new process for the migration code? Cloning instead of migration
11
Question 3
What drives the market for application service providers? What would be the main factor limiting wide-area thin-client performance?
12
13