tailieunhanh - distributed operating system phần 7

Lệnh này được sử dụng để sửa đổi proprieties của thiết bị và không phải là địa chỉ IP. Các địa chỉ IP có thể được cấu hình bằng cách sử dụng lệnh ip addr. Lệnh này có thể được sử dụng để thêm một địa chỉ (bí danh) tiểu học hay trung IP đến một thiết bị mạng (ip addr thêm), | SEC. SHARED-VARIABLE DISTRIBUTED SHARED MEMORY 355 Implementation When a critical section is entered the Midway runtime system must first acquire the corresponding lock. To get an exclusive lock it is necessary to locate the lock s owner which is the last process to acquire it exclusively. Each process keeps track of the probable owner the same way that IVY and Munin do and follows the distributed chain of successive owners until the current one is found. If this process is not currently using the lock ownership is transferred. If the lock is in use the requesting process is made to wait until the lock is free. To acquire a lock in nonexclusive mode it is sufficient to contact any process currently holding it. Barriers are handled by a centralized barrier manager. At the same time the lock is acquired the acquiring process brings its copy of all the shared variables up to date. In the simplest protocol the old owner would just send them all. However Midway uses an optimization to reduce the amount of data that must be transferred. Suppose that this acquire is being done at time T J and the previous acquire done by the same process was done at Tq . Only those variables that have been modified since T0 are transferred since the acquirer already has the rest. This strategy brings up the issue of how the system keeps track of what has been modified and when. To keep track of which shared variables have been changed a special compiler can be used that generates code to maintain a runtime table with an entry in it for each shared variable in the program. Whenever a shared variable is updated the change is noted in the table. If this special compiler is not available the MMƯ hardware is used to detect writes to shared data as in Munin. The time of each change is kept track of using a timestamp protocol based on Lamport s 1978 happens before relation. Each machine maintains a logical clock which is incremented whenever a message is sent and included in the message. .

TỪ KHÓA LIÊN QUAN