Matakuliah Tahun Versi/Revisi : T0316/sistem Operasi : 2005 :5 Pertemuan 15 Modelling Page Replacement Algorithm 1 Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : • menjelaskan permodelan algoritma pergantian page dan memprediksi page fault (C2) 2 Outline Materi • • • • Belady's Anomali Stack Algorithm Distance String Memprediksi Page fault 3 Modeling Page Replacement Algorithms Belady's Anomaly • FIFO with 3 page frames • FIFO with 4 page frames • P's show which page references show page faults 4 Stack Algorithms 7 4 6 5 State of memory array, M, after each item in reference string is processed 5 Stack Algorithms (2) …r… n m • Stack algorithm has the property of M(m, r) M(m+1, r) where • • • • M internal array m number of page frames n virtual pages r index into the reference string The set of pages included in the top part of M for a memory with m page frames after r memory references are also included in M for a memory with m+1 page frames LRU has this property but FIFO does not 6 This algorithm do not suffer from Belady’s Anomaly The Distance String Probability density functions for two hypothetical distance strings 7 The Distance String 20 3 17 3 14 3 11 9 1 8 0 • Computation of page fault rate from distance string – the C vector – the F vector 8
© Copyright 2026 Paperzz