CS 541 Lecture -*- Outline -*- * problems with parallel systems ad: what are the important questions in designing a parallel language? reference: Filman/Friedman, Coordinated Computing (McGraw-Hill 1984) ** General questions *** What is the problem? What are your goals? *** What have others done? ** Computational power What kind of turing machine is a parllel language equivalent to? TMs with unbounded random number oracle? what about reactive systems: interactive behavior ** preventing race conditions *** mutual exclusion deposit 150 and 50 dollars in an account read, read, add, add, write, write (oops) synchronization of processes orders execution... invariants, transactions, and critical regions solutions include semaphores, conditional critical regions, monitors... a generalization is the readers and writers problem *** deadlock e.g., dining philosphers problem *** starvation often results from priorities ** problem domains (approaches to parallel programming) *** operating systems control of distributed system matching language to the machine issues: ease of machine control efficiency common: process = processor communications structure static *** pragmatic tools to aid programming process may not be easy to implement *** semantic study systems as mathematical objects hope to clarify semantics of parallelism and prove program correctness issue: elegance *** analytic analyze efficiency of algorithms *** heuristic organizations AI, symbolic processing issues: natural translation of ideas into programs *** others? coordination language: sits on top of normal language ** What primitives? *** process creation explicit or implicit? If explicit, how do processes communicate? *** process dynamics issues: ease of machine control efficiency common: process = processor communications structure static if explicit processes: can processes be created at run-time? if so, what can be done with the names? gc? *** synchronization shared storage? messages? asynchronous (send and forget) vs. synch interaction with process structure *** buffering bounded or unbounded *** communication control rules for establishing communication caller-callee (RPC) send-recieve (receiver is active) pattern matching selection of which call to recieve takes many forms: queues, guarded commands,... *** communication connection single vs. multiparty ports, channels labels (proc names) *** time-out specified time? Instantaneous *** fairness each process gets a turn? opposite is notion of priority: can this really be defined? *** failure what kinds? node crash, communications, node going haywire what to do? time-out, exception handlers, redundancy, atomic actions, functional accuracy (algorithms that tolerate failures)