Chapter 6: Concurrent Processes PDF

Document Details

EvocativeOrangutan5036

Uploaded by EvocativeOrangutan5036

Universiti Sains Malaysia

2018

Mchoes/Flynn

Tags

concurrent programming multiprocessing operating systems computer science

Summary

This document is a chapter on concurrent processes, providing an overview of concurrent programming, multiprocessing, and related concepts. It covers topics such as parallel processing, different multiprocessing configurations, and synchronization techniques.

Full Transcript

Concurrent Processes Chapter 6 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly acce...

Concurrent Processes Chapter 6 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 1 Learning Objectives (1 of 2) After completing this chapter, you should be able to describe: The differences among common configurations of multiprocessing systems How processes and processors compare How multi-core processor technology works How a critical region aids process synchronization 2 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Learning Objectives (2 of 2) PROCESS HOW SEVERAL HOW JOBS, HOW CONCURRENT SYNCHRONIZATION PROCESSORS WORK PROCESSES, AND PROGRAMMING SOFTWARE COOPERATIVELY THREADS ARE LANGUAGES MANAGE ESSENTIAL TOGETHER EXECUTED TASKS CONCEPTS 3 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. What Is Parallel Processing? (1 of 4) Parallel processing o Two or more processors operate in one system at the same time Work may or may not be related Or in another word; o Two or more CPUs execute instructions simultaneously o Processor Manager Coordinates activity of each processor Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 4 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. What Is Parallel Processing? (2 of 4) Benefits Increased reliability More than one C P U to share load or to serve as backup If one processor fails, others take over: must be designed into the system Faster processing Instructions processed in parallel two or more at a time 5 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Faster instruction processing methods C P U allocated to each program or job C P U allocated to each working set or What Is parts of it Individual instructions subdivided Parallel Each subdivision processed simultaneously Processin Concurrent programming Two major challenges g? (3 of connecting the processors into workable configurations 4) Coordinating processor interaction Example: six-step information retrieval system Synchronization is key https://www.youtube.com/watch?v=KH89uETpwx Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 6 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Originator Action Receiver What Is Parallel Processor 1 (the Accepts the query, checks for errors, and passes Processor 2 (the Processing? (4 order clerk) the request on to the receiver bagger) of 4) Processor 2 (the Searches the database for the required bagger) information (the hamburger) Processor 3 (the Retrieves the data from the database (the meat to (table 6.1) cook) cook for the hamburger) if it's kept off-line in secondary storage The six steps of Processor 3 (the cook) Once the data is gathered (the hamburger is cooked), it's placed where the receiver can get it Processor 2 (the bagger) the four-processor (in the hamburger bin) fast food lunch Processor 2 (the Retrieves the data (the hamburger) and passes it Processor 4 (the stop. bagger) on to the receiver cashier) Processor 4 (the Routes the response (your order) back to the You Synchronization is the key to cashier) originator of the request any multiprocessing system’s success because many thingscan go 7 wrong Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Pop Quiz 1 Explain this diagram based on your understanding. Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 8 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Levels of Multiprocessing (1 of 2) Multiprocessing occurs at three levels o Job level o Process level o Thread level Each level requires different synchronization frequency Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 9 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Levels of Multiprocessing (2 of 2) Parallelism Level Process Assignments Synchronization Required Job Level Each job has its own processor, and all No explicit synchronization is processes and threads are run by that same required after jobs are assigned to processor. a processor. Process Level Unrelated processes, regardless of job, can A moderate amount of be assigned to available processors. synchronization is required. Thread Level Threads, regardless of job and process, can A high degree of synchronization is be assigned to available processors. required to track each process and each thread. (table 6.2) Typical levels of parallelism and the required synchronization among processors. Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 10 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Introduction to Multi-Core Processors Multi-core processing o Several processors placed on single chip Problems o Current leakage (tunneling) due to closeness of transistors in CPU and heat Solution o Single chip with two processor cores in same space Allows two sets of simultaneous calculations o Two cores each run more slowly than single core chip Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 11 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Typical Multiprocessing Configurations Multiple processor configuration impacts systems Three types o Master/slave o Loosely coupled o Symmetric Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 12 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Master/Slave Configuration (1 of 3) Asymmetric multiprocessing system Single-processor system Additional slave processors Each managed by primary master processor Master processor responsibilities Manages entire system Maintains status of all processes Performs storage management activities Schedules work for other processors Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 13 Executes allMay not be scanned, control programscopied or duplicated, or posted to a publicly accessible website, in whole or in part. Master/Slave Configuration (2 of 3) (figure 6.1) In a master/slave multiprocessing configuration, slave processors can access main memory directly but they must send all I/O requests through the master processor. 14 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Advantages Simplicity Master/ Disadvantages Slave Reliability  No higher than single processor Configurat system- if the master processor fails, the entire system fails. ion (3 of Potentially poor resources usage  slave must wait until the master 3) becomes free and can assign more work to it. Increases number of interrupts  all slave processors must interrupt the master processor every time they need operating system Mchoes/Flynn, Understanding Operating Systems, intervention 8th Edition. © 2018 Cengage. All Rights Reserved. 15 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Several complete computer systems Each with own resources Each maintains commands and I/O Loosely Independent management single-processing tables Coupled difference Each processor Configurat Communicates and cooperates with others Has global tables ion (1 of Several requirements and policies for job scheduling 2) Single processor failure Others continue work independently Difficult to detect Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 16 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Loosely Coupled Configuration (2 of 2) (figure 6.2) In a loosely coupled multiprocessing configuration, each processor has its own dedicated resources. Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 17 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Decentralized processor scheduling Each processor uses same scheduling algorithm Symmetri Advantages (over loosely coupled c configuration) More reliable Configurat Uses resources effectively ion (1 of Balances loads well Degrades gracefully in failure situation 3) Most difficult to implement Requires well synchronized processes Avoids races and deadlocks Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 18 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Symmetric Configuration (2 of 3) (figure 6.3) A symmetric multiprocessing configuration with homogeneous processors. Processes must be carefully synchronized to avoid deadlocks and starvation. © Cengage Learning 2018 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 19 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Symmetric Configuration (3 of 3) Interrupt processing o Update corresponding process list o Run another process More conflicts o Several processors access same resource at same time Algorithms resolving conflicts between processors required Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 20 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Process Synchronization Software Successful process (1synchronization of 3) o Lock up used resource Protect from other processes until released o Only when resource is released Waiting process is allowed to use resource Mistakes in synchronization can result in: o Starvation Leave job waiting indefinitely o Deadlock If key resource is being used Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 21 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Process Synchronization Software (2 of 3) Critical region o Part of a program o Critical region must complete execution Other processes must wait before accessing critical region resources Processes within critical region o Cannot be interleaved Threatens integrity of operation Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 22 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Process Synchronization Software Synchronization (3 of 3) o Implemented as lock-and-key arrangement: o Process determines key availability Process obtains key Puts key in lock Makes it unavailable to other processes Types of locking mechanisms o Test-and-set o WAIT and SIGNAL o Semaphores Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 23 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Test-and-Set (1 of 2) Indivisible machine instruction (TS) Executed in single machine cycle o If key available: set to unavailable Actual key o Single bit in storage location: zero (free) or one (busy) Before process enters critical region o Tests condition code using TS instruction o No other process in region Process proceeds Condition code changed from zero to one Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. P1 exits: May codenotreset to zero, be scanned, allowing copied othersorto or duplicated, enter posted to a publicly accessible website, in whole or in part. 24 Test-and-Set (2 of 2) Advantages o Simple procedure to implement o Works well for small number of processes Drawbacks o Starvation Many processes waiting to enter a critical region Processes gain access in arbitrary fashion o Busy waiting Waiting processes remain in unproductive, resource-consuming wait loops Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 25 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. WAIT and SIGNAL Modification of test-and-set o Designed to remove busy waiting Two new mutually exclusive operations o WAIT and SIGNAL o Part of Process Scheduler’s operations WAIT o Activated when process encounters busy condition code SIGNAL o Activated when process exits critical region and condition code set to “free” Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 26 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Semaphores (1 of 5) Nonnegative integer variable o Flag (binary signal) o Signals if and when resource is free Resource can be used by a process Two operations of semaphore: introduced by Dijkstra (1965) o P (proberen means “to test”) o V (verhogen means “to increment”) Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 27 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Semaphores (2 of 5) (figure 6.4) The semaphore used by railroads indicates whether your train can proceed. When it’s lowered (a), another train is approaching and your train must stop to wait for it to pass. If it is raised (b), your train can continue. © Cengage Learning 2018 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 28 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Semaphores (3 of 5) Let s be a semaphore variable o V(s): s: = s + 1 Fetch, increment, store sequence o P(s): If s > 0, then s: = s −1 Test, fetch, decrement, store sequence s = 0 implies busy critical region o Process calling on P operation must wait until s > 0 Waiting job of choice processed next o Depends on process scheduler algorithm Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 29 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Semaphores State Calling Running in Results Operation Value of s (4 of 5) number 0 Process none none Critical Region Blocked on s 1 (table 6.3) 1 P1 test P1 0 The sequence of states 2 P1 increment 1 for four processes (P1, 3 P2 test P2 0 P2, P3, P4) calling test and increment (P and 4 P3 test P2 P3 0 V) operations on the binary semaphore s. 5 P4 test P2 P3, P4 0 (Note: The value of the 6 P2 increment P3 P4 0 semaphore before the operation is shown on 7 P3 P4 0 the line preceding the operation. The current 8 P3 increment P4 0 value is on the same 9 P4 increment 1 line.) © Cengage Learning 2018 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 30 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. P and V operations on semaphore s Enforce mutual exclusion concept Semaphore called mutex (MUTual EXclusion) Semapho P(mutex): if mutex > 0 then mutex: = mutex − 1 res (5 of V(mutex): mutex: = mutex + 1 Critical region 5) Ensures parallel processes modify shared data only while in critical region Parallel computations Mutual exclusion explicitly stated and maintained Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 31 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Several processes work together to complete common task Each case requires Process Mutual exclusion and synchronization Cooperati Examples on Producers and consumers problem Readers and writers problem Each case implemented using semaphores Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 32 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. One process produces data Another process later consumes Produce data Example: C P U and rs and printer buffer Delay producer: buffer full Consum Delay consumer: buffer empty Implemented by two ers (1 of semaphores Number of full positions 3) Number of empty positions Mutex Third semaphore: ensures mutual exclusion between Mchoes/Flynn, Understanding Operating Systems, 8 Edition. © 2018 Cengage. All Rights Reserved. th processes May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 33 Producers and Consumers (2 of 3) (figure 6.6) Four snapshots of a single buffer in four states: from completely empty at system initialization (a) to almost full (d). © Cengage Learning 2018 34 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Producers and Consumers (3 of 3) (figure 6.7) A typical system with one producer, one consumer, and a single buffer. © Cengage Learning 2018 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 35 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Formulated by Readers Courtois, Heymans, and Parnas (19 71) and Writers Two process types need to access shared (1 of 2) resource, e.g., file or database Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 36 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Example: airline reservation system Implemented using two semaphores Readers Ensures mutual exclusion between readers and writers and Resource given to all readers Provided no writers are Writers (2 processing (W2 = 0) Resource given to a writer of 2) Provided no readers are reading (R2 = 0) and no writers writing (W2 = 0) 37 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Another type of multiprocessing Concurren Concurrent processing system t One job uses several processors Executes sets of instructions in Programm parallel ing (1 of Requires programming language and Two broad computer categories system support of 2) parallel systems Data level parallelism (D L P) Instruction (or task) level parallelism (I L P) Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 38 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Concurrent Programming (2 of 2) Opportunities for parallelism o SISD: few if any o MISD: might allow instruction level parallelism; little or no data level parallelism without additional software o SIMD: multiple data streams o MIMD: both instruction level and data level parallelism Number of Instructions Number of Instructions for Single Instruction for Multiple Instruction Single data SISD MISD Multiple data SIMD MIMD Mchoes/Flynn, Understanding Operating Systems, 8 Edition. © 2018 Cengage. All Rights Reserved. th 39 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Amdahl’s Law (figure 6.8) Amdahl’s Law. Notice that all four graphs level off and there is no speed difference even though the number of processors increased from 2,048 to 65,536 (Amdahl, 19 67). Photo Source: Wikipedia among many others http://vi.wikipedia.org/wiki/T% E1%BA%ADp_tin:AmdahlsLaw.png. © Cengage Learning 2018 40 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Precedence of operations or rules of precedence Solving an equation–all arithmetic calculations performed from the left Order of and in the following order: Perform all calculations in Operation parentheses Calculate all exponents s (1 of 2) Perform all multiplications and divisions: resolved from the left Perform all additions and subtractions: resolved from the left 41 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Order of Operations (2 of 2) Z 10  A / B  C(D  E) * *(F  G) (table 6.5) The sequential computation of the expression requires several steps. In this example, there are six steps, but each step, such as the last one, may involve more than one machine operation. © Cengage Learning 2018 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 42 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Applications of Concurrent Programming (1 of 2) (figure 6.9) Using three C P Us and the COBEGIN command, this six-step equation can be resolved in these three steps. 4 © Cengage Learning 2018 3 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Applicatio Reducing complexity via concurrent ns of programming Concurren Case 1: array operations Case 2: matrix multiplication t Case 3: sorting and merging files Programm Case 4: data mining ing (2 of 2) 44 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Threads and Concurrent Programming (1 of 2) Threads: lightweight Minimizes overhead Each active process Shares data area and processes thread resources allocated to Smaller unit within process Swapping process between Processor registers, program its process Scheduled and executed main memory and secondary counter, stack, and status storage 45 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Threads Web server: improved performance and and interactivity with threads Requests for images or pages: Concurren each served with a different thread t After thread’s task completed: Programm thread returned to pool for assignment to another task ing (2 of 2) 46 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Ada Language First language providing Two specific concurrency Concurren commands Developed in late 19 70’s t A D A 2012: International Programm Standards Organization (I S O) standard replacing A D A 2005 ing Java Language Designed as universal Internet s application software platform Allows programmers to code applications that can run on any computer Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 47 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Developed at Sun Microsystems, Inc. (19 95) Solves several issues High software development costs Java for different incompatible computer architectures Distributed client-server environment needs Uses compiler Internet and and World Wide Web interpreter growth Easy to distribute Java applications Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 48 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Software only platform Runs on top of other hardware- The based platforms Java Two components Java Virtual Machine (Java V M) Platfor Foundation for Java platform Contains the interpreter m (1 of Runs compiled bytecodes Java application programming 2) interface (Java A P I) Collection of software modules Grouped into libraries by classes and interfaces Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 49 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. The Java Platform (2 of 2) (figure 6.12) A process used by the Java platform to shield a Java program from a computer’s hardware. © Cengage Learning 2018 50 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Designed for experienced programmers (similar to C++) Object oriented The Java Exploits modern software development Language methods Fits into distributed client-server applications Environm Memory allocation features Done at run time ent (1 of References memory via symbolic “handles” 2) Translated to real memory addresses at run time Not visible to programmers 51 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Security Built-in feature The Java Language and run-time system Checking Language Compile-time and run-time Environm Sophisticated synchronization capabilities ent (2 of Multithreading at language level 2) Popular features Single program runs on various platforms; robust feature set; Internet and Web integration Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 52 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Conclusion (1 of 3) Multiprocessing Single-processor systems Interacting processes obtain control of C P U at different times Systems with two or more C P Us Control synchronized by processor manager Processor communication and cooperation System configuration Master/slave, loosely coupled, and symmetric 53 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Multiprocessing: several configurations Single-processor with Multiple processors: synchronized by Process interacting processes Manager Conclusi on (2 of Mutual exclusion Prevents deadlock Maintained with test-and-set, WAIT and SIGNAL, and 3) semaphores (P, V, and mutex) Synchronize processes using hardware and software mechanisms Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. 54 May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Conclusion (3 of 3) Avoid typical problems of Concurrent processing synchronization innovations Missed waiting customers Threads and multi-core processors Synchronization of producers and consumers Mutual exclusion of readers and writers 55 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Use Quizgecko on...
Browser
Browser