EE6762. BROADBAND NETWORKS Project Report: Caching

Size: px
Start display at page:

Download "EE6762. BROADBAND NETWORKS Project Report: Caching"

Transcription

1 EE6762 BROADBAND NETWORKS Project Report: Caching Andreas Constantinides Due date: 05/ 11/ 2002

2 1 Introduction According to Knuth [1], the basic idea of caching is to maintain high-speed access to h items from a larger collection of d items that cannot all be accessed so quickly. The caching concept has been widely applied, to both computer systems and to the World Wide Web as caches are among the simplest and most effective ways to improve performance. This report aims to capture a snapshot of the two different flavors of caching, and how caching is used to improve the performance of the two systems (computer, WWW) under study. 2 Computer Caching 2.1 Memory Hierarchy In computer systems, cache memories are small, high-speed buffer memories used to hold temporarily those portions of the contents of main memory which are (believed to be) currently in use. Figure 1 shows a generic block diagram [2] for a memory hierarchy in a computer system. CPU CACHE MAIN MEMORY HARD DISK Figure 1: Memory Hierarchy As we can see from the above figure, the lowest level of the hierarchy is a small, fast memory called a cache. For the hierarchy to function well, a very large proportion of the CPU instruction and operand fetches are expected to be from the cache. At the next level of the hierarchy is the main memory. The main memory serves directly most of the CPU instruction and operand fetches 1

3 not satisfied by the cache. In addition, the cache fetches all of its data, some portion of which it is passed on to the CPU, from the main memory. At the top level of the hierarchy, is the hard disk, which is accessed only in the infrequent cases in which a CPU instruction or operand fetch is not found in main memory. With this memory hierarchy, since the CPU fetches most of the instructions from the cache, it sees a fast memory, most of the time. From this point on I will refer to both instructions and operands as pages. When the CPU is to fetch a page in main memory, the page may come from the cache or the main memory. First, the system checks the cache to see if it has the page. If the cache contains the page to be fetched, then we have a cache hit, and if the cache does not contain the page to be fetched, then we have a cache miss. 2.2 Performance Measures for Caching The two most important performance measures used in caching are miss ratio, m, and average memory access time, T avg, and are defined as follows: Miss Ratio, m # of cache miss # of memory requests T avg ~ t cache + m.t main-mem where t cache is the time the CPU takes to fetch a page from the cache, and t main-mem is the time it takes to fetch a page from the main memory to the cache memory. At this point a simple numerical example can show the effectiveness of caching. Assume that t main-mem =100ns and t cache =10ns. The average memory access time is as follows: Without caching: T avg ~ 100ns With caching: T avg ~ 10ns+0.1(100ns) = 20ns As we can see, caching reduces average memory access time by a factor of five. 2.3 Performance Evaluation Methods Agarwal [3] says that the primary tools for the study of caches are: (1) Hardware measurement, (2) analytical models and (3) trace-driven simulation (TDS). Hardware measurement, an expensive technique, involves instrumenting an existing system and observing the performance of the cache. This scheme is very inflexible because the cache parameters cannot be easily varied 2

4 and as such generates only a posteriori information on a design. Analytical models of caches estimate cache performance quickly at the cost of accuracy, but mathematical models can be used to suggest useful ways of improving cache performance by changing the cache organization, or the program structure after studying program-cache interactions. Out of the three performance evaluation methods mentioned above, trace-driven simulation is perhaps the most popular. TDS evaluates a model of a proposed system using previously recorded address traces as the external stimuli. Address traces are streams of addresses generated during the execution of computer programs. TDS involves studying the effects of varying the input trace and model parameters on the behavior of the model outputs. Its advantages include flexibility, accuracy and ease of use. 2.4 Locality of Reference Przybylski [4] observes that the success of caches in reducing the average memory access time relies on a high probability that a requested page is contained in the cache that is, that it was used or generated recently. He also observes that program traces exhibit spatial and temporal locality which are defined as follows: Spatial locality is defined as the likelihood that two items adjacent in main memory will be needed within a short span of time of each other and temporal locality is defined as the expectation that instructions and data that are currently in use will be referenced again soon. In fact caches are successful, because programs generally exhibit good spatial and temporal locality. 2.5 Overview of computer caching analytical models As the focus of my project is web caching I will only briefly talk about the analytical computer caching models. According to Przybylski [4], the models found in the literature vary immensely in their complexity and applicability. The range is from the straightforward, probabilistic model of just a few terms and parameters that Smith uses [5] to more sophisticated models involving measured and derived input parameters (Agarwal et al. [6]). In general, the greater the need for accuracy, reliability and a large range of applicability, the more complex the equations and reasoning behind them. A definite elegant exception to the rule is the power law model developed by Singh et al [7]. The 3

5 authors of this paper begin by analyzing the number of unique pages referenced as a function of time. This rate is independent of the cache size. The miss ratio is just the time derivative of this function evaluated at the appropriate point. This yields a surprisingly accurate model for medium to large fully-associative (an arrangement into which computer caches are organized) caches. The model only contains four parameters, which are measures of the working set size (defined by Coffman and Denning [8] as smallest subset of its pages that must be in main memory at any given time in order to guarantee the task a specified level of processing efficiency), the temporal and spatial localities of reference and the interaction between the two localities of reference. Most significantly, it shows a power relationship between the cache size and the miss ratio. 3 Web Caching 3.1 Generic WWW caching system Wang in [9] gives the following figure as a generic WWW caching system: Web server proxy cooperation Clients Clients Figure 2: A generic WWW caching system 4

6 Wang identifies that the World Wide Web (WWW) is one of the most popular applications of the internet and is of an exponential growth in size, which results in network congestion and server overloading. In fact, web caching has been recognized one of the most effective schemes to reduce the network traffic and hence minimize the user access latency. Going back to the above generic caching system for the WWW, documents can be cached at the clients, the proxies and the servers. If a client does not have a valid copy of the requested page in its own browser s cache, it requests the page from its local proxy. When the proxy receives a page request from one of its clients, it first checks to see if it has the requested page and if it has it, it returns the page to the client. Now, if it does not have the page in its cache, the proxy sends a request to its cooperative proxy caches(assuming of course that neighboring proxies cooperate). Upon receiving a request from another proxy, a proxy checks if it has the requested page. If it does, it returns the page to the requesting proxy. If not, the proxy may further forward the request to other proxies. Finally, if none of the cooperative proxies has such a page, the requested page is fetched from the web server. 3.2 Advantages/Disadvantages of Web caching The advantages of using Web caching include: 1. Web caching reduces bandwidth consumption, and hence decreases network traffic and lessens network congestion. 2. Web caching reduces access latency because: (a) frequently accessed documents are fetched from nearby proxies instead of remote web servers and (b) because of the reduction in network traffic, even the documents not cached can also be retrieved relatively faster than without caching due to less congestion along the network path and less workload at the server. 3. Web caching reduces the workload of the remote Web server by disseminating data among the proxy caches over the wide area network. 4. If the remote server is not available for any reason, the client can still obtain a cached copy at the proxy. Its disadvantages include: 1. The main disadvantage is that a client might be looking at stale data. 2. The access latency may increase in the case of a cache miss due to extra processing. 5

7 3. A single proxy is always a bottleneck. 4. A single proxy is a single point of failure. 3.3 Web caching design considerations. In order to build a caching system that would work, the following design considerations should be kept in mind: 1. How are the cache proxies organized, hierarchically, distributed or hybrid? (caching system architecture). 2. Where should we place a proxy cache in order to achieve optimal performance? (proxy placement). 3. What can be cached in the cache? Data, connection, or computation? (caching contents). 4. How does a proxy manage which page to be stored in its cache and which page to be removed from its cache? (cache placement and replacement) 5. How do proxies cooperate with each other? (proxy cooperation) 6. What kind of data can be shared among cooperative proxies? (data sharing) 7. How does a proxy maintain data consistency? 8. How should a proxy deal with data that is not cacheable? (dynamic data caching) In the next subsections, I will try to address some of these design considerations. 3.4 Page Replacement Algorithms Definitions of page replacement algorithms Coffman [8] gives the following definitions for some pager replacement algorithms: Least Recently Used(LRU) replace the page whose reference is furthest in the past. Belady s Optimal Algorithm (Belady [10]) replace the page whose reference is furthest in the future(this algorithm assumes knowledge of the future) Least Frequently Used(LFU) page replaced is the one that has received the least use(least number of references) First In First Out (FIFO) page replaced is the one having been in the memory for the longest time. Analysis of the above algorithms is usually done by assuming that the Independent 6

8 Reference Model holds for page requests Independent Reference Model IRM (Coffman [8]) Coffman says that according to the independence-reference assumption, the reference string r 1 r 2... r t... is a sequence of independent random variables with the common stationary distribution {b 1,...b m } such that: Pr [r t =i] =b i for all t=1, 1=i=m where m=total number of pages available. As Coffman comments, this model is not a realistic representation of program behavior because it cannot capture locality of reference. However, according to Rao [11], the IRM is widely used because: It is analytically tractable. It gives a good indication of relative performances. It predicts page fault rates reasonably well. Now, I will proceed by describing some results for the efficiency of page replacement policies that used probabilistic analysis. (Remember that another method, that we mentioned in class, for analyzing the page replacement algorithms is the competitive analysis first used by Sleator and Tarjan) King s result under LRU replacement In 1971, at the IFIP Congress, W. F. King III [12] proposed formulas for the probability D of page faults (the probability of a cache miss) of various policies under the Independent Reference Model. His formula for LRU replacement was: where k=cache size, and m=main memory size. As it can be seen, the above equation has exponential computational complexity and according to Flajolet [13] due to this complexity [Markov chain of limited to m=9, and k=7. m k states], King s numerical data are 7

9 3.4.4 Jelenkovic s Asymptotic Results [14] The main objective of this paper was to obtain an analytic asymptotic characterization of the MTF(Move To Front) search cost distribution function or, equivalently, the LRU(Least Recently Used) fault probabilities. A finite list of items n=1,..., N is considered that are requested according to the IRM. Each time we request an item it is moved to the front of the list (MTF). Asymptotically the probability distribution of a reference R and of the search cost C for MTF satisfy the following elegant relations: When the request has a heavy tail P[R=n] ~ c/ n a then the limiting search cost distribution satisfies the following relation: lim n p C P R n n 1 1 a 1 1 a a as a Now when the request distribution has a light tail: P R n c n lim n p Cf P R n n independently of c,?, ß, where Cf is a fluid approximation of C Knuth s result on Optimal Caching [1] In this paper of 1985, Knuth considered what happens when a cache is maintained clairvoyantly, that is to say with perfect knowledge of the future. As you may recall this is Belady s algorithm that we defined before as the algorithm that replaces the page whose reference is furthest in the future. For uniform reference distribution (IRM), Knuth showed that a cache of size k, applied optimally on an alphabet of size m, is able to avoid faults with probability of order (k/m)^0.5. A possible open problem, related to the one treated by Knuth, would be Belady s algorithm in the case of non-uniform reference probabilities A note on the Independent Reference Model As we have seen so far, most (if not all) analytical caching models rely on the Independent Reference Model. The IRM model is not designed to capture any localities of references and as a result it provides rather pessimistic miss ratios. However, according to Flajolet et al [13], Baskett and Rafii [15], back in 1976, showed that by introducing virtual probabilities that are computed in an appropriate way, one can obtain excellent agreement between observed and predicted 8

10 performance. Thus, this means that an actual caching system can be modeled accurately by the independent reference with modified access probabilities. 3.5 More Analytical results on web caching Breslau et al in [16] state that the following have been observed in previous studies: Under an infinite cache size, the hit ratio for a Web-proxy is proportional to the log of the client population of the proxy and the log of the number of requests seen by the proxy. The hit ratio of a Web cache is proportional to the log of the cache size. The probability that a document will be referenced k requests after it was last referenced is proportional to 1/k. In this paper they show that if one assumes that the references in the Web access stream are independent and the reference probability of the documents follow Zipf s law, then the above observed properties follow from Zipf s law. Their model is defined as follows: There is some cache that receives a stream of requests for Web pages. N is the total number of Web pages in the universe. P N (i), defined for i=1,, N, has a cut-off Zipf distribution given by: P N (i)= (O/i) where N i 1 1 i 1 Each page request is drawn independently from the Zipf distribution, so there are no correlations in the request stream. The other assumption is that no pages are invalidated by the cache. A simple probability analysis gives the following results: For infinite cache(ie. All requests remain in the cache) and finite request stream: In this case, they considered a finite request of R requests, and wished to determine the probability that the next request, the (R+1)th request, is a request for a page that already resides in the cache. The hit ratio H(R) can be calculated as follows. If the (R+1)th request is for page i then the probability that this page is in the cache is given by: (1-(1- P N (i)) R ) The asymptotic behavior of the hit-ratio is H(R)~Oln(OR). However, it was found that this approximation underestimates H(R). 9

11 For a finite cache with a capacity of C web pages subject to an infinitely long request stream, assuming that the cache holds the C most popular pages. In this case the asymptotic hit ratio H(C)~OlnC. This result is consistent with previously observed behavior that the hit-ratio increases logarithmically as a function of cache size. And finally asymptotically the page request interarrival times d(k) ~ 1/(kln(N)) as expected This model though has some limitations as it does not consider the cache s replacement policy, which plays a critical part in a cache s performance. Another simplification is the use of the IRM that affects the miss ratios as we have seen before. 3.6 Cooperative proxy caching (Wolman et al [17]) Another variant of caching that researchers have been looking at is cooperative proxy caching. In this paper, the authors used both trace-based analysis and analytic modeling to show the potential advantages and disadvantages of cooperative proxy caching. With their traces, they evaluated quantitatively the performance improvement potential of cooperation between 200 smallorganization proxies within a university environment, and between two large-organization proxies handling 23,000 and 60,000 clients respectively. Then with their model, they extended beyond these populations to project cooperative caching behavior in regions with millions of clients. Their main results were as follows: There is no reason to design highly scalable cooperative caches because the scale at which cooperative caching makes sense is sufficiently small (upto medium-sized city) that reasonable schemes will achieve most of the benefit. The largest benefit for cooperative caching is achieved for relatively small populations. Performance at the population level at which cooperative caching works effectively is basically limited by document cacheability. Cluster-based analysis of client access patterns indicates that cooperative caching organizations based on mutual interest offer no obvious advantages over randomly assigned or organization-based groupings. 10

12 4 Future Directions for Caching Research 4.1 Wireless (Kobayashi and Yu [18]): The authors of this paper first present a brief survey of the statistical properties of web requests that have been reported in the literature(such as document popularity, concentration of references, locality, etc. ). Then, they they construct a new analytical/numerical model that characterizes mobile use behavior in a general state-space using a semi-markov process representation. Based on the mobility model and the resultant request model, they analyze the content access patterns and then obtain estimates for: Total average latency Hit Ratio Cache capacity and bandwidth resources required for the wired and wireless network. Finally, they obtained expressions for the dynamic behavior of the aggregate request rate and the aggregate traffic rate. 4.2 Peer-to-peer caching to address Flash crowds(stading et al. [19]) In this paper, that was presented early in 2002, Stading et al. observe that flash crowds can cripple a website s performance. The definition of flash crowds is the unanticipated, massive, rapid increase in the populariy of a resource, such as a web page, that lasts for a short amount of time. This paper introduces Backslash, a web content distribution system based on peer-to-peer caching. This form of caching is based on the concept of cooperative caching that we have looked at before. The objective of the Backslash system is to offer fair load distribution in the face of flash crowds, with the primary interest being to limit the load on any participating node so as not to overwhelm it, by distributing requests among as many participants as possible. So, when a resource experiences an uncharacteristically high request load, the Backslash system redirects requests for that resource uniformly to the created caches by using distributed hash tables. In this way, Backslash helps alleviate the effects of flash crowds. This system solution is addressed to websites which do not generally expect flash crowds, and cannot afford the cost of high-profile content distribution solutions. 11

13 5 Conclusion This report serves only as a very short introduction to the fascinating field of caching. I have only looked at some aspects of caching (both computer and web) and this enabled me to observe that caching is a hard problem to analyze due to the many different parameters involved. An important thing to note her is that most of the performance evaluation papers I have looked at, deal with miss ratios as analytical approach to calculating access latency is much more complicated. And another thing we should not forget is the increasing complexity of the web caching problem as compared to the computer caching problem. In web caching, pages are of different sizes, they have expiration times, and this further complicates the already difficult caching problem. However, all the factors that I have just mentioned make the caching problem more challenging and interesting and definitely open up a lot of research opportunities! 12

14 References [1] Knuth, D. E. An analysis of Optimum Caching [2] Mano, M., Kime, C. Logic and Computer Design Fundamentals [3] Agarwal, A. Analysis of Cache Performance for Operating Systems and Multiprogramming [4] Przybylski, S. Cache and Memory Hierarchy Design A Performance-directed approach [5] Smith, A. J. A Comparative Study of Set Associative Memory Mapping Algorithms and Their Use for Cache and Main Memory [6] Agarwal, A., Horowitz, M., Hennessy, J. An Analytical Cache Model [7] Singh, J., Stone, H., Thiebaut, D. A model of workloads and its use in miss-rate prediction for fully-associative caches [8] Coffman, E. G. Jr, Denning. P, Operating Systems Theory [9] Wang, J. A survey of web caching schemes for the internet [10] Belady, L. A. A study of replacement algorithms for virtual storage computers [11] Rao, G. S. Performance Analysis of Cache Memories [12] King, W. F. III Analysis of demand Paging algorithms [13] Flajolet, Gardy, Thimonier Birthday Paradox, Coupon collectors, caching algorithms, and self-organizing search [14] Jelenkovic, P. Asymptotic Approximation of the Move-To-Front Search Cost Distribution and Least Recently-Used Caching Fault Probabilities [15] Baskett, F., Rafii, A. The A0 inversion model of program paging behavior [16] Breslau, Cao, Fan, Philips, Shenker On the implications of Zipf s law for Web caching [17] Wolman, Voelker, Sharma, Cardwell, Karlin, Levy On the scale and performance of cooperative web proxy caching [18] Kobayashi, Y., Yu, S. Performance models of web caching and prefetching for wireless internet access [19] Stading, Maniatis, Baker Peer-to-peer caching schemes to address flash crowds 13

CS161 Design and Architecture of Computer Systems. Cache $$$$$

CS161 Design and Architecture of Computer Systems. Cache $$$$$ CS161 Design and Architecture of Computer Systems Cache $$$$$ Memory Systems! How can we supply the CPU with enough data to keep it busy?! We will focus on memory issues,! which are frequently bottlenecks

More information

Seminar on. By Sai Rahul Reddy P. 2/2/2005 Web Caching 1

Seminar on. By Sai Rahul Reddy P. 2/2/2005 Web Caching 1 Seminar on By Sai Rahul Reddy P 2/2/2005 Web Caching 1 Topics covered 1. Why Caching 2. Advantages of Caching 3. Disadvantages of Caching 4. Cache-Control HTTP Headers 5. Proxy Caching 6. Caching architectures

More information

Web Caching and Content Delivery

Web Caching and Content Delivery Web Caching and Content Delivery Caching for a Better Web Performance is a major concern in the Web Proxy caching is the most widely used method to improve Web performance Duplicate requests to the same

More information

Chapter 8 Virtual Memory

Chapter 8 Virtual Memory Operating Systems: Internals and Design Principles Chapter 8 Virtual Memory Seventh Edition William Stallings Modified by Rana Forsati for CSE 410 Outline Principle of locality Paging - Effect of page

More information

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Computer Organization and Structure. Bing-Yu Chen National Taiwan University Computer Organization and Structure Bing-Yu Chen National Taiwan University Large and Fast: Exploiting Memory Hierarchy The Basic of Caches Measuring & Improving Cache Performance Virtual Memory A Common

More information

Evaluation of Performance of Cooperative Web Caching with Web Polygraph

Evaluation of Performance of Cooperative Web Caching with Web Polygraph Evaluation of Performance of Cooperative Web Caching with Web Polygraph Ping Du Jaspal Subhlok Department of Computer Science University of Houston Houston, TX 77204 {pdu, jaspal}@uh.edu Abstract This

More information

Virtual Memory. Chapter 8

Virtual Memory. Chapter 8 Virtual Memory 1 Chapter 8 Characteristics of Paging and Segmentation Memory references are dynamically translated into physical addresses at run time E.g., process may be swapped in and out of main memory

More information

!! What is virtual memory and when is it useful? !! What is demand paging? !! When should pages in memory be replaced?

!! What is virtual memory and when is it useful? !! What is demand paging? !! When should pages in memory be replaced? Chapter 10: Virtual Memory Questions? CSCI [4 6] 730 Operating Systems Virtual Memory!! What is virtual memory and when is it useful?!! What is demand paging?!! When should pages in memory be replaced?!!

More information

Memory Hierarchy. Goal: Fast, unlimited storage at a reasonable cost per bit.

Memory Hierarchy. Goal: Fast, unlimited storage at a reasonable cost per bit. Memory Hierarchy Goal: Fast, unlimited storage at a reasonable cost per bit. Recall the von Neumann bottleneck - single, relatively slow path between the CPU and main memory. Fast: When you need something

More information

Page 1. Multilevel Memories (Improving performance using a little cash )

Page 1. Multilevel Memories (Improving performance using a little cash ) Page 1 Multilevel Memories (Improving performance using a little cash ) 1 Page 2 CPU-Memory Bottleneck CPU Memory Performance of high-speed computers is usually limited by memory bandwidth & latency Latency

More information

A Review on Cache Memory with Multiprocessor System

A Review on Cache Memory with Multiprocessor System A Review on Cache Memory with Multiprocessor System Chirag R. Patel 1, Rajesh H. Davda 2 1,2 Computer Engineering Department, C. U. Shah College of Engineering & Technology, Wadhwan (Gujarat) Abstract

More information

Surveying Formal and Practical Approaches for Optimal Placement of Replicas on the Web

Surveying Formal and Practical Approaches for Optimal Placement of Replicas on the Web Surveying Formal and Practical Approaches for Optimal Placement of Replicas on the Web TR020701 April 2002 Erbil Yilmaz Department of Computer Science The Florida State University Tallahassee, FL 32306

More information

CIT 668: System Architecture. Caching

CIT 668: System Architecture. Caching CIT 668: System Architecture Caching Topics 1. Cache Types 2. Web Caching 3. Replacement Algorithms 4. Distributed Caches 5. memcached A cache is a system component that stores data so that future requests

More information

Chapter 8. Virtual Memory

Chapter 8. Virtual Memory Operating System Chapter 8. Virtual Memory Lynn Choi School of Electrical Engineering Motivated by Memory Hierarchy Principles of Locality Speed vs. size vs. cost tradeoff Locality principle Spatial Locality:

More information

LECTURE 11. Memory Hierarchy

LECTURE 11. Memory Hierarchy LECTURE 11 Memory Hierarchy MEMORY HIERARCHY When it comes to memory, there are two universally desirable properties: Large Size: ideally, we want to never have to worry about running out of memory. Speed

More information

Subway : Peer-To-Peer Clustering of Clients for Web Proxy

Subway : Peer-To-Peer Clustering of Clients for Web Proxy Subway : Peer-To-Peer Clustering of Clients for Web Proxy Kyungbaek Kim and Daeyeon Park Department of Electrical Engineering & Computer Science, Division of Electrical Engineering, Korea Advanced Institute

More information

INF5071 Performance in distributed systems Distribution Part II

INF5071 Performance in distributed systems Distribution Part II INF5071 Performance in distributed systems Distribution Part II 5 November 2010 Type IV Distribution Systems Combine Types I, II or III Network of servers Server hierarchy Autonomous servers Cooperative

More information

The levels of a memory hierarchy. Main. Memory. 500 By 1MB 4GB 500GB 0.25 ns 1ns 20ns 5ms

The levels of a memory hierarchy. Main. Memory. 500 By 1MB 4GB 500GB 0.25 ns 1ns 20ns 5ms The levels of a memory hierarchy CPU registers C A C H E Memory bus Main Memory I/O bus External memory 500 By 1MB 4GB 500GB 0.25 ns 1ns 20ns 5ms 1 1 Some useful definitions When the CPU finds a requested

More information

Chapter Seven. Large & Fast: Exploring Memory Hierarchy

Chapter Seven. Large & Fast: Exploring Memory Hierarchy Chapter Seven Large & Fast: Exploring Memory Hierarchy 1 Memories: Review SRAM (Static Random Access Memory): value is stored on a pair of inverting gates very fast but takes up more space than DRAM DRAM

More information

Lecture 2: Memory Systems

Lecture 2: Memory Systems Lecture 2: Memory Systems Basic components Memory hierarchy Cache memory Virtual Memory Zebo Peng, IDA, LiTH Many Different Technologies Zebo Peng, IDA, LiTH 2 Internal and External Memories CPU Date transfer

More information

Question?! Processor comparison!

Question?! Processor comparison! 1! 2! Suggested Readings!! Readings!! H&P: Chapter 5.1-5.2!! (Over the next 2 lectures)! Lecture 18" Introduction to Memory Hierarchies! 3! Processor components! Multicore processors and programming! Question?!

More information

Operating System - Virtual Memory

Operating System - Virtual Memory Operating System - Virtual Memory Virtual memory is a technique that allows the execution of processes which are not completely available in memory. The main visible advantage of this scheme is that programs

More information

Lecture 16. Today: Start looking into memory hierarchy Cache$! Yay!

Lecture 16. Today: Start looking into memory hierarchy Cache$! Yay! Lecture 16 Today: Start looking into memory hierarchy Cache$! Yay! Note: There are no slides labeled Lecture 15. Nothing omitted, just that the numbering got out of sequence somewhere along the way. 1

More information

The Design and Implementation of a Next Generation Name Service for the Internet (CoDoNS) Presented By: Kamalakar Kambhatla

The Design and Implementation of a Next Generation Name Service for the Internet (CoDoNS) Presented By: Kamalakar Kambhatla The Design and Implementation of a Next Generation Name Service for the Internet (CoDoNS) Venugopalan Ramasubramanian Emin Gün Sirer Presented By: Kamalakar Kambhatla * Slides adapted from the paper -

More information

Chapter 6 Memory 11/3/2015. Chapter 6 Objectives. 6.2 Types of Memory. 6.1 Introduction

Chapter 6 Memory 11/3/2015. Chapter 6 Objectives. 6.2 Types of Memory. 6.1 Introduction Chapter 6 Objectives Chapter 6 Memory Master the concepts of hierarchical memory organization. Understand how each level of memory contributes to system performance, and how the performance is measured.

More information

Memory Technology. Caches 1. Static RAM (SRAM) Dynamic RAM (DRAM) Magnetic disk. Ideal memory. 0.5ns 2.5ns, $2000 $5000 per GB

Memory Technology. Caches 1. Static RAM (SRAM) Dynamic RAM (DRAM) Magnetic disk. Ideal memory. 0.5ns 2.5ns, $2000 $5000 per GB Memory Technology Caches 1 Static RAM (SRAM) 0.5ns 2.5ns, $2000 $5000 per GB Dynamic RAM (DRAM) 50ns 70ns, $20 $75 per GB Magnetic disk 5ms 20ms, $0.20 $2 per GB Ideal memory Average access time similar

More information

Memory Hierarchy. Slides contents from:

Memory Hierarchy. Slides contents from: Memory Hierarchy Slides contents from: Hennessy & Patterson, 5ed Appendix B and Chapter 2 David Wentzlaff, ELE 475 Computer Architecture MJT, High Performance Computing, NPTEL Memory Performance Gap Memory

More information

SF-LRU Cache Replacement Algorithm

SF-LRU Cache Replacement Algorithm SF-LRU Cache Replacement Algorithm Jaafar Alghazo, Adil Akaaboune, Nazeih Botros Southern Illinois University at Carbondale Department of Electrical and Computer Engineering Carbondale, IL 6291 alghazo@siu.edu,

More information

Let!s go back to a course goal... Let!s go back to a course goal... Question? Lecture 22 Introduction to Memory Hierarchies

Let!s go back to a course goal... Let!s go back to a course goal... Question? Lecture 22 Introduction to Memory Hierarchies 1 Lecture 22 Introduction to Memory Hierarchies Let!s go back to a course goal... At the end of the semester, you should be able to......describe the fundamental components required in a single core of

More information

Operating Systems. Memory: replacement policies

Operating Systems. Memory: replacement policies Operating Systems Memory: replacement policies Last time caching speeds up data lookups if the data is likely to be re-requested again data structures for O(1)-lookup data source set-associative (hardware)

More information

Improving object cache performance through selective placement

Improving object cache performance through selective placement University of Wollongong Research Online Faculty of Informatics - Papers (Archive) Faculty of Engineering and Information Sciences 2006 Improving object cache performance through selective placement Saied

More information

Chapter 2: Memory Hierarchy Design Part 2

Chapter 2: Memory Hierarchy Design Part 2 Chapter 2: Memory Hierarchy Design Part 2 Introduction (Section 2.1, Appendix B) Caches Review of basics (Section 2.1, Appendix B) Advanced methods (Section 2.3) Main Memory Virtual Memory Fundamental

More information

Finding a needle in Haystack: Facebook's photo storage

Finding a needle in Haystack: Facebook's photo storage Finding a needle in Haystack: Facebook's photo storage The paper is written at facebook and describes a object storage system called Haystack. Since facebook processes a lot of photos (20 petabytes total,

More information

Addresses in the source program are generally symbolic. A compiler will typically bind these symbolic addresses to re-locatable addresses.

Addresses in the source program are generally symbolic. A compiler will typically bind these symbolic addresses to re-locatable addresses. 1 Memory Management Address Binding The normal procedures is to select one of the processes in the input queue and to load that process into memory. As the process executed, it accesses instructions and

More information

CHAPTER 6 Memory. CMPS375 Class Notes Page 1/ 16 by Kuo-pao Yang

CHAPTER 6 Memory. CMPS375 Class Notes Page 1/ 16 by Kuo-pao Yang CHAPTER 6 Memory 6.1 Memory 233 6.2 Types of Memory 233 6.3 The Memory Hierarchy 235 6.3.1 Locality of Reference 237 6.4 Cache Memory 237 6.4.1 Cache Mapping Schemes 239 6.4.2 Replacement Policies 247

More information

CHAPTER 6 Memory. CMPS375 Class Notes (Chap06) Page 1 / 20 Dr. Kuo-pao Yang

CHAPTER 6 Memory. CMPS375 Class Notes (Chap06) Page 1 / 20 Dr. Kuo-pao Yang CHAPTER 6 Memory 6.1 Memory 341 6.2 Types of Memory 341 6.3 The Memory Hierarchy 343 6.3.1 Locality of Reference 346 6.4 Cache Memory 347 6.4.1 Cache Mapping Schemes 349 6.4.2 Replacement Policies 365

More information

Multimedia Streaming. Mike Zink

Multimedia Streaming. Mike Zink Multimedia Streaming Mike Zink Technical Challenges Servers (and proxy caches) storage continuous media streams, e.g.: 4000 movies * 90 minutes * 10 Mbps (DVD) = 27.0 TB 15 Mbps = 40.5 TB 36 Mbps (BluRay)=

More information

Chapter 5A. Large and Fast: Exploiting Memory Hierarchy

Chapter 5A. Large and Fast: Exploiting Memory Hierarchy Chapter 5A Large and Fast: Exploiting Memory Hierarchy Memory Technology Static RAM (SRAM) Fast, expensive Dynamic RAM (DRAM) In between Magnetic disk Slow, inexpensive Ideal memory Access time of SRAM

More information

Addressed Issue. P2P What are we looking at? What is Peer-to-Peer? What can databases do for P2P? What can databases do for P2P?

Addressed Issue. P2P What are we looking at? What is Peer-to-Peer? What can databases do for P2P? What can databases do for P2P? Peer-to-Peer Data Management - Part 1- Alex Coman acoman@cs.ualberta.ca Addressed Issue [1] Placement and retrieval of data [2] Server architectures for hybrid P2P [3] Improve search in pure P2P systems

More information

Assignment 1 due Mon (Feb 4pm

Assignment 1 due Mon (Feb 4pm Announcements Assignment 1 due Mon (Feb 19) @ 4pm Next week: no classes Inf3 Computer Architecture - 2017-2018 1 The Memory Gap 1.2x-1.5x 1.07x H&P 5/e, Fig. 2.2 Memory subsystem design increasingly important!

More information

a process may be swapped in and out of main memory such that it occupies different regions

a process may be swapped in and out of main memory such that it occupies different regions Virtual Memory Characteristics of Paging and Segmentation A process may be broken up into pieces (pages or segments) that do not need to be located contiguously in main memory Memory references are dynamically

More information

Last Class. Demand Paged Virtual Memory. Today: Demand Paged Virtual Memory. Demand Paged Virtual Memory

Last Class. Demand Paged Virtual Memory. Today: Demand Paged Virtual Memory. Demand Paged Virtual Memory Last Class Segmentation User view of programs Each program consists of a number of segments Segmented Paging: combine the best features of paging and segmentation Today: Demand Paged Virtual Memory Up

More information

Replicate It! Scalable Content Delivery: Why? Scalable Content Delivery: How? Scalable Content Delivery: How? Scalable Content Delivery: What?

Replicate It! Scalable Content Delivery: Why? Scalable Content Delivery: How? Scalable Content Delivery: How? Scalable Content Delivery: What? Accelerating Internet Streaming Media Delivery using Azer Bestavros and Shudong Jin Boston University http://www.cs.bu.edu/groups/wing Scalable Content Delivery: Why? Need to manage resource usage as demand

More information

Chapter 6 Objectives

Chapter 6 Objectives Chapter 6 Memory Chapter 6 Objectives Master the concepts of hierarchical memory organization. Understand how each level of memory contributes to system performance, and how the performance is measured.

More information

Advanced Memory Organizations

Advanced Memory Organizations CSE 3421: Introduction to Computer Architecture Advanced Memory Organizations Study: 5.1, 5.2, 5.3, 5.4 (only parts) Gojko Babić 03-29-2018 1 Growth in Performance of DRAM & CPU Huge mismatch between CPU

More information

CMPSC 311- Introduction to Systems Programming Module: Caching

CMPSC 311- Introduction to Systems Programming Module: Caching CMPSC 311- Introduction to Systems Programming Module: Caching Professor Patrick McDaniel Fall 2016 Reminder: Memory Hierarchy L0: Registers CPU registers hold words retrieved from L1 cache Smaller, faster,

More information

Chapter 2: Memory Hierarchy Design Part 2

Chapter 2: Memory Hierarchy Design Part 2 Chapter 2: Memory Hierarchy Design Part 2 Introduction (Section 2.1, Appendix B) Caches Review of basics (Section 2.1, Appendix B) Advanced methods (Section 2.3) Main Memory Virtual Memory Fundamental

More information

VIRTUAL MEMORY READING: CHAPTER 9

VIRTUAL MEMORY READING: CHAPTER 9 VIRTUAL MEMORY READING: CHAPTER 9 9 MEMORY HIERARCHY Core! Processor! Core! Caching! Main! Memory! (DRAM)!! Caching!! Secondary Storage (SSD)!!!! Secondary Storage (Disk)! L cache exclusive to a single

More information

Virtual Memory Outline

Virtual Memory Outline Virtual Memory Outline Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel Memory Other Considerations Operating-System Examples

More information

Summary Cache based Co-operative Proxies

Summary Cache based Co-operative Proxies Summary Cache based Co-operative Proxies Project No: 1 Group No: 21 Vijay Gabale (07305004) Sagar Bijwe (07305023) 12 th November, 2007 1 Abstract Summary Cache based proxies cooperate behind a bottleneck

More information

An Efficient Web Cache Replacement Policy

An Efficient Web Cache Replacement Policy In the Proc. of the 9th Intl. Symp. on High Performance Computing (HiPC-3), Hyderabad, India, Dec. 23. An Efficient Web Cache Replacement Policy A. Radhika Sarma and R. Govindarajan Supercomputer Education

More information

Plot SIZE. How will execution time grow with SIZE? Actual Data. int array[size]; int A = 0;

Plot SIZE. How will execution time grow with SIZE? Actual Data. int array[size]; int A = 0; How will execution time grow with SIZE? int array[size]; int A = ; for (int i = ; i < ; i++) { for (int j = ; j < SIZE ; j++) { A += array[j]; } TIME } Plot SIZE Actual Data 45 4 5 5 Series 5 5 4 6 8 Memory

More information

Memory. Objectives. Introduction. 6.2 Types of Memory

Memory. Objectives. Introduction. 6.2 Types of Memory Memory Objectives Master the concepts of hierarchical memory organization. Understand how each level of memory contributes to system performance, and how the performance is measured. Master the concepts

More information

Lecture notes for CS Chapter 2, part 1 10/23/18

Lecture notes for CS Chapter 2, part 1 10/23/18 Chapter 2: Memory Hierarchy Design Part 2 Introduction (Section 2.1, Appendix B) Caches Review of basics (Section 2.1, Appendix B) Advanced methods (Section 2.3) Main Memory Virtual Memory Fundamental

More information

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

Chapter 5. Large and Fast: Exploiting Memory Hierarchy Chapter 5 Large and Fast: Exploiting Memory Hierarchy Principle of Locality Programs access a small proportion of their address space at any time Temporal locality Items accessed recently are likely to

More information

The Memory System. Components of the Memory System. Problems with the Memory System. A Solution

The Memory System. Components of the Memory System. Problems with the Memory System. A Solution Datorarkitektur Fö 2-1 Datorarkitektur Fö 2-2 Components of the Memory System The Memory System 1. Components of the Memory System Main : fast, random access, expensive, located close (but not inside)

More information

Lecture 14: Cache & Virtual Memory

Lecture 14: Cache & Virtual Memory CS 422/522 Design & Implementation of Operating Systems Lecture 14: Cache & Virtual Memory Zhong Shao Dept. of Computer Science Yale University Acknowledgement: some slides are taken from previous versions

More information

Chapter 4. Cache Memory. Yonsei University

Chapter 4. Cache Memory. Yonsei University Chapter 4 Cache Memory Contents Computer Memory System Overview Cache Memory Principles Elements of Cache Design Pentium 4 and Power PC Cache 4-2 Key Characteristics 4-3 Location Processor Internal (main)

More information

Virtual or Logical. Logical Addr. MMU (Memory Mgt. Unit) Physical. Addr. 1. (50 ns access)

Virtual or Logical. Logical Addr. MMU (Memory Mgt. Unit) Physical. Addr. 1. (50 ns access) Virtual Memory - programmer views memory as large address space without concerns about the amount of physical memory or memory management. (What do the terms 3-bit (or 6-bit) operating system or overlays

More information

Virtual Memory Design and Implementation

Virtual Memory Design and Implementation Virtual Memory Design and Implementation To do q Page replacement algorithms q Design and implementation issues q Next: Last on virtualization VMMs Loading pages When should the OS load pages? On demand

More information

Lecture 12: Demand Paging

Lecture 12: Demand Paging Lecture 1: Demand Paging CSE 10: Principles of Operating Systems Alex C. Snoeren HW 3 Due 11/9 Complete Address Translation We started this topic with the high-level problem of translating virtual addresses

More information

Shared memory. Caches, Cache coherence and Memory consistency models. Diego Fabregat-Traver and Prof. Paolo Bientinesi WS15/16

Shared memory. Caches, Cache coherence and Memory consistency models. Diego Fabregat-Traver and Prof. Paolo Bientinesi WS15/16 Shared memory Caches, Cache coherence and Memory consistency models Diego Fabregat-Traver and Prof. Paolo Bientinesi HPAC, RWTH Aachen fabregat@aices.rwth-aachen.de WS15/16 Shared memory Caches, Cache

More information

Basic Memory Hierarchy Principles. Appendix C (Not all will be covered by the lecture; studying the textbook is recommended!)

Basic Memory Hierarchy Principles. Appendix C (Not all will be covered by the lecture; studying the textbook is recommended!) Basic Memory Hierarchy Principles Appendix C (Not all will be covered by the lecture; studying the textbook is recommended!) Cache memory idea Use a small faster memory, a cache memory, to store recently

More information

Locality of Reference

Locality of Reference Locality of Reference 1 In view of the previous discussion of secondary storage, it makes sense to design programs so that data is read from and written to disk in relatively large chunks but there is

More information

Improving the Performances of Proxy Cache Replacement Policies by Considering Infrequent Objects

Improving the Performances of Proxy Cache Replacement Policies by Considering Infrequent Objects Improving the Performances of Proxy Cache Replacement Policies by Considering Infrequent Objects Hon Wai Leong Department of Computer Science National University of Singapore 3 Science Drive 2, Singapore

More information

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

Chapter 5. Large and Fast: Exploiting Memory Hierarchy Chapter 5 Large and Fast: Exploiting Memory Hierarchy Processor-Memory Performance Gap 10000 µproc 55%/year (2X/1.5yr) Performance 1000 100 10 1 1980 1983 1986 1989 Moore s Law Processor-Memory Performance

More information

Cache introduction. April 16, Howard Huang 1

Cache introduction. April 16, Howard Huang 1 Cache introduction We ve already seen how to make a fast processor. How can we supply the CPU with enough data to keep it busy? The rest of CS232 focuses on memory and input/output issues, which are frequently

More information

CSE 120. Translation Lookaside Buffer (TLB) Implemented in Hardware. July 18, Day 5 Memory. Instructor: Neil Rhodes. Software TLB Management

CSE 120. Translation Lookaside Buffer (TLB) Implemented in Hardware. July 18, Day 5 Memory. Instructor: Neil Rhodes. Software TLB Management CSE 120 July 18, 2006 Day 5 Memory Instructor: Neil Rhodes Translation Lookaside Buffer (TLB) Implemented in Hardware Cache to map virtual page numbers to page frame Associative memory: HW looks up in

More information

Lecture 17 Introduction to Memory Hierarchies" Why it s important " Fundamental lesson(s)" Suggested reading:" (HP Chapter

Lecture 17 Introduction to Memory Hierarchies Why it s important  Fundamental lesson(s) Suggested reading: (HP Chapter Processor components" Multicore processors and programming" Processor comparison" vs." Lecture 17 Introduction to Memory Hierarchies" CSE 30321" Suggested reading:" (HP Chapter 5.1-5.2)" Writing more "

More information

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

Chapter 5. Large and Fast: Exploiting Memory Hierarchy Chapter 5 Large and Fast: Exploiting Memory Hierarchy Processor-Memory Performance Gap 10000 µproc 55%/year (2X/1.5yr) Performance 1000 100 10 1 1980 1983 1986 1989 Moore s Law Processor-Memory Performance

More information

CS6401- Operating System UNIT-III STORAGE MANAGEMENT

CS6401- Operating System UNIT-III STORAGE MANAGEMENT UNIT-III STORAGE MANAGEMENT Memory Management: Background In general, to rum a program, it must be brought into memory. Input queue collection of processes on the disk that are waiting to be brought into

More information

Reduction of Periodic Broadcast Resource Requirements with Proxy Caching

Reduction of Periodic Broadcast Resource Requirements with Proxy Caching Reduction of Periodic Broadcast Resource Requirements with Proxy Caching Ewa Kusmierek and David H.C. Du Digital Technology Center and Department of Computer Science and Engineering University of Minnesota

More information

CSE 153 Design of Operating Systems

CSE 153 Design of Operating Systems CSE 153 Design of Operating Systems Winter 18 Lecture 18/19: Page Replacement Memory Management Memory management systems Physical and virtual addressing; address translation Techniques: Partitioning,

More information

LECTURE 12. Virtual Memory

LECTURE 12. Virtual Memory LECTURE 12 Virtual Memory VIRTUAL MEMORY Just as a cache can provide fast, easy access to recently-used code and data, main memory acts as a cache for magnetic disk. The mechanism by which this is accomplished

More information

Caches. Samira Khan March 23, 2017

Caches. Samira Khan March 23, 2017 Caches Samira Khan March 23, 2017 Agenda Review from last lecture Data flow model Memory hierarchy More Caches The Dataflow Model (of a Computer) Von Neumann model: An instruction is fetched and executed

More information

Squirrel case-study. Decentralized peer-to-peer web cache. Traditional centralized web cache. Based on the Pastry peer-to-peer middleware system

Squirrel case-study. Decentralized peer-to-peer web cache. Traditional centralized web cache. Based on the Pastry peer-to-peer middleware system Decentralized peer-to-peer web cache Based on the Pastry peer-to-peer middleware system Traditional centralized web cache 1 2 Decentralized caching of web pages use the resources of peers (web browsers/clients)

More information

LECTURE 4: LARGE AND FAST: EXPLOITING MEMORY HIERARCHY

LECTURE 4: LARGE AND FAST: EXPLOITING MEMORY HIERARCHY LECTURE 4: LARGE AND FAST: EXPLOITING MEMORY HIERARCHY Abridged version of Patterson & Hennessy (2013):Ch.5 Principle of Locality Programs access a small proportion of their address space at any time Temporal

More information

CPE300: Digital System Architecture and Design

CPE300: Digital System Architecture and Design CPE300: Digital System Architecture and Design Fall 2011 MW 17:30-18:45 CBC C316 Virtual Memory 11282011 http://www.egr.unlv.edu/~b1morris/cpe300/ 2 Outline Review Cache Virtual Memory Projects 3 Memory

More information

Assignment 5. Georgia Koloniari

Assignment 5. Georgia Koloniari Assignment 5 Georgia Koloniari 2. "Peer-to-Peer Computing" 1. What is the definition of a p2p system given by the authors in sec 1? Compare it with at least one of the definitions surveyed in the last

More information

Demand fetching is commonly employed to bring the data

Demand fetching is commonly employed to bring the data Proceedings of 2nd Annual Conference on Theoretical and Applied Computer Science, November 2010, Stillwater, OK 14 Markov Prediction Scheme for Cache Prefetching Pranav Pathak, Mehedi Sarwar, Sohum Sohoni

More information

Caching Basics. Memory Hierarchies

Caching Basics. Memory Hierarchies Caching Basics CS448 1 Memory Hierarchies Takes advantage of locality of reference principle Most programs do not access all code and data uniformly, but repeat for certain data choices spatial nearby

More information

CMPSC 311- Introduction to Systems Programming Module: Caching

CMPSC 311- Introduction to Systems Programming Module: Caching CMPSC 311- Introduction to Systems Programming Module: Caching Professor Patrick McDaniel Fall 2014 Lecture notes Get caching information form other lecture http://hssl.cs.jhu.edu/~randal/419/lectures/l8.5.caching.pdf

More information

Memory Hierarchy. Slides contents from:

Memory Hierarchy. Slides contents from: Memory Hierarchy Slides contents from: Hennessy & Patterson, 5ed Appendix B and Chapter 2 David Wentzlaff, ELE 475 Computer Architecture MJT, High Performance Computing, NPTEL Memory Performance Gap Memory

More information

Lecture 5: Performance Analysis I

Lecture 5: Performance Analysis I CS 6323 : Modeling and Inference Lecture 5: Performance Analysis I Prof. Gregory Provan Department of Computer Science University College Cork Slides: Based on M. Yin (Performability Analysis) Overview

More information

Design Issues 1 / 36. Local versus Global Allocation. Choosing

Design Issues 1 / 36. Local versus Global Allocation. Choosing Design Issues 1 / 36 Local versus Global Allocation When process A has a page fault, where does the new page frame come from? More precisely, is one of A s pages reclaimed, or can a page frame be taken

More information

Course Outline. Processes CPU Scheduling Synchronization & Deadlock Memory Management File Systems & I/O Distributed Systems

Course Outline. Processes CPU Scheduling Synchronization & Deadlock Memory Management File Systems & I/O Distributed Systems Course Outline Processes CPU Scheduling Synchronization & Deadlock Memory Management File Systems & I/O Distributed Systems 1 Today: Memory Management Terminology Uniprogramming Multiprogramming Contiguous

More information

An Improved Markov Model Approach to Predict Web Page Caching

An Improved Markov Model Approach to Predict Web Page Caching An Improved Markov Model Approach to Predict Web Page Caching Meenu Brala Student, JMIT, Radaur meenubrala@gmail.com Mrs. Mamta Dhanda Asstt. Prof, CSE, JMIT Radaur mamtanain@gmail.com Abstract Optimization

More information

Virtual Memory - Overview. Programmers View. Virtual Physical. Virtual Physical. Program has its own virtual memory space.

Virtual Memory - Overview. Programmers View. Virtual Physical. Virtual Physical. Program has its own virtual memory space. Virtual Memory - Overview Programmers View Process runs in virtual (logical) space may be larger than physical. Paging can implement virtual. Which pages to have in? How much to allow each process? Program

More information

ECE7995 Caching and Prefetching Techniques in Computer Systems. Lecture 8: Buffer Cache in Main Memory (I)

ECE7995 Caching and Prefetching Techniques in Computer Systems. Lecture 8: Buffer Cache in Main Memory (I) ECE7995 Caching and Prefetching Techniques in Computer Systems Lecture 8: Buffer Cache in Main Memory (I) 1 Review: The Memory Hierarchy Take advantage of the principle of locality to present the user

More information

CS3350B Computer Architecture

CS3350B Computer Architecture CS335B Computer Architecture Winter 25 Lecture 32: Exploiting Memory Hierarchy: How? Marc Moreno Maza wwwcsduwoca/courses/cs335b [Adapted from lectures on Computer Organization and Design, Patterson &

More information

Chapter 4: Memory Management. Part 1: Mechanisms for Managing Memory

Chapter 4: Memory Management. Part 1: Mechanisms for Managing Memory Chapter 4: Memory Management Part 1: Mechanisms for Managing Memory Memory management Basic memory management Swapping Virtual memory Page replacement algorithms Modeling page replacement algorithms Design

More information

AN OVERVIEW OF HARDWARE BASED CACHE OPTIMIZATION TECHNIQUES

AN OVERVIEW OF HARDWARE BASED CACHE OPTIMIZATION TECHNIQUES AN OVERVIEW OF HARDWARE BASED CACHE OPTIMIZATION TECHNIQUES Swadhesh Kumar 1, Dr. P K Singh 2 1,2 Department of Computer Science and Engineering, Madan Mohan Malaviya University of Technology, Gorakhpur,

More information

Memory Design. Cache Memory. Processor operates much faster than the main memory can.

Memory Design. Cache Memory. Processor operates much faster than the main memory can. Memory Design Cache Memory Processor operates much faster than the main memory can. To ameliorate the sitution, a high speed memory called a cache memory placed between the processor and main memory. Barry

More information

CS 153 Design of Operating Systems Winter 2016

CS 153 Design of Operating Systems Winter 2016 CS 153 Design of Operating Systems Winter 2016 Lecture 18: Page Replacement Terminology in Paging A virtual page corresponds to physical page/frame Segment should not be used anywhere Page out = Page eviction

More information

Effective File Replication and Consistency Maintenance Mechanism in P2P Systems

Effective File Replication and Consistency Maintenance Mechanism in P2P Systems Global Journal of Computer Science and Technology Volume 11 Issue 16 Version 1.0 Type: Double Blind Peer Reviewed International Research Journal Publisher: Global Journals Inc. (USA) Online ISSN: 0975-4172

More information

A Proxy Caching Scheme for Continuous Media Streams on the Internet

A Proxy Caching Scheme for Continuous Media Streams on the Internet A Proxy Caching Scheme for Continuous Media Streams on the Internet Eun-Ji Lim, Seong-Ho park, Hyeon-Ok Hong, Ki-Dong Chung Department of Computer Science, Pusan National University Jang Jun Dong, San

More information

Memory. Principle of Locality. It is impossible to have memory that is both. We create an illusion for the programmer. Employ memory hierarchy

Memory. Principle of Locality. It is impossible to have memory that is both. We create an illusion for the programmer. Employ memory hierarchy Datorarkitektur och operativsystem Lecture 7 Memory It is impossible to have memory that is both Unlimited (large in capacity) And fast 5.1 Intr roduction We create an illusion for the programmer Before

More information

V. Primary & Secondary Memory!

V. Primary & Secondary Memory! V. Primary & Secondary Memory! Computer Architecture and Operating Systems & Operating Systems: 725G84 Ahmed Rezine 1 Memory Technology Static RAM (SRAM) 0.5ns 2.5ns, $2000 $5000 per GB Dynamic RAM (DRAM)

More information

Reducing Conflict Misses with Set Associative Caches

Reducing Conflict Misses with Set Associative Caches /6/7 Reducing Conflict es with Set Associative Caches Not too conflict y. Not too slow. Just Right! 8 byte, way xx E F xx C D What should the offset be? What should the be? What should the tag be? xx N

More information

Evaluating the Impact of Different Document Types on the Performance of Web Cache Replacement Schemes *

Evaluating the Impact of Different Document Types on the Performance of Web Cache Replacement Schemes * Evaluating the Impact of Different Document Types on the Performance of Web Cache Replacement Schemes * Christoph Lindemann and Oliver P. Waldhorst University of Dortmund Department of Computer Science

More information