[20/20/20/20] < 5.3 > hiệu suất của một snooping cache mạch lạc sựphụ thuộc vào nhiều vấn đề chi tiết thực hiện xác định một cách nhanh chóngmột bộ nhớ cache phản ứng với các dữ liệu trong một độc quyền hoặc M nhà nước khối. Trong một số hiện thực,một CPU lỡ đọc vào một khối bộ nhớ cache là độc quyền trong một bộ xử lýCon số 5,35 Multicore (point-to-point) sự.P0 P1 P3. . . . .B0B1B2B3B0B1B2B3B0B1B2B3Tôi 100Sự liên lạc bangSự liên lạc bangĐịa chỉ thẻ dữ liệuSự liên lạc bangĐịa chỉ thẻ dữ liệu0000000000000000Dữ liệu00000000100830101068101820081010108110118100128110118Bộ nhớDây tín hiệu (với quản lý sự liên lạc) trên chipĐịa chỉ từ khóa120108110118SMTôiTôiMTôiSSSTôiTôiDữ liệu địa chỉ....100108110118120128130.......00000000000000.......10081018202830...414 ■ chương năm Thread cấp xử lý song songbộ nhớ cache là nhanh hơn so với một Hoa hậu vào một khối trong bộ nhớ. Điều này là do cachenhỏ hơn, và vì vậy nhanh hơn, so với bộ nhớ chính. Ngược lại, ở một số hiện thực,lỡ hài lòng bởi bộ nhớ nhanh hơn so với những người hài lòng bởi cache. Điều nàybởi vì lưu trữ thường được tối ưu hóa cho "trước mặt" hoặc CPU tài liệu tham khảo,thay vì "trở mặt" hoặc snooping truy cập. Cho sự minh họa trongCon số 5,35, xem xét thực hiện một chuỗi các hoạt động trên một CPU đơnnơi■ CPU đọc và viết số truy cập tạo ra không có chu kỳ gian hàng.■ CPU read and write misses generate Nmemory and Ncache stall cycles if satisfiedby memory and cache, respectively.■ CPU write hits that generate an invalidate incur Ninvalidate stall cycles.■ A write-back of a block, due to either a conflict or another processor’srequest to an exclusive block, incurs an additional Nwriteback stall cycles.Consider two implementations with different performance characteristics summarizedin Figure 5.36. Consider the following sequence of operations assumingthe initial cache state in Figure 5.35. For simplicity, assume that the secondoperation begins after the first completes (even though they are on differentprocessors):P1: read 110P3: read 110For Implementation 1, the first read generates 50 stall cycles because the read issatisfied by P0’s cache. P1 stalls for 40 cycles while it waits for the block, and P0stalls for 10 cycles while it writes the block back to memory in response to P1’srequest. Thus, the second read by P3 generates 100 stall cycles because its miss issatisfied by memory, and this sequence generates a total of 150 stall cycles. Forthe following sequences of operations, how many stall cycles are generated byeach implementation?
đang được dịch, vui lòng đợi..
