Politecnico di Milano © 2001 William Fornaciari Operating Systems Processor allocation in distributed systems Lecturer: William Fornaciari Politecnico.

Slides:



Advertisements
Similar presentations
Chapter 3 Process Description and Control
Advertisements

Chapter 6: Memory Management
Resource Management §A resource can be a logical, such as a shared file, or physical, such as a CPU (a node of the distributed system). One of the functions.
Distributed Process Management
Chapter 18 Distributed Process Management Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Chapter 18 Distributed Process Management Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Introduction CSCI 444/544 Operating Systems Fall 2008.
Study of Hurricane and Tornado Operating Systems By Shubhanan Bakre.
A. Frank - P. Weisberg Operating Systems Process Scheduling and Switching.
Modified from Silberschatz, Galvin and Gagne Lecture 16 Chapter 8: Main Memory.
Distributed Process Management
03/09/2007CSCI 315 Operating Systems Design1 Memory Management Notice: The slides for this lecture have been largely based on those accompanying the textbook.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
Memory Management 2010.
Informationsteknologi Friday, November 16, 2007Computer Architecture I - Class 121 Today’s class Operating System Machine Level.
3.5 Interprocess Communication
Memory Management 1 CS502 Spring 2006 Memory Management CS-502 Spring 2006.
CS-3013 & CS-502, Summer 2006 Memory Management1 CS-3013 & CS-502 Summer 2006.
Memory Management Chapter 5.
Chapter 11 Operating Systems
©Brooks/Cole, 2003 Chapter 7 Operating Systems Dr. Barnawi.
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
Operating Systems (CSCI2413) Lecture 3 Processes phones off (please)
1 Distributed Systems: Distributed Process Management – Process Migration.
Distributed Process Management1 Learning Objectives Distributed Scheduling Algorithms Coordinator Elections Orphan Processes.
MULTICOMPUTER 1. MULTICOMPUTER, YANG DIPELAJARI Multiprocessors vs multicomputers Interconnection topologies Switching schemes Communication with messages.
Challenges of Process Allocation in Distributed System Presentation 1 Group A4: Syeda Taib, Sean Hudson, Manasi Kapadia.
Introduction and Overview Questions answered in this lecture: What is an operating system? How have operating systems evolved? Why study operating systems?
1 Distributed Operating Systems and Process Scheduling Brett O’Neill CSE 8343 – Group A6.
 Introduction, concepts, review & historical perspective  Processes ◦ Synchronization ◦ Scheduling ◦ Deadlock  Memory management, address translation,
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
Multiple Processor Systems. Multiprocessor Systems Continuous need for faster and powerful computers –shared memory model ( access nsec) –message passing.
Memory Management Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Dr.
Transparent Process Migration: Design Alternatives and the Sprite Implementation Fred Douglis and John Ousterhout.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Chapter 7 Operating Systems. Define the purpose and functions of an operating system. Understand the components of an operating system. Understand the.
Chapter 8-2 : Multicomputers Multiprocessors vs multicomputers Multiprocessors vs multicomputers Interconnection topologies Interconnection topologies.
Nov 8, 2003 SMU School of Engineering Group 2: Hammad, Mann, Nidgundi, & Zhang CSE 8343 Advanced Operating Systems Slide 1 Instructor: Dr. Khalil Distributed.
Threads G.Anuradha (Reference : William Stallings)
OPERATING SYSTEM SUPPORT DISTRIBUTED SYSTEMS CHAPTER 6 Lawrence Heyman July 8, 2002.
Processes Introduction to Operating Systems: Module 3.
Page 1 Process Migration & Allocation Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
Lecture 5: Threads process as a unit of scheduling and a unit of resource allocation processes vs. threads what to program with threads why use threads.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
Department of Computer Science and Software Engineering
DISTRIBUTED COMPUTING
Static Process Scheduling
Memory Coherence in Shared Virtual Memory System ACM Transactions on Computer Science(TOCS), 1989 KAI LI Princeton University PAUL HUDAK Yale University.
Operating Systems (CS 340 D) Dr. Abeer Mahmoud Princess Nora University Faculty of Computer & Information Systems Computer science Department.
Lecture Topics: 11/15 CPU scheduling: –Scheduling goals and algorithms.
Page Buffering, I. Pages to be replaced are kept in main memory for a while to guard against poorly performing replacement algorithms such as FIFO Two.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
Chapter pages1 Distributed Process Management Chapter 14.
Chapter 7 Memory Management Eighth Edition William Stallings Operating Systems: Internals and Design Principles.
COMP7330/7336 Advanced Parallel and Distributed Computing Task Partitioning Dr. Xiao Qin Auburn University
Lecture 4 Page 1 CS 111 Summer 2013 Scheduling CS 111 Operating Systems Peter Reiher.
System Models Advanced Operating Systems Nael Abu-halaweh.
The Principles of Operating Systems Chapter 9 Distributed Process Management.
Memory Management.
Processes and threads.
Chapter 2 Memory and process management
Copyright ©: Nahrstedt, Angrave, Abdelzaher
Operating Systems (CS 340 D)
Main Memory Management
Operating Systems (CS 340 D)
Process Description and Control
Multithreaded Programming
High Performance Computing
Virtual Memory: Working Sets
Presentation transcript:

Politecnico di Milano © 2001 William Fornaciari Operating Systems Processor allocation in distributed systems Lecturer: William Fornaciari Politecnico di Milano

Distributed Process Allocation© 2001 William Fornaciari- 2 - SUMMARY Processor Allocation Migration Strategies Co-scheduling

Distributed Process Allocation© 2001 William Fornaciari- 3 - Introduction The system consists in a set of (fully connected) processors onto which a set of processes have to be allocated Possible allocation strategies Non-migratory P remains on the same machine until it terminates Migratory Move (migrate) an active (already started) process from one machine to another (target) machine It requires transferring a sufficient amount of the state of a process from one machine to another Better load balancing, more complex, significant impact on systems design

Distributed Process Allocation© 2001 William Fornaciari- 4 - Overall Design issues Long term goals Maximization of CPU utilization Minimization of mean response time Minimization of response ratio, i.e. the amount of time it takes to run a process on a machine divided on the value obtained executing it on an unloaded benchmark processor Load sharing move processes from heavily loaded to lightly loaded systems load can be balanced to improve overall performance

Distributed Process Allocation© 2001 William Fornaciari- 5 - Overall Design issues Communications performance processes that interact intensively can be moved to the same node to reduce communications cost may be better to move process to where the data reside when the data is large Availability long-running process may need to move because the machine it is running on, will be down Utilizing special capabilities process can take advantage of unique hardware or software capabilities which are in a particular system

Distributed Process Allocation© 2001 William Fornaciari- 6 - Allocation algorithms: taxonomy Deterministic vs heuristic alg. Difficult prediction of process behavior and requirements Centralized vs distributed alg. Centralized is less robust, better tuned, with system bottleneck Optimal vs sub-optimal alg. Due to cost, typ Heuristic, distributed, sub-optimal Local vs global alg. (transfer policy) Which information are used to decide Sender-initiate vs receiver initiated alg. (location) Where to send the process, it cannot be local

Distributed Process Allocation© 2001 William Fornaciari- 7 - Implementation problems Determination of the CPU load of all the machines Overhead of the algorithm Implementation complexity Maybe...simple is better Stability Different algorithms runs simultaneously from one other, with not up-to-date and possibly consistent information

Distributed Process Allocation© 2001 William Fornaciari- 8 - PROCESS MIGRATION: BASIC IDEA Transfer of sufficient amount of the state of a process from one machine to another The process executes on the target machine Must destroy the process on the source system and create it on the target system Process control block and any links must be moved

Distributed Process Allocation© 2001 William Fornaciari- 9 - PROCESS MIGRATION: MOTIVATION Load sharing Move processes from heavily loaded to lightly load systems Load can be balanced to improve overall performance Communications performance Processes that interact intensively can be moved to the same node to reduce communications cost May be better to move process to where the data reside when the data is large Availability Long-running process may need to move because the machine it is running on will be down Utilizing special capabilities Process can take advantage of unique hardware or software capabilities

Distributed Process Allocation© 2001 William Fornaciari WHO BEGINS THE MIGRATION? Operating system when goal is load balancing Process when goal is to reach a particular resource

Distributed Process Allocation© 2001 William Fornaciari Classes of algorithms Deterministic Graph-based Centralized Hierarchical Distributed Heuristic Bidding

Distributed Process Allocation© 2001 William Fornaciari Deterministic Graph-based Assumptions Knowledge of CPU and memory requirements for each process and of a matrix with the average traffic for each processor pair (difficult) Model: The system is a weigthed graph Nodes = processes, arcs msg flow Problem Assignment of multiple proc. to the CPUs so that net traffic is minimized, while fuflfilling processes constr. Find a graph partition in disjoined sub-graphs subject to contraints, i.e. discovering “clusters”

Distributed Process Allocation© 2001 William Fornaciari Centralized (UP-DOWN) Does not requires a priori knowledge, is heuristic A coordinator maintains a global usage table (of Workstations), that is updated sending msg The allocation decisions are based on the infos of the usage table, on-the-fly, not only based on workload balancing When a process is created, the owner ws can move it on other machine cumulating penality points that are summed to the owner table entry (UP) If no pending requests, table values decrese (DOWN)

Distributed Process Allocation© 2001 William Fornaciari Centralized (UP-DOWN) Entry values + : the corresp. workstation is a big user of resorces - : the ws needs resources 0 : neutral Heuristic When a processor becomes free, the pending request whose owner has the lowest score wins Consequence: fairly capacity allocation a user occupying no processor, rising a request peding for a long time, always beat someone using many processors Good in many cases, but do not scale well to large systems

Distributed Process Allocation© 2001 William Fornaciari Hierarchical Try to remove the bottlenek of centralized The processors (workers and managers) are hierarchically organized, indipendently of the physical organization of network For each group of workers, a manager traks who is busy or idle and distributes the works Possibility of several levels of managers, but only one reports to the upper level: reduced communication To prevent vulnerability, the hierarchy should not be a pyramid, the top level contains >1 managers

Distributed Process Allocation© 2001 William Fornaciari Hierarchical If a manager receives a request and is in shortage of resources, it pass the request upwards to the tree The number of processor R associated to a manager must be properly chosen R large: too many processors allocated, waste of computational capacity R small: overhead due to upwards passing of requests Potential problems Randome multiple requests happens at various stages of the algorithms, giving out-of-date estimates of workers capability, race conditions, deadlocks

Distributed Process Allocation© 2001 William Fornaciari Distributed Heuristic Studied mainly by Eager (see next) A process is created, and the machine on which it is created send a probe msg to a randomly chosen machine, asking if its load is under a given threshold If yes: the process is sent there If no: another machine is chosen for probe It exists a upper bound N to the probes, then the process will run on the originating machine

Distributed Process Allocation© 2001 William Fornaciari Bidding Computer system actors Buyers, Sellers of services, Prices set by supply/demand The price of a processor depends on memory size, hardware, espected response time,.... Processes must buy CPU time, Processors provides their services to the highest bidder A process starts a child Determine the set of processors offering the needed services and chose the cheapest, fastest, or best price/performance Prices/offers are periodically updated

Distributed Process Allocation© 2001 William Fornaciari AN EXAMPLE OF MIGRATION (1) P1 P2 P3 P4 P5 Kernel P1 P2 P3 Kernel P1 P2 P4 P5 Kernel P1 P2 P3 P4 Kernel 3 a bc d ef 1 cb a b 1 d 3 a 2 c 4 a bc d ef 1 d 2 c 3 a 1 cb a b Source MachineDestination Machine Before the migration After the migration

Distributed Process Allocation© 2001 William Fornaciari AN EXAMPLE OF MIGRATION (2) The process 3 migrates from the source machine to the destination machine All the IDs of the links (a,b,c,d...) of the processes don't change The operating system has to move the process control block and it has to modify the mapping of the links The process migration has to be invisible either to the migrated process and its partners Problems: addressing space and open files

Distributed Process Allocation© 2001 William Fornaciari MIGRATION STRATEGIES (1) Eager (all): Transfer entire address space no trace of process is left behind if address space is large and if the process does not need most of it, then this approach may be unnecessarily expensive the initial cost of the migration can be some minutes Precopy: Process continues to execute on the source node while the address space is copied pages modified on the source during precopy operation have to be copied a second time reduces the time that a process is frozen and cannot execute during migration

Distributed Process Allocation© 2001 William Fornaciari MIGRATION STRATEGIES (2) Eager (dirty): Transfer only that portion of the address space that is in main memory any additional blocks of the virtual address space are transferred on demand the source machine is involved throughout the life of the process (e.g., remote memory paging) good if process is temporarily going to another machine Copy-on-reference: Pages are only brought over on reference variation of eager (dirty) has lowest initial cost of process migration

Distributed Process Allocation© 2001 William Fornaciari MIGRATION STRATEGIES (3) Flushing: Pages are cleared from main memory by flushing dirty pages to disk later use copy-on-reference strategy relieves the source of holding any pages of the migrated process in main memory, making it available for other processes

Distributed Process Allocation© 2001 William Fornaciari CHOICE OF A STRATEGY If a process uses a little address space of the source machine memory (e.g, it moves temporarly on another machine and then return back) we will choose Eager (dirty) Copy on reference Flushing Otherwise, when sooner or later the entire address space will be referenced, we will choose Eager (all) Precopy

Distributed Process Allocation© 2001 William Fornaciari NEGOTIATION OF PROCESS MIGRATION Migration policy is responsibility of Starter utility Each machine has a Starter Utility which controls the process migration Starter utility is also responsible for long-term scheduling and memory allocation Decision to migrate must be reached jointly by two Starter processes (one on the source and one on the destination)

Distributed Process Allocation© 2001 William Fornaciari NEGOTIATION OF PROCESS MIGRATION Starter 1: Will you take P? 2: Yes, migrate to machine 3 3: MigrateOut P 4: Offer P 7: Accept offer 5: Offer P 6: MigrateIn P A P B KJ SourceDestination

Distributed Process Allocation© 2001 William Fornaciari NEGOTIATION OF PROCESS MIGRATION 1The Starter Utility of the source system wants the process P to migrate to a destination system. So it sends a message to the Starter Utility of the destination system 2The destination Starter Utility answers a positive acknowledgment, if it ready 3The source Starter Utility sends a message of migration to its kernel job (KJ), which converts msg among remote processes into system calls 4The source kernel offers to send the process P to the destination (the offer includes statisticson P like age and communication overhead)

Distributed Process Allocation© 2001 William Fornaciari NEGOTIATION OF PROCESS MIGRATION 5The destination kernel moves the offer to its Starter Utility. If it is in shortage of resources, it can reject 6The Starter Utility uses a MIGRATE_IN call 7The destination accepts the offer, allocating resources so to avoind stalls or other problems Source machine (1) must send messagges toward those containing other processes communicating with P, to update links

Distributed Process Allocation© 2001 William Fornaciari Eviction System evict a process that has been migrated to it If a workstation is idle, process may have been migrated to it Once the workstation is active, it may be necessary to evict the migrated processes to provide adequate response time

Distributed Process Allocation© 2001 William Fornaciari EXAMPLE: AIX (IBM Unix) - Actions When a process decide to migrate (automigration) it select the target machine send a msg of remote tasking (part of the process image and data concerning open files) The server kernel of the receiver machine fork off a child with the received information The new process recalls data, environment, arguments and information on the stack, necessary to complete the migration The original process if informed of the succeded migration, it sends a ACK to the new process and suicide

Distributed Process Allocation© 2001 William Fornaciari Co-scheduling In many cases processes operate in “group” Scheduling can consider interprocess communication to ensure that all the member of a group run at the same time The algorithm uses a conceptual matrix Column: process table for one processor Row: set of processes that in a given time slot are running Goal: each processor uses a RR scheduling with all processes in slot o, then RR for those in slot 1,... A broadcast message can be used to tell each processor when perfoming switching, to synchronize timeslicing

Distributed Process Allocation© 2001 William Fornaciari Co-scheduling Putting members of a process group in the same slot takes advantage of N-fold parallelism, to maximize communication throughput This scheduling techniques can be combined with hierarchical model of process managements, in some systems Other variation breaks the matrix into rows and concatenates consecutive slots belonging to different processors