Computer Science, asked by ingalebhupen5013, 1 year ago

Suppose that in-memory pointers are either not followed (probability 1 - p) or are followed k times (probability p) . For what values of k and p do not swizzling, automatic-swizzling, and on-demand-swizzling each offer the best average performance

Answers

Answered by vikrantdeshwal2
0

n = No.of pointers p = Probability k = No. of times to follow the pointer. No Swizzling: Total performance = n * p * k * 10 = 10 npk Automatic Swizzling: Cost to swizzle n pointers = 20 * n No.of Pointers * Time to follow 1 swizzled pointer * No.of times to follow the pointer * Probability of following it = npk Hence the total time (auto-swizzling+following) = 20n + npk.

Similar questions