1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

CAR: CLOCK with ADAPTIVE REPLACEMENT pdf

61 245 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 61
Dung lượng 1,94 MB

Nội dung

FAST 2004, San Francisco, CA CAR: Bansal & Modha April 2, 2004 © 2003 IBM Corporation CAR: CLOCK with ADAPTIVE REPLACEMENT Sorav Bansal, Stanford University Dharmendra S. Modha, IBM Research CAR: Bansal & Modha © 2003 IBM Corporation FAST 2004, San Francisco, CA April 2, 2004 The Caching Problem expensive, but fast cheap, but slow How to manage the cache? Assume demand paging: Which page to replace? How to maximize the hit ratio? CAR: Bansal & Modha © 2003 IBM Corporation FAST 2004, San Francisco, CA April 2, 2004 ☺ Constant Time ☺ Recency L R U CAR: Bansal & Modha © 2003 IBM Corporation FAST 2004, San Francisco, CA April 2, 2004 “Frequency” Scan Resistance ☺ Constant Time ☺ Recency L R U CAR: Bansal & Modha © 2003 IBM Corporation FAST 2004, San Francisco, CA April 2, 2004 ☺ “Frequency” ☺ Scan Resistance ☺ Constant Time ☺ Recency L F U L R U CAR: Bansal & Modha © 2003 IBM Corporation FAST 2004, San Francisco, CA April 2, 2004 ☺ ☺ “Frequency” ☺☺ Scan Resistance ☺☺ Constant Time ☺☺ Recency A R C L F U L R U CAR: Bansal & Modha © 2003 IBM Corporation FAST 2004, San Francisco, CA April 2, 2004 ☺ ☺ “Frequency” Lock Contention/ MRU Overhead ☺☺ Scan Resistance ☺☺ Constant Time ☺☺ Recency A R C L F U L R U CAR: Bansal & Modha © 2003 IBM Corporation FAST 2004, San Francisco, CA April 2, 2004 “In Multics a paging algorithm has been developed that has the implementation ease and low overhead of the FIFO and is an approximation to LRU.” Fernando J. Corbato, 1990 Turing Award Winner CAR: Bansal & Modha © 2003 IBM Corporation FAST 2004, San Francisco, CA April 2, 2004 ☺ ☺ “Frequency” ☺ Lock Contention/ MRU Overhead ☺☺ Scan Resistance ☺☺☺ Constant Time ☺☺☺ Recency C L O C K A R C L F U L R U CAR: Bansal & Modha © 2003 IBM Corporation FAST 2004, San Francisco, CA April 2, 2004 0 0 1 0 1 00 0 1 1 0 0 1 0 1 0 1 11 0 1 1 0 1 TAIL HE AD CLOCK [...]... Francisco, CA April 2, 2004 © 2003 IBM Corporation CAR: Bansal & Modha Prior Work on LRU versus CLOCK LRU CLOCK – (LFU) – GCLOCK – FBR – Two-handed CLOCK – LRU-2 – 2Q – LRFU – LIRS – MQ – ARC FAST 2004, San Francisco, CA 1968 April 2, 2004 © 2003 IBM Corporation CAR: Bansal & Modha Prior Work on LRU versus CLOCK LRU CLOCK – (LFU) – GCLOCK – FBR – Two-handed CLOCK – LRU-2 – 2Q – LRFU – LIRS – MQ – ARC FAST... 2004 © 2003 IBM Corporation CAR: Bansal & Modha CLOCK Applications and Exposition Multics Major OS Textbooks UNIX/AIX/LINUX/BSD – Tanebaum & Woodhull VAX/VMS – Silberschatz & Galvin DB2 Oracle? Windows? Solaris? FAST 2004, San Francisco, CA April 2, 2004 © 2003 IBM Corporation CAR: Bansal & Modha Prior Work on LRU versus CLOCK LRU CLOCK – (LFU) – GCLOCK – FBR – Two-handed CLOCK – LRU-2 – 2Q – LRFU –... 1.10 2.20 4.27 8.20 15.07 26.12 41.83 57.64 71.77 87.26 © 2003 IBM Corporation CAR: Bansal & Modha P1 64 32 16 Hit Ratio (%) CAR 8 CLOCK 4 2 1 1024 4096 FAST 2004, San Francisco, CA 16384 65536 Cache Size (Number of 512 byte pages) April 2, 2004 262144 © 2003 IBM Corporation CAR: Bansal & Modha P2 64 Hit Ratio (%) 32 16 CAR CLOCK 8 4 1024 4096 FAST 2004, San Francisco, CA 16384 65536 Cache Size (Number... B2 April 2, 2004 © 2003 IBM Corporation CAR: Bansal & Modha "Frequency" "Recency" T2 0 0 1 0 0 1 TAIL HEAD 0 0 0 1 0 0 1 1 1 1 MRU 0 1 T1 1 0 MRU 0 0 0 TAIL 1 1 HEAD 0 1 0 1 1 1 0 1 LRU 1 1 0 LRU B1 B2 CLOCKs T1 and T2 contain cache pages LRU lists B1 and B2 contain recently evicted history pages FAST 2004, San Francisco, CA April 2, 2004 © 2003 IBM Corporation CAR: Bansal & Modha "Frequency" "Recency"... B2 Maintain a target size for CLOCK T1 FAST 2004, San Francisco, CA April 2, 2004 © 2003 IBM Corporation CAR: Bansal & Modha "Frequency" "Recency" T2 0 0 MRU 0 1 0 0 0 0 1 1 TAIL HEAD 0 0 1 1 1 1 0 1 T1 1 0 MRU 0 0 0 TAIL 1 1 HEAD 0 1 0 1 1 1 0 1 LRU 1 1 0 LRU B1 B2 HIT in T1 or T2: Set reference bit to “1” FAST 2004, San Francisco, CA April 2, 2004 © 2003 IBM Corporation CAR: Bansal & Modha "Frequency"... Francisco, CA April 2, 2004 © 2003 IBM Corporation CAR: Bansal & Modha "Frequency" "Recency" T2 0 0 MRU 0 1 0 0 0 0 1 1 TAIL HEAD 0 0 1 1 1 1 0 1 T1 1 0 MRU 0 0 0 TAIL 1 1 HEAD 0 1 0 1 1 1 0 1 LRU 1 1 0 LRU B1 B2 CACHE REPLACEMENT POLICY: Replace from T1 if larger than target; else from T2 FAST 2004, San Francisco, CA April 2, 2004 © 2003 IBM Corporation CAR: Bansal & Modha "Frequency" "Recency" T2 0 0... 1 1 0 1 LRU 1 1 0 LRU B1 B2 During replacement in T1, if “1” page is found, make “0” and move to T2 TAIL, move evicted page to B1 FAST 2004, San Francisco, CA April 2, 2004 © 2003 IBM Corporation CAR: Bansal & Modha "Frequency" "Recency" T2 0 0 MRU 0 1 0 0 0 0 1 1 TAIL HEAD 0 0 1 1 1 1 0 1 T1 1 0 MRU 0 0 0 TAIL 1 1 HEAD 0 1 0 1 1 1 0 1 LRU 1 1 0 LRU B1 B2 During replacement in T2, if “1” page is found,... Francisco, CA April 2, 2004 © 2003 IBM Corporation CAR: Bansal & Modha "Frequency" "Recency" T2 0 0 MRU 0 1 0 0 0 0 1 1 TAIL HEAD 0 0 1 1 1 1 0 1 T1 1 0 MRU 0 0 0 TAIL 1 1 HEAD 0 1 0 1 1 1 0 1 LRU 1 1 0 LRU B1 B2 DIRECTORY REPLACEMENT POLICY: Replace from B1 if T1+B1 = c; else from B2 FAST 2004, San Francisco, CA April 2, 2004 © 2003 IBM Corporation CAR: Bansal & Modha P4 32768 Target Size for List... Francisco, CA CLOCK 0.37 0.77 1.63 3.64 9.31 ARC 0.82 1.62 3.23 7.56 20.00 April 2, 2004 CAR 0.84 1.66 3.29 7.62 20.00 CART 0.90 1.78 3.56 8.52 21.90 © 2003 IBM Corporation CAR: Bansal & Modha Merge(S) Workload Cache Size (4k Pages) 16384 32768 65536 131072 262144 524288 1048576 1572864 2097152 4194304 LRU 0.20 0.40 0.79 1.59 3.23 8.06 27.62 50.86 68.68 87.30 FAST 2004, San Francisco, CA CLOCK 0.20 0.40.. .CAR: Bansal & Modha C LOCK 0 0 0 1 1 0 1 1 0 0 0 0 TAIL 1 1 HE A D 0 0 1 1 1 0 1 1 1 0 HIT: Set the reference bit to “1” MISS: Insert at the TAIL, initialize the reference bit to “0” FAST 2004, San Francisco, CA April 2, 2004 © 2003 IBM Corporation CAR: Bansal & Modha C LOCK 0 0 0 1 1 0 1 1 0 0 0 0 TAIL 1 1 HE A D 0 0 1 1 1 0 1 1 1 0 REPLACEMENT POLICY: Evict the first . FAST 2004, San Francisco, CA CAR: Bansal & Modha April 2, 2004 © 2003 IBM Corporation CAR: CLOCK with ADAPTIVE REPLACEMENT Sorav Bansal, Stanford. 2004 Prior Work on LRU versus CLOCK  CLOCK – GCLOCK – Two-handed CLOCK  LRU – (LFU) – FBR – LRU-2 – 2Q – LRFU – LIRS – MQ – ARC 1968 CAR: Bansal & Modha ©

Ngày đăng: 16/03/2014, 12:20

TỪ KHÓA LIÊN QUAN