正在加载图片...
6.001 Structure and Interpretation of Computer Programs. Copyright o 2004 by Massachusetts Institute of Technology mechanism that cycles throug ht be executing concurrent processes on a sequential processor using a time-slicing processes. For example, we m the processes, permitting each process to run for a short time before interrupting it and moving on to the next process. In that case, test-and-set! can work by disabling time slicing during the testing and setting Alternatively, multiprocessing computers provide instructions that support atomic operations directly in hardware Slide 32, 4.5 We' ve seen how programming concurrent systems requires Concurrency and time in large systems controlling the ordering of events when different processes access Can enable parallel shared state and we've seen how to achieve this control through access to shared variablesses by judiciously controlling judicious use of serializers. But the problems of concurrency lie ust be initiated and completed before other actions may deeper than this, because, from a fundamental point of view, it' not always clear what is meant by shared state ensuring Mechanisms such as test-and-set! require processes to Ultimately concurrent processing inherently requires careful examine a global shared flag at arbitrary times. this is problemat attention to communication between processes and inefficient to implement in modern high-speed processors where due to optimization techniques such as pipelining and cached memory, the contents of memory may not be in a consistent state at every instant. In contemporary multiprocessing systems, therefore, the serializer paradigm is being supplanted by new approaches to concurrency control The basic phenomenon here is that synchronizing different processes, establishing shared state, or imposing an order on events requires communicating among the processes. In essence, any notion of time in concurrency control must be intimately tied to communication6.001 Structure and Interpretation of Computer Programs. Copyright © 2004 by Massachusetts Institute of Technology. processes. For example, we might be executing concurrent processes on a sequential processor using a time-slicing mechanism that cycles through the processes, permitting each process to run for a short time before interrupting it and moving on to the next process. In that case, test-and-set! can work by disabling time slicing during the testing and setting. Alternatively, multiprocessing computers provide instructions that support atomic operations directly in hardware. Slide 32.4.5 We've seen how programming concurrent systems requires controlling the ordering of events when different processes access shared state, and we've seen how to achieve this control through judicious use of serializers. But the problems of concurrency lie deeper than this, because, from a fundamental point of view, it's not always clear what is meant by ``shared state.'' Mechanisms such as test-and-set! require processes to examine a global shared flag at arbitrary times. This is problematic and inefficient to implement in modern high-speed processors, where due to optimization techniques such as pipelining and cached memory, the contents of memory may not be in a consistent state at every instant. In contemporary multiprocessing systems, therefore, the serializer paradigm is being supplanted by new approaches to concurrency control. The basic phenomenon here is that synchronizing different processes, establishing shared state, or imposing an order on events requires communicating among the processes. In essence, any notion of time in concurrency control must be intimately tied to communication
<<向上翻页
©2008-现在 cucdc.com 高等教育资讯网 版权所有