Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the paging problem. Consider the following randomized online algorith Algorithm Description: Each page P has an associated bit denoting whether the page is FRESH

image text in transcribed

Consider the paging problem. Consider the following randomized online algorith Algorithm Description: Each page P has an associated bit denoting whether the page is FRESH or STALE. If requested page P in fast memory, then P's associated bit is set to FRESH. If the requested page P is not in fast memory, then a STALE page is selected uniformly at random from the STALE pages in fast memory and ejected, and P's associated bit is set to FRESH. If the request page P is not in fast memory, and all pages in fast memory are FRESH, then make all pages in fast memory STALE, select a STALE page uniformly at random from the STALE pages in fast memory to evict, and P associated bit is set to FRESH Show that this algorithm is O(log k) competitive/approximate using the following strat- egy (recall k is the size of the fast memory). Partition the input sequence into consed- utive subsequences/phases where there are exactly k distinct pages requested in each subsequence/phase. The phase breaks are when all pages in fast memory are made STALE. Let mi be the number of pages requested in phasei that were not requested in phase i 1 (a) Show that the optimal number of page faults is ??.m) (b) Show that the expected number of page faults for the randomized algorithm on the page requests in phase i is O(mi log k) Consider the paging problem. Consider the following randomized online algorith Algorithm Description: Each page P has an associated bit denoting whether the page is FRESH or STALE. If requested page P in fast memory, then P's associated bit is set to FRESH. If the requested page P is not in fast memory, then a STALE page is selected uniformly at random from the STALE pages in fast memory and ejected, and P's associated bit is set to FRESH. If the request page P is not in fast memory, and all pages in fast memory are FRESH, then make all pages in fast memory STALE, select a STALE page uniformly at random from the STALE pages in fast memory to evict, and P associated bit is set to FRESH Show that this algorithm is O(log k) competitive/approximate using the following strat- egy (recall k is the size of the fast memory). Partition the input sequence into consed- utive subsequences/phases where there are exactly k distinct pages requested in each subsequence/phase. The phase breaks are when all pages in fast memory are made STALE. Let mi be the number of pages requested in phasei that were not requested in phase i 1 (a) Show that the optimal number of page faults is ??.m) (b) Show that the expected number of page faults for the randomized algorithm on the page requests in phase i is O(mi log k)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

The normal balance of an expense account is a credit

Answered: 1 week ago

Question

What does the start( ) method defined by Thread do?

Answered: 1 week ago