Kết hợp cache và bộ nhớ ảo. Một truy cập:
1 - miss_rate): thời gian = hit_time.pf_rate xảy ra page fault (thời gian pf_time), còn lại truy cập bộ nhớ bình thường (mem_time).EAT = hit_time + miss_rate * ( (1 - pf_rate)*mem_time + pf_rate*pf_time )
In với 2 chữ số thập phân.
Ví dụ: hit=1, mr=0.1, pf=0.001, mem=100, pf_time=1000000 → EAT = 1 + 0.1*(0.999100 + 0.0011000000) = 1 + 0.1*(99.9 + 1000) = 111.99.
Một dòng: hit_time miss_rate pf_rate mem_time pf_time.
miss_rate, pf_rate trong [0,1]; giá trị không âm.
Một dòng: EAT làm tròn 2 chữ số thập phân.
Ví dụ:
Đầu vào:
1 0.1 0.001 100 1000000
Đầu ra:
110.99
Giải thích:
Đang tải editor...