tailieunhanh - Lecture Operating systems: A concept-based approach (2/e): Chapter 9 - Dhananjay M. Dhamdhere

Chapter 9 - Process synchronization. This chapter discusses the synchronization requirements of some classic problems in process synchronization and discusses how they can be met by using synchronization features such as semaphores and monitors provided in programming languages and operating systems. | PROPRIETARY MATERIAL. © 2007 The McGraw-Hill Companies, Inc. All rights reserved. No part of this PowerPoint slide may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this PowerPoint slide, you are using it without permission. Process Synchronization Processes that work toward a common goal must coordinate their activities Such coordination is achieved through synchronization We discuss two kinds of synchronization defined in Chapter 3 Data access synchronization Avoiding race conditions through mutual exclusion Control synchronization Ensuring that processes perform their actions in a desired order Interacting processes Definition: Processes Pi, Pj are interacting processes if read_seti ∩ write_setj ≠ Ø or write_seti ∩ read_setj ≠ Ø, where Read-set : . | PROPRIETARY MATERIAL. © 2007 The McGraw-Hill Companies, Inc. All rights reserved. No part of this PowerPoint slide may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this PowerPoint slide, you are using it without permission. Process Synchronization Processes that work toward a common goal must coordinate their activities Such coordination is achieved through synchronization We discuss two kinds of synchronization defined in Chapter 3 Data access synchronization Avoiding race conditions through mutual exclusion Control synchronization Ensuring that processes perform their actions in a desired order Interacting processes Definition: Processes Pi, Pj are interacting processes if read_seti ∩ write_setj ≠ Ø or write_seti ∩ read_setj ≠ Ø, where Read-set : Set of variables merely read by a process Write-set : Set of variables read and written to by a process Non-interacting processes are independent processes Critical Section (CS) Definition A critical section (CS) for a data item ds is a section of code that cannot be executed concurrently with itself or with another critical section for ds We will use a dashed rectangular box to indicate a critical section in a code segment (see next slide) Data access synchronization Is defined as ensuring an absence of race conditions over a shared data item ds It is achieved by enclosing all uses of ds within critical sections A process having critical sections We assume a process to consist of a single infinite loop; a dashed rectangular box depicts a critical section (a) A process having many critical sections (b) A process having a single critical section Use of CS in airline reservation to avoid race conditions All processes have an identical form nextseatno is examined and incremented within a .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.