code and process migration - iit-computer scienceiraicu/teaching/cs550-s11/lecture12.pdf · –ship...
TRANSCRIPT
![Page 1: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/1.jpg)
![Page 2: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/2.jpg)
• Code and process migration
– Motivation
– How does migration occur?
– Resource migration
• Distributed scheduling
CS550: Advanced Operating Systems 2
![Page 3: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/3.jpg)
• Key reasons: performance and flexibility
• Process migration (aka strong mobility)
– Improved system-wide performance –
better utilization of system-wide resources
• Code migration (aka weak mobility)
– Shipment of server code to client
– Ship parts of client application to server
instead of data from server to client
– Improve parallelism
CS550: Advanced Operating Systems 3
![Page 4: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/4.jpg)
• Performance
– The overall system performance can be
improved if processes are moved from
heavily-loaded to lightly-loaded machines
– Exploit parallelism, e.g., searching for
information in the web through the
development of mobile agent, that moves
from site to site
– fault tolerance, e.g., moving from failure-
prone to failure-free machines
CS550: Advanced Operating Systems 4
![Page 5: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/5.jpg)
• Flexibility
– Dynamic configuration of distributed
system
– Clients don’t need preinstalled software –
download on demand
CS550: Advanced Operating Systems 5
![Page 6: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/6.jpg)
• Process = code seg + resource seg + execution seg
• Weak versus strong mobility
• Sender-initiated versus receiver-initiated
– Sender-initiated (code is with sender)
• Client sending a query to database server
• Client should be pre-registered
– Receiver-initiated
• Java applets
• Receiver can be anonymous
CS550: Advanced Operating Systems 6
![Page 7: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/7.jpg)
• Challenge: multiple processing nodes=> scheduling not only is performed locally on each node but also globally across the system
• Distributed scheduling (aka load balancing): potentially useful for performance improvement or system utilization
• An Example: Work Stealing
CS550: Advanced Operating Systems 12
![Page 8: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/8.jpg)
• The measure of load
– Must be easy to measure
– Must reflect performance improvement
• Types of policies
– Static vs. Dynamic vs. Adaptive
• Types of task transfers
– Preemptive vs. non-preemptive
• Major components
• Three algorithms CS550: Advanced Operating Systems 13
![Page 9: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/9.jpg)
• Transfer policy: when to transfer a task? – Threshold-based policies are common and easy
• Selection policy: which task to transfer? – An easy approach
• Location policy: where to transfer the task? – Polling, random, nearest neighbor
• Information policy: when and from where? – Demand driven
– Time-driven
– State-change-driven
CS550: Advanced Operating Systems 16
![Page 10: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/10.jpg)
• Sender-initiated:
– distribution initiated by an overloaded node.
• Receiver-initiated:
– Distribution initiated by lightly loaded nodes.
• Symmetric:
– Initiated by both senders and receivers.
CS550: Advanced Operating Systems 17
![Page 11: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/11.jpg)
• Transfer policy: use threshold
• Selection policy: newly arrived task
• Location policy: three variations – Random:
– Threshold:
– Shortest:
CS550: Advanced Operating Systems 18
![Page 12: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/12.jpg)
• Information Policy: demand-driven.
• Stability: can become unstable at high
loads, why?
CS550: Advanced Operating Systems 19
![Page 13: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/13.jpg)
• Transfer policy: If departing task causes
load < T, find a task from elsewhere
• Selection policy: newly arrived or partially
executed task
• Location policy:
– Threshold:
– Longest/heaviest: CS550: Advanced Operating Systems 20
![Page 14: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/14.jpg)
• Information policy: demand-driven.
• Stability: Not unstable since lightly loaded
nodes initiate the algorithm
• Drawbacks:
– ?
CS550: Advanced Operating Systems 21
![Page 15: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/15.jpg)
• Nodes act as both senders and receivers: combine
previous two policies without change
– Use average load as threshold
• Improved symmetric policy: exploit polling information
– Two thresholds: LT, UT, LT <= UT
– Maintain sender, receiver and OK nodes using polling info
– Sender: poll first node on receiver list …
– Receiver: poll first node on sender list …
CS550: Advanced Operating Systems 22
![Page 16: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/16.jpg)
• If a system never gets highly loaded,
which one is better?
• In case of high loads, which one is
better?
• In case of widely fluctuating loads,
which one is better?
CS550: Advanced Operating Systems 23
![Page 17: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/17.jpg)
• Discussion
CS550: Advanced Operating Systems 24
![Page 18: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/18.jpg)
• Code and process migration
– Motivation
– How does migration occur?
– Resource migration
• Distributed scheduling
– Sender-initiated
– Receiver-initiated
– Symmetric
• Readings:
– Chpt 3 of AST
CS550: Advanced Operating Systems 29
![Page 19: Code and process migration - IIT-Computer Scienceiraicu/teaching/CS550-S11/lecture12.pdf · –Ship parts of client application to server ... • Stability: can become unstable at](https://reader031.vdocuments.net/reader031/viewer/2022021901/5b903f6109d3f252108b74f1/html5/thumbnails/19.jpg)
CS550: Advanced Operating Systems 30