Multilevel Cache Management Based on Application Hints

Size: px
Start display at page:

Download "Multilevel Cache Management Based on Application Hints"

Transcription

1 Multilevel Cache Management Based on Application Hints Gala Golan Supervised by Assoc. Prof. Assaf Schuster, Dr. Michael Factor, Alain Azagury Computer Science Department, Technion Haifa 32000, ISRAEL November 24, Introduction Caching has been used in many operating systems to improve file system performance. Typically, caching is implemented by retaining in main memory a few of the most recently accessed disk blocks, thus handling repeated accesses to a block without involving the disk. This reduces delays in two ways: the waiting process is serviced faster, and contention for the disk arm is reduced [1]. A replacement algorithm or policy is used to decide which block is the best candidate for eviction when the cache is full. The most important metric for a cache replacement algorithm is its hit rate - the fraction of pages that can be served from main memory. The miss rate is the fraction of pages that must be paged into the cache from auxiliary memory [21]. An optimal algorithm, is one for which the hit rate is maximal. Such algorithms have been the focus of many theoretical and experimental studies. Belady proposed the optimal offline paging algorithm, MIN [2], in 1966, and different measures of competitiveness help analyze the efficiency of online algorithms [3]. In this research we will focus on the problem of management of multiple levels of cache. We propose an optimal offline algorithm for replacement in multiple caches, based on an algorithm for the Relaxed List Update Problem [23], and the DEMOTE operation [24]. We describe the obstacles in proving the optimality of the proposed algorithm, and use simulation to show that it is better than known algorithms. For the first time we will rely on file system information in the storage level [14], using it to imitate the proposed offline algorithm. Computer Science Department, Technion. IBM Haifa Labs. 1

2 2 Background 2.1 Cache replacement Algorithms The most commonly used algorithm is LRU, where the least recently accessed block is evicted whenever a new block is requested [4]. This algorithm is based on the idea of locality of reference. LRU has no notion of frequency, a problem which a few variations of it try to fix. LRU-K [5], 2Q [6], LRFU [7], and LRIS [8] are such variations. 2.2 Application oriented caching: Detection based More advanced algorithms use more history information for each block in the cache (and sometimes for blocks already evicted from the cache), trying to guess the access pattern of the application. This may help identify the best candidate for eviction. DEAR [9], AFC [10], and UBM [11] all collect data about the file the block belongs to, or the application requesting it, and derive access patterns such as sequential, looping, and other. For example, In the UBM scheme, information for each file is maintained as a 4-tuple consisting of a file descriptor, a start block number, an end block number, and a loop period. Sequences of consecutive block references are detected up to the current time. The information is kept in a table and is updated whenever a block reference occurs. The detection mechanism results in files being categorized into three types: sequential, looping, and other patterns. The buffer cache is divided into three partitions to accommodate these three patterns. Each partition is managed by its own policy; MRU (Most Recently Used) is used for both sequential and looping files, and for the other files, any scheme can be used. Instead of choosing a block to evict, this algorithm chooses a victim partition - the partition from which a block will be evicted according to its policy. The victim partition is chosen to be the one with the lowest marginal gain - Hit(n)-Hit(n-1), where n is the partition size, and Hit(x) is the expected hit rate for an x-sized partition. The sequential marginal gain is always 0, so if there are blocks in this partition they are chosen first. The Marginal gain of the looping references depends of whether or not an entire loop fits in the cache. For LRU (here used for other references), an approximation of Belady s lifetime function is used. 2.3 Application oriented caching: Hint based A further step is to rely on the application s hints passed to the cache management. This reduces the complexity of the algorithm, but limits its applicability. Only applications that have been explicitly altered to manage the caching of their own blocks can benefit from such algorithms. LRU-SP [12] and TIP2 [13] are two such algorithms. In LRU-SP, an interface allows applications to assign priorities to files (or, temporarily, to blocks in files), and to specify file cache replacement policies for each priority level. The kernel 2

3 always replaces blocks with the lowest priority first. Applications like UNIX sort, the dinero simulator, and the postgress database were modified to include calls to these interface functions. A different approach was taken in TIP2. Instead of dictating the replacement policy, the applications disclose information about their future requests. This enables the cache manager to make its own decisions, taking into account information about the state of the cache and the different applications running concurrently. The applications were modified to specify a file (name/descriptor) and an access pattern (sequential/explicit access string). The cache management scheme then balances caching and prefetching, by computing the value of each block to its requesting application, and evicting the globally least valuable block. 2.4 Passing information to the Storage Tier The algorithms which differentiate between blocks based on the requesting application, or even the block s file, have all been designed to work in the file system cache. The main reason for this is the lack of information about the block s attributes anywhere outside the file system. A way to pass such extra information from the file system to the I/O system has been suggested in [14], and has been implemented in the Linux kernel The Information Gap When a process requests data from a file, the file system is responsible for locating that data on the device. When the request cannot be serviced from the file system s cache, an I/O request is passed through the storage tier to the device queue for the actual I/O to take place. A decision is made by the file system, whether to generate a synchronous or an asynchronous I/O request. In the asynchronous case the user application is disconnected from the lower layers of the I/O stack, and keeps running while the I/O request is being passed down to the storage device. In case of accessing a SCSI disk, the SCSI command is generated by the device driver only after the file system has placed the request. At this stage the file system data structures (which hold the information about the process, user, file and application) are not always available Bridging the Gap In some cases (mainly synchronous read operations), the application requesting the I/O would like to wait for the operation to complete before continuing. For this to happen, the buffer header is added to the request wait-queue, and the application s process is kept in a Wait state. When the I/O completes the process is released from this state and the application may continue running. While waiting in the queue for the completion of the I/O, the file system s data structures are available, meaning any IO request that will be handed down to the storage tier can also contain information such as requesting application, user, or file. The goal is to make the process information available for all I/O requests, not just the synchronous ones. This can be done by adding the buffers to the queue without changing the 3

4 process state, thus making the information accessible without forcing a delay in the application s normal run. Details about the implementation can be found in [14]. 2.5 Multilevel All the studies described above have dealt with a simple architecture, when one cache, the file system s cache, is used between the application s request and the disk. A multilevel cache hierarchy consists of h levels of caches, C h,... C 1 and forms a tree, i.e., each cache at level C i+1 is shared by one or more caches at level C i and a cache at level C i is a direct child of only one cache at level C i+1. This is a common architecture for CPU caches [15], but also for the network [16, 17] and storage [18, 19] domains. In those domains, there are also configurations which are not a tree, for which many hosts access many caches. Several studies state the effect of multiple levels of cache existing in the same system [16, 17, 18, 19], and a few replacement algorithms were proposed for a second level cache, such as Multi-Q [20] and ARC [21] Theoretical Discussion Aggarwal et al [22] introduced RLUP (Relaxed List Update Problem) as a model for the management of hierarchical memory. In the list update problem (LUP), we wish to maintain a linear list in response to access requests. If the current list x is x 1, x 2,... x k, the cost of accessing item x p is p. After being accessed, item x p can be moved at no cost to any location earlier in the list. Relaxed list update problem (RLUP) is a variant in which the cost to access item x p is c p, where 0 c 1... c k. The requested item x p can be repeatedly swapped with the immediately preceding item. The goal is to find an optimal service for a request sequence, where a service for x and ρ = r 1, r 2... r n is a sequence A = A 1, A 2... A n, where A i is the sequence of swaps executed when r i is issued. The cost of a service is the cost of accessing the requested elements. Chrobak and Noga [23] suggest an analogy between hierarchical memory and an item list: Multilevel caching if the multilevel cache system consists of m fully associative caches, where cache i has size s i and access time f i, it can be modeled as RLUP in the following way: we let k = m l=1 s l and the cost function is c i = f j where j is the smallest for which j l=1 s l i. They then propose an optimal offline algorithm to solve this problem. Given a request sequence ρ and an item x, first ρ (x) is the index of the first occurrence of x in ρ. (if x does not appear in ρ we assume first ρ (x) = ). Algorithm OPT Suppose that the current list is x = x 1, x 2... x k, and the remaining request sequence is ρ = x p σ, that is x p is the first request in ρ. Pick j {1,..., p} that maximizes first ρ (x j ). If j = p, do not make any swaps on x p, and apply OPT to x and σ. if j < p, 4

5 execute swap(x j, x p ) and apply OPT to the new list x and ρ. In other words, when serving x p, OPT repeatedly swaps x p with items that precede x p and are accessed the latest The DEMOTE Operation Wong and Wilkes [24] define the notion of inclusive caching; most array caches use management policies which duplicate the same data blocks at both the client and disk array levels of the cache hierarchy - they are inclusive. READ operations that miss in the client are more likely to miss in the array and incur a disk access penalty. In exclusive caching, a data block is cached at either a client or the disk array, but not both. In order to achieve exclusive caching, they introduce the DEMOTE operation as an extension to the SCSI command set. It is similar to a WRITE; the array tries to put the demoted block into its re-read cache, ejecting another block if necessary to make space. The operation is short-circuited if a copy of the block is already in the array s cache. Under the assumption that SANs are much faster then disks, even though a DEMOTE may incur a SAN block transfer, performance gains are still possible. 3 Proposed Research 3.1 Optimal Offline solution The 1-1 model Cache1 Cache2 Disk One cache in the file system (cache1) of size i, and one cache in the disk (cache2) of size j. The cost of reading a page is F cache if the page is in the filesystem s cache c(x) (F cache+)f network if the page is in the disk s cache (F cache + F network+)f disk if the page is not in any cache Operations: READ x - brings block x to cache i, and evicts it from cache i+1, when cache 3 Disk. If x is not in cache i+1, READ from cache i+2. DEMOTE x - moves x from cache i to cache i+1, when x is evicted from cache i. 5

6 This translates to a list x = x 1,..., x i, x i+1,..., x i+j, x i+j+1,..., x k, where F cache if 0 < x i c(x) F network if i < x j + i F disk if j + i < x This translation to an RLUP problem enables us to use the proposed OPT algorithm Assumptions 1. F cache << F network << F disk. 2. We can read a block without actually bringing it into the cache (this can be simulated by allocating one extra buffer in each cache). 3. We are working offline, meaning the entire request sequence is known. 4. OPT for this model, where there are 3 price ranges, will only swap blocks between caches, so no swapping will occur between blocks in the same cache The proposed offline algorithm On access to block x p : If x p is in cache1 (the host), access it from there, perform no swaps. Else if x p is in cache2 (the storage controller), find x j according to OPT [21]. If x j is x p, or if x j is in cache2, read x p from cache2 with no swapping (READ x p and DEMOTE x p ). Else, x j is in cache1. DEMOTE x j (moving it into cache2), and move x p to cache1. Else, x p is only in the disk. Find x j according to OPT. If x j is x p, or if x j is only on disk, read x p from the disk with no swapping (READ x p without DEMOTE, so it is not saved in cache2). Else, if x j is in cache2, remove it from cache2 (cache2 performs DEMOTE x j ), save x p in cache2, and repeat the case for which x p is in cache2 (first Else). Else, x j is in cache1. Remove it from cache1 (no DEMOTE, so it is not saved in cache2), and READ x p to cache1. This algorithm is based on the assumption that a DEMOTE operation can be considered a free swap, for which case the proof of the original algorithm holds. This assumption can be justified by two things: 6

7 F cache << F network << F disk (assumption 1). A DEMOTE from the disk cache to the disk is indeed free, since the disk still holds the data, and it does not need to be transferred back. In [24], the authors assume that a DEMOTE costs the same as a READ that hits in the array controller, and that clients demote a block for every READ. They therefore approximate the cost of demotions by doubling the latency of array hits (Cache2). This assumption is later supported by simulations of varying Network speeds. The proposed algorithm can also be viewed as performing the MIN algorithm with two changes: When reading a block into a cache, instead of having to evict an existing block first, the new block can be discarded immediately after its use. When evicting a block into a cache, the DEMOTE operation is used only if the block should be saved into this lower level cache according to a MIN algorithm performed on that cache. 3.2 Proof Various problems arise when trying to formally prove the optimality of this algorithm: 1. The original reason why the solution for RLUP is indeed optimal has to do with the interface of a linked list. When searching a list, after reaching a certain element, the locations of the previous elements are known, so the switch between them is indeed free. This is not necessarily the case for hierarchical memory - it depends on the definition of the price for each level. 2. A real optimal algorithm has to have no constraints. This means, for example, it can know what all caches hold without needing DEMOTE to communicate between them. This is not how we define our model. 3. Can we really read blocks while skipping caches in the way? Any algorithm that uses buffers for its internal use effectively reduces the cache size and therefore cannot be competitive, and therefore cannot be optimal. 4. What should the cost function be? If we set the price for each level to be the cost of physically accessing this level, then there is no reason to assume a switch is indeed free. We can say that when reading a block from level i, all levels before are accessed. When reading a block, it must go through all upper levels anyway, with or without updating these caches. Thus, inserting the block into one or more of the upper 7

8 caches does not cost any additional time. The problem is that we charge each read for the price of transferring it, so if we don t actually do the transfer (i.e., the switch) we pay for more than we have to. We can assume the price of each level is negligible compared to the level below it. In this case, only the accesses to the lowest level are of any interest, so all the caches above (in our case, Cache1 and Cache2) can be treated as one. This makes the problem uninteresting - for most access patterns any algorithm will be as good as the optimal, and for the other inputs, the amortized cost will be very small. Due to these problems, we will show that the proposed algorithm achieves better hit rates by simulation. We will use a simulator based on the one used in [21], and implement several of the algorithms mentioned in the background section. We will use this simulation for the traces described below, to show that the proposed algorithm performs better than all of them. 3.3 Implementing an Approximation Databases are good examples of applications where the access pattern can be easily predicted, making useful hints available to the cache [12, 13]. We will use DB2 s query optimizer s output to predict future accesses to the disk. Our traces will be extracted from running a TPC benchmark on DB2. We will then implement a mechanism based on the one described in [11]: The size (or scale) of the loop will be specified by the application (i.e., DB2 or an underlying file system). Sequential accesses can be marked as non cacheable, and the rest of the accesses may contain either an approximation of the next access or no information (default partition). For example - assuming there is one byte for passing information about each block, possible values for that byte would be: Value Meaning 0 Default caching algorithm 1 Very short loop (= high priority) Possible loop sizes (or loop size ranges) 255 Infinite loop (= low priority, non-cacheable) Assuming this is the best approximation of the optimal algorithm for only one cache level, the optimality for two levels of cache holds since: The host performs the algorithm as is, but also uses DEMOTE. No DEMOTE is used when discarding non cacheable blocks, thus preventing them from ever being cached at the disk controller (note they are discarded when passes to the host). 8

9 Short loops will be cached in the host, while longer loops will be cached at the disk. This is guaranteed because the short loop references will be discarded after being passed to the host and the longer ones will be accessed from the disk. 3.4 Multiple hosts We will then repeat the process for the case of more than one cache in each level of the hierarchy. We will propose an optimal offline algorithm for this broader case, and use simulation to show it is better than known algorithms. We will then implement an online algorithm imitating it The 2-1 Model Cache1 Cache2 \ / Cache3 Disk There are two caches in the file system (Cache1 and Cache2) for two hosts, and one cache in the disk controller(cache3). The costs of access and assumptions 1-3 from the 1-1 model hold here as well (F cache and F network are the same for both hosts). Since cache1 and cache2 are not fully associative (we do not wish to store blocks in cache1 that host1 does not demand), we cannot swap blocks between cache1 and cache2. Furthermore, we do not wish to evict blocks from cache3 as soon as they are read by one host, since the other host may request them (this has also been suggested in [24]). There are some access patterns where partly inclusive caching is preferred. For this reason, the optimality of the algorithm suggested for the 1-1 model does not hold for this model. Based on the MIN view of the algorithm for the 1-1 case, we propose an algorithm for the 2-1 case: Cache1 and cache2 both perform MIN on their blocks, calling DEMOTE when evicting blocks from the cache. Cache3 will store block x (when READ x or DEMOTE x are performed) if: There is in the future a READ x operation, without a DEMOTE x preceding it, and There is a block y in cache3 for which there is in the future a READ y operation with a DEMOTE y operation preceding it (save x instead of y in cache3), or There is no block y in cache3 with a DEMOTE y operation in the future (remove some block according to MIN, and save x in cache3). 9

10 Showing the optimality of this model will first of all involve working with a few instances of the database simultaneously (in order to generate two independent traces). It will also involve modifying the simulator to include a notion of time, in order to correctly merge two inputs from two different hosts, and to create a correct input for a lower level cache. The implementation for an online solution will now involve dealing with the frequency of requests from each host. When there is more than one host, the blocks from the different hosts are merged into the same three partitions in the disk. The information passed down by the hosts might have to be adjusted according to each host s frequency of accesses. For example, if host1 makes 4 requests for each request from host2, and assuming they store the same loop length in the disk cache, host1 s blocks should be assigned an effective shorter loop size. References [1] Nelson, B. Welch, and J. Ousterhout. Caching in the Sprite Network File System. ACM Transactions on Computer Systems, 6(1): , February [2] L.A. Belady, A study of replacement algorithms for a virtual-storage computer. IBM Sys. J, vol. 5, no. 2, pp , [3] A. Fiat, R. Karp, M. Luby, L.A. McGeoch, D. Sleator, N.E. Yong, Competitive paging algorithms, Journal of Algorithms, 12, pages , [4] Peter J. Denning. The Working Set Model for Program Behavior. Communications of the ACM, 11(5): , May [5] E. O Neil, P. O Neil, G. Weikum, The LRU-K page replacement algorithm for database disk buffering, Proc. ACM SIGMOD International Conference on Management of Data, [6] Theodore Johnson and Dennis Shasha, 2Q: a low overhead high performance buffer management replacement algorithm, In Proc. of the Twentieth International Conference on Very Large Databases, Santiago, Chile, pages , [7] D. Lee, J. Choi, J.-H. Kim, S. H. Noh, S. L. Min, Y. Cho, and C. S. Kim, On the Existence of a Spectrum of Policies that subsumes the Least Recently Used (LRU) and Least Frequently Used (LFU) Policies, in Proceedings of the 1999 ACM SIGMETRICS Conference, pp , [8] S. Jiang and X. Zhuang. LIRS: An efficient low inter-reference recency set replacement policy to improve buffer cache performance. In Proc. of SIGMETRICS

11 [9] Jongmoo Choi, Sam H. Noh, Sang Lyul Min and Yookun Cho, An Implementation Study of a Detection-Based Adaptive Block Replacement Scheme, USENIX Annual Technical Conference, Monterey, CA, June [10] J. Choi, S. H. Noh, S. L. Min, and Y. Cho, Towards Application/File-Level Characterization of Block References: A Case for Fine-Grained Buffer Management, Measuring and Modeling of Computer Systems, June 2000, pp [11] J.M Kim, J. Choi, J. Kim, S. H. Noh, S. L. Min, and Y. Cho, and C.S Kim, A Low- Overhead High-Performance Unified Buffer Management Scheme that Exploits Sequential and Looping References, In Proc. of the 4th USENIX Symposium on Operating Systems Design and Implementation, October 2000, pp [12] P. Cao, E.W. Felten, and K. Li, Implementation and Performance of Application- Controlled File Caching. In Proc. of the First Symposium on Operating Systems Design and Implementation, USENIX Association, November [13] R.H. Patterson, G.A. Gibson, E. Ginting, D. Stodolsky, and J. Zelenka. Informed prefetching and caching. In Proceedings of the Fifteenth ACM Symposium on Operating Systems Principles, pages 79 95, December [14] Tsipora Barzilai, Gala Golan. Accessing Application Identification Information in the Storage Tier. Disclosure IL , IBM Haifa Labs, November 26, [15] J.-L. Baer, W.-H. Wang, On the inclusion properties for multi-level cache hierarchies, The 15th Annual International Symposium on Computer architecture, 1988, Honolulu, Hawaii, United States [16] P. Rodriguez, C. Spanner, and E. W. Biersack, Web caching architectures: hierarchical and distributed caching, Proceedings of WCW 99. [17] D. L. Willick, D. L. Eager, and R. B. Bunt. Disk Cache Replacement Policies for Network Fileservers. In Proceedings of the 13th International Conference on Distributed Computing Systems, May [18] D. Muntz and P. Honeyman. Multi-level Caching in Distributed File Systems -or- your cache ain t nuthin but trash. In Proceedings of the Usenix Winter 1992 Technical Conference pages , Berkeley, CA, USA, January Usenix Association. [19] S.J.Lee and C.W.Chung, VLRU: Buffer Management in Client-Server Systems, in IEICE Transactions on Information and Systems, Vol. E83-D, No. 6, June 2000, pp [20] Y. Zhou and J.F. Philibin, The Multi-Queue Replacement Algorithm for second Level Buffer Caches, in Proc. USENIX annual Tech. Conf. (USENIX 2001), Boston, MA, pp , June

12 [21] Nimrod Megiddo and Dharmendra S. Modha, ARC: A SELF-TUNING, LOW OVER- HEAD REPLACEMENT CACHE, USENIX File and Storage Technologies Conference (FAST), March 31, 2003, San Francisco, CA [22] Aggarwal, B. Alpern, A. Chandra, and M. Snir. A Model for Hierarchical Memory, In Proceedings of the 19th Annual ACM Symposium of Theory of Computing (STOC), pages , New York City, May [23] Marek Chrobak and John Noga. Competitive algorithms for multilevel caching and relaxed list update. In Proceedings of the Ninth ACM-SIAM Symposium on Discrete Algorithms, pages 87 96, [24] Theodore M. Wong and John Wilkes, My cache or yours? Making storage more exclusive, In Proc. of the USENIX Annual Technical Conference, 2002, pages

A Low-Overhead High-Performance Unified Buffer Management Scheme that Exploits Sequential and Looping References

A Low-Overhead High-Performance Unified Buffer Management Scheme that Exploits Sequential and Looping References A ow-overhead High-Performance Unified Buffer Management that Exploits Sequential and ooping References Jong Min Kim Sang yul Min Jongmoo Choi Yookun Cho School of Computer Science and Engineering Seoul

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

Karma: Know-it-All Replacement for a Multilevel cache

Karma: Know-it-All Replacement for a Multilevel cache Karma: Know-it-All Replacement for a Multilevel cache Gala Yadgar Computer Science Department, Technion Assaf Schuster Computer Science Department, Technion Michael Factor IBM Haifa Research Laboratories

More information

AMP: Program Context Specific Buffer Caching

AMP: Program Context Specific Buffer Caching AMP: Program Context Specific Buffer Caching Feng Zhou, Rob von Behren and Eric Brewer Computer Science Division University of California, Berkeley {zf,jrvb,brewer}@cs.berkeley.edu We present Adaptive

More information

Comparison and Analysis of Various Buffer Cache Management Strategies for Database Management System

Comparison and Analysis of Various Buffer Cache Management Strategies for Database Management System Comparison and Analysis of Various Buffer Cache Management Strategies for Database Management System Priti M Tailor 1, Prof. Rustom D. Morena 2 1 Assistant Professor, Sutex Bank College of Computer App.

More information

Adaptive Replacement Policy with Double Stacks for High Performance Hongliang YANG

Adaptive Replacement Policy with Double Stacks for High Performance Hongliang YANG International Conference on Advances in Mechanical Engineering and Industrial Informatics (AMEII 2015) Adaptive Replacement Policy with Double Stacks for High Performance Hongliang YANG School of Informatics,

More information

Pattern Based Cache Management Policies

Pattern Based Cache Management Policies International Journal of Computer Science and Engineering Open Access Technical Paper Volume-2, Issue-2 E-ISSN: 2347-2693 Pattern Based Cache Management Policies Namrata Dafre 1*, Urmila Shrawankar 2 and

More information

Calculating lower bounds for caching problems

Calculating lower bounds for caching problems Calculating lower bounds for caching problems Leah Epstein Rob van Stee Abstract We present a general method for computing lower bounds for various caching problems. We apply the method to two well known

More information

RACE: A Robust Adaptive Caching Strategy for Buffer Cache

RACE: A Robust Adaptive Caching Strategy for Buffer Cache RACE: A Robust Adaptive Caching Strategy for Buffer Cache Yifeng Zhu Hong Jiang Electrical and Computer Engineering Computer Science and Engineering University of Maine University of Nebraska - Lincoln

More information

Using Fuzzy Logic to Improve Cache Replacement Decisions

Using Fuzzy Logic to Improve Cache Replacement Decisions 182 IJCSNS International Journal of Computer Science and Network Security, VOL.6 No.3A, March 26 Using Fuzzy Logic to Improve Cache Replacement Decisions Mojtaba Sabeghi1, and Mohammad Hossein Yaghmaee2,

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

!! 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

Cache Memory COE 403. Computer Architecture Prof. Muhamed Mudawar. Computer Engineering Department King Fahd University of Petroleum and Minerals

Cache Memory COE 403. Computer Architecture Prof. Muhamed Mudawar. Computer Engineering Department King Fahd University of Petroleum and Minerals Cache Memory COE 403 Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Presentation Outline The Need for Cache Memory The Basics

More information

More on weighted servers

More on weighted servers More on weighted servers or FIFO is better than LRU Leah Epstein Csanád Imreh Rob van Stee Abstract We consider a generalized 2-server problem on the uniform space in which servers have different costs

More information

I/O Buffer Cache Mechanism Based on the Frequency of File Usage

I/O Buffer Cache Mechanism Based on the Frequency of File Usage I/O Buffer Cache Mechanism Based on the Frequency of File Usage Tatsuya Katakami Toshihiro Tabata and Hideo Taniguchi Graduate School of Natural Science and Technology, Okayama University katakami@slab.cs.okayama-u.ac.jp,

More information

Removing Belady s Anomaly from Caches with Prefetch Data

Removing Belady s Anomaly from Caches with Prefetch Data Removing Belady s Anomaly from Caches with Prefetch Data Elizabeth Varki University of New Hampshire varki@cs.unh.edu Abstract Belady s anomaly occurs when a small cache gets more hits than a larger cache,

More information

Research Article C-Aware: A Cache Management Algorithm Considering Cache Media Access Characteristic in Cloud Computing

Research Article C-Aware: A Cache Management Algorithm Considering Cache Media Access Characteristic in Cloud Computing Mathematical Problems in Engineering Volume 213, Article ID 867167, 13 pages http://dx.doi.org/1.1155/213/867167 Research Article : A Cache Management Algorithm Considering Cache Media Access Characteristic

More information

Efficient Page Caching Algorithm with Prediction and Migration for a Hybrid Main Memory

Efficient Page Caching Algorithm with Prediction and Migration for a Hybrid Main Memory Efficient Page Caching Algorithm with Prediction and Migration for a Hybrid Main Memory Hyunchul Seok, Youngwoo Park, Ki-Woong Park, and Kyu Ho Park KAIST Daejeon, Korea {hcseok, ywpark, woongbak}@core.kaist.ac.kr

More information

Second-Tier Cache Management Using Write Hints

Second-Tier Cache Management Using Write Hints Second-Tier Cache Management Using Write Hints Xuhui Li University of Waterloo Aamer Sachedina IBM Toronto Lab Ashraf Aboulnaga University of Waterloo Shaobo Gao University of Waterloo Kenneth Salem University

More information

Online paging and caching

Online paging and caching Title: Online paging and caching Name: Neal E. Young 1 Affil./Addr. University of California, Riverside Keywords: paging; caching; least recently used; -server problem; online algorithms; competitive analysis;

More information

Roadmap DB Sys. Design & Impl. Reference. Detailed Roadmap. Motivation. Outline of LRU-K. Buffering - LRU-K

Roadmap DB Sys. Design & Impl. Reference. Detailed Roadmap. Motivation. Outline of LRU-K. Buffering - LRU-K 15-721 DB Sys. Design & Impl. Buffering - LRU-K Christos Faloutsos www.cs.cmu.edu/~christos Roadmap 1) Roots: System R and Ingres 2) Implementation: buffering, indexing, q-opt 3) Transactions: locking,

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

Program Counter Based Pattern Classification in Pattern Based Buffer Caching

Program Counter Based Pattern Classification in Pattern Based Buffer Caching Purdue University Purdue e-pubs ECE Technical Reports Electrical and Computer Engineering 1-12-2004 Program Counter Based Pattern Classification in Pattern Based Buffer Caching Chris Gniady Y. Charlie

More information

Virtual Memory. Overview: Virtual Memory. Virtual address space of a process. Virtual Memory. Demand Paging

Virtual Memory. Overview: Virtual Memory. Virtual address space of a process. Virtual Memory. Demand Paging TDDB68 Concurrent programming and operating systems Overview: Virtual Memory Virtual Memory [SGG7/8] Chapter 9 Background Demand Paging Page Replacement Allocation of Frames Thrashing and Data Access Locality

More information

SOPA: Selecting the Optimal Caching Policy Adaptively

SOPA: Selecting the Optimal Caching Policy Adaptively SOPA: Selecting the Optimal Caching Policy Adaptively YANG WANG, JIWU SHU, GUANGYAN ZHANG, WEI XUE, and WEIMIN ZHENG Tsinghua University With the development of storage technology and applications, new

More information

Virtual Memory. Overview: Virtual Memory. Virtual address space of a process. Virtual Memory

Virtual Memory. Overview: Virtual Memory. Virtual address space of a process. Virtual Memory TDIU Operating systems Overview: Virtual Memory Virtual Memory Background Demand Paging Page Replacement Allocation of Frames Thrashing and Data Access Locality [SGG7/8/9] Chapter 9 Copyright Notice: The

More information

Caching for NASD. Department of Computer Science University of Wisconsin-Madison Madison, WI 53706

Caching for NASD. Department of Computer Science University of Wisconsin-Madison Madison, WI 53706 Caching for NASD Chen Zhou Wanli Yang {chenzhou, wanli}@cs.wisc.edu Department of Computer Science University of Wisconsin-Madison Madison, WI 53706 Abstract NASD is a totally new storage system architecture,

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

Victim Disk First: An Asymmetric Cache to Boost the Performance of Disk Arrays under Faulty Conditions

Victim Disk First: An Asymmetric Cache to Boost the Performance of Disk Arrays under Faulty Conditions Victim Disk First: An Asymmetric Cache to Boost the Performance of Disk Arrays under Faulty Conditions Shenggang Wan, Qiang Cao, Jianzhong Huang, Siyi Li, Xin Li, Shenghui Zhan, Li Yu, Changsheng Xie Huazhong

More information

Unit 2 Buffer Pool Management

Unit 2 Buffer Pool Management Unit 2 Buffer Pool Management Based on: Sections 9.4, 9.4.1, 9.4.2 of Ramakrishnan & Gehrke (text); Silberschatz, et. al. ( Operating System Concepts ); Other sources Original slides by Ed Knorr; Updates

More information

Trace Driven Simulation of GDSF# and Existing Caching Algorithms for Web Proxy Servers

Trace Driven Simulation of GDSF# and Existing Caching Algorithms for Web Proxy Servers Proceeding of the 9th WSEAS Int. Conference on Data Networks, Communications, Computers, Trinidad and Tobago, November 5-7, 2007 378 Trace Driven Simulation of GDSF# and Existing Caching Algorithms for

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

Linux Software RAID Level 0 Technique for High Performance Computing by using PCI-Express based SSD

Linux Software RAID Level 0 Technique for High Performance Computing by using PCI-Express based SSD Linux Software RAID Level Technique for High Performance Computing by using PCI-Express based SSD Jae Gi Son, Taegyeong Kim, Kuk Jin Jang, *Hyedong Jung Department of Industrial Convergence, Korea Electronics

More information

Report on Cache-Oblivious Priority Queue and Graph Algorithm Applications[1]

Report on Cache-Oblivious Priority Queue and Graph Algorithm Applications[1] Report on Cache-Oblivious Priority Queue and Graph Algorithm Applications[1] Marc André Tanner May 30, 2014 Abstract This report contains two main sections: In section 1 the cache-oblivious computational

More information

Reducing Disk Latency through Replication

Reducing Disk Latency through Replication Gordon B. Bell Morris Marden Abstract Today s disks are inexpensive and have a large amount of capacity. As a result, most disks have a significant amount of excess capacity. At the same time, the performance

More information

Flexible Cache Cache for afor Database Management Management Systems Systems Radim Bača and David Bednář

Flexible Cache Cache for afor Database Management Management Systems Systems Radim Bača and David Bednář Flexible Cache Cache for afor Database Management Management Systems Systems Radim Bača and David Bednář Department ofradim Computer Bača Science, and Technical David Bednář University of Ostrava Czech

More information

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

Relative Performance of a Multi-level Cache with Last-Level Cache Replacement: An Analytic Review

Relative Performance of a Multi-level Cache with Last-Level Cache Replacement: An Analytic Review Relative Performance of a Multi-level Cache with Last-Level Cache Replacement: An Analytic Review Bijay K.Paikaray Debabala Swain Dept. of CSE, CUTM Dept. of CSE, CUTM Bhubaneswer, India Bhubaneswer, India

More information

Cache Controller with Enhanced Features using Verilog HDL

Cache Controller with Enhanced Features using Verilog HDL Cache Controller with Enhanced Features using Verilog HDL Prof. V. B. Baru 1, Sweety Pinjani 2 Assistant Professor, Dept. of ECE, Sinhgad College of Engineering, Vadgaon (BK), Pune, India 1 PG Student

More information

Virtual Memory COMPSCI 386

Virtual Memory COMPSCI 386 Virtual Memory COMPSCI 386 Motivation An instruction to be executed must be in physical memory, but there may not be enough space for all ready processes. Typically the entire program is not needed. Exception

More information

Chapter 8 & Chapter 9 Main Memory & Virtual Memory

Chapter 8 & Chapter 9 Main Memory & Virtual Memory Chapter 8 & Chapter 9 Main Memory & Virtual Memory 1. Various ways of organizing memory hardware. 2. Memory-management techniques: 1. Paging 2. Segmentation. Introduction Memory consists of a large array

More information

Program-Counter-Based Pattern Classification in Buffer Caching

Program-Counter-Based Pattern Classification in Buffer Caching Program-Counter-Based Pattern Classification in Buffer Caching Chris Gniady Ali R. Butt Y. Charlie Hu Purdue University West Lafayette, IN 47907 {gniady, butta, ychu}@purdue.edu Abstract Program-counter-based

More information

ECE7995 (3) Basis of Caching and Prefetching --- Locality

ECE7995 (3) Basis of Caching and Prefetching --- Locality ECE7995 (3) Basis of Caching and Prefetching --- Locality 1 What s locality? Temporal locality is a property inherent to programs and independent of their execution environment. Temporal locality: the

More information

Reduction in Cache Memory Power Consumption based on Replacement Quantity

Reduction in Cache Memory Power Consumption based on Replacement Quantity Journal of Computer Engineering 1 (9) 3-11 Reduction in Cache Memory Power Consumption based on Replacement Quantity M.Jafarsalehi Islamic Azad University of Iran Tabriz-branch jafarsalehi_m@yahoo.com

More information

CS 5523 Operating Systems: Memory Management (SGG-8)

CS 5523 Operating Systems: Memory Management (SGG-8) CS 5523 Operating Systems: Memory Management (SGG-8) Instructor: Dr Tongping Liu Thank Dr Dakai Zhu, Dr Palden Lama, and Dr Tim Richards (UMASS) for providing their slides Outline Simple memory management:

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 33 Virtual Memory Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 FAQ How does the virtual

More information

Chapter 8: Virtual Memory. Operating System Concepts

Chapter 8: Virtual Memory. Operating System Concepts Chapter 8: Virtual Memory Silberschatz, Galvin and Gagne 2009 Chapter 8: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating

More information

MEMORY SENSITIVE CACHING IN JAVA

MEMORY SENSITIVE CACHING IN JAVA MEMORY SENSITIVE CACHING IN JAVA Iliyan Nenov, Panayot Dobrikov Abstract: This paper describes the architecture of memory sensitive Java cache, which benefits from both the on demand soft reference objects

More information

Marten van Dijk Syed Kamran Haider, Chenglu Jin, Phuong Ha Nguyen. Department of Electrical & Computer Engineering University of Connecticut

Marten van Dijk Syed Kamran Haider, Chenglu Jin, Phuong Ha Nguyen. Department of Electrical & Computer Engineering University of Connecticut CSE 5095 & ECE 4451 & ECE 5451 Spring 2017 Lecture 5a Caching Review Marten van Dijk Syed Kamran Haider, Chenglu Jin, Phuong Ha Nguyen Department of Electrical & Computer Engineering University of Connecticut

More information

Page Replacement Algorithms

Page Replacement Algorithms Page Replacement Algorithms MIN, OPT (optimal) RANDOM evict random page FIFO (first-in, first-out) give every page equal residency LRU (least-recently used) MRU (most-recently used) 1 9.1 Silberschatz,

More information

Migration Based Page Caching Algorithm for a Hybrid Main Memory of DRAM and PRAM

Migration Based Page Caching Algorithm for a Hybrid Main Memory of DRAM and PRAM Migration Based Page Caching Algorithm for a Hybrid Main Memory of DRAM and PRAM Hyunchul Seok Daejeon, Korea hcseok@core.kaist.ac.kr Youngwoo Park Daejeon, Korea ywpark@core.kaist.ac.kr Kyu Ho Park Deajeon,

More information

Chapter 9: Virtual Memory

Chapter 9: Virtual Memory Chapter 9: Virtual Memory Silberschatz, Galvin and Gagne 2013 Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating

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

Managing Off-Chip Bandwidth: A Case for Bandwidth-Friendly Replacement Policy

Managing Off-Chip Bandwidth: A Case for Bandwidth-Friendly Replacement Policy Managing Off-Chip Bandwidth: A Case for Bandwidth-Friendly Replacement Policy Bushra Ahsan Electrical Engineering Department City University of New York bahsan@gc.cuny.edu Mohamed Zahran Electrical Engineering

More information

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Memory Management

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Memory Management ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective Part I: Operating system overview: Memory Management 1 Hardware background The role of primary memory Program

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

Memory hierarchy review. ECE 154B Dmitri Strukov

Memory hierarchy review. ECE 154B Dmitri Strukov Memory hierarchy review ECE 154B Dmitri Strukov Outline Cache motivation Cache basics Six basic optimizations Virtual memory Cache performance Opteron example Processor-DRAM gap in latency Q1. How to deal

More information

Basic Memory Management. Basic Memory Management. Address Binding. Running a user program. Operating Systems 10/14/2018 CSC 256/456 1

Basic Memory Management. Basic Memory Management. Address Binding. Running a user program. Operating Systems 10/14/2018 CSC 256/456 1 Basic Memory Management Program must be brought into memory and placed within a process for it to be run Basic Memory Management CS 256/456 Dept. of Computer Science, University of Rochester Mono-programming

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

Lecture 8 Sept 25, 2014

Lecture 8 Sept 25, 2014 CS 224: Advanced Algorithms Fall 2014 Prof. Jelani Nelson Lecture 8 Sept 25, 2014 Scribe: Jean Pouget-Abadie 1 Online Algorithms - Overview In this lecture, we are going to cover Online algorithms which

More information

SOPA: Selecting the Optimal Policy Adaptively for a cache system

SOPA: Selecting the Optimal Policy Adaptively for a cache system SOPA: Selecting the Optimal Policy Adaptively for a cache system YANG WANG, JIWU SHU, GUANGYAN ZHANG, WEI XUE, WEIMIN ZHENG Tsinghua University With the development of storage technique, new caching policies

More information

2 Improved Direct-Mapped Cache Performance by the Addition of a Small Fully-Associative Cache and Prefetch Buffers [1]

2 Improved Direct-Mapped Cache Performance by the Addition of a Small Fully-Associative Cache and Prefetch Buffers [1] EE482: Advanced Computer Organization Lecture #7 Processor Architecture Stanford University Tuesday, June 6, 2000 Memory Systems and Memory Latency Lecture #7: Wednesday, April 19, 2000 Lecturer: Brian

More information

OPERATING SYSTEM. Chapter 9: Virtual Memory

OPERATING SYSTEM. Chapter 9: Virtual Memory OPERATING SYSTEM Chapter 9: Virtual Memory Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel Memory

More information

Virtual Memory. CSCI 315 Operating Systems Design Department of Computer Science

Virtual Memory. CSCI 315 Operating Systems Design Department of Computer Science Virtual Memory CSCI 315 Operating Systems Design Department of Computer Science Notice: The slides for this lecture have been largely based on those from an earlier edition of the course text Operating

More information

CRC: Protected LRU Algorithm

CRC: Protected LRU Algorithm CRC: Protected LRU Algorithm Yuval Peress, Ian Finlayson, Gary Tyson, David Whalley To cite this version: Yuval Peress, Ian Finlayson, Gary Tyson, David Whalley. CRC: Protected LRU Algorithm. Joel Emer.

More information

THE EFFECT OF JOIN SELECTIVITIES ON OPTIMAL NESTING ORDER

THE EFFECT OF JOIN SELECTIVITIES ON OPTIMAL NESTING ORDER THE EFFECT OF JOIN SELECTIVITIES ON OPTIMAL NESTING ORDER Akhil Kumar and Michael Stonebraker EECS Department University of California Berkeley, Ca., 94720 Abstract A heuristic query optimizer must choose

More information

Unit 2 Buffer Pool Management

Unit 2 Buffer Pool Management Unit 2 Buffer Pool Management Based on: Pages 318-323, 541-542, and 586-587 of Ramakrishnan & Gehrke (text); Silberschatz, et. al. ( Operating System Concepts ); Other sources Original slides by Ed Knorr;

More information

Buffer Caching Algorithms for Storage Class RAMs

Buffer Caching Algorithms for Storage Class RAMs Issue 1, Volume 3, 29 Buffer Caching Algorithms for Storage Class RAMs Junseok Park, Hyunkyoung Choi, Hyokyung Bahn, and Kern Koh Abstract Due to recent advances in semiconductor technologies, storage

More information

A Reconfigurable Cache Design for Embedded Dynamic Data Cache

A Reconfigurable Cache Design for Embedded Dynamic Data Cache I J C T A, 9(17) 2016, pp. 8509-8517 International Science Press A Reconfigurable Cache Design for Embedded Dynamic Data Cache Shameedha Begum, T. Vidya, Amit D. Joshi and N. Ramasubramanian ABSTRACT Applications

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

15-740/ Computer Architecture Lecture 12: Advanced Caching. Prof. Onur Mutlu Carnegie Mellon University

15-740/ Computer Architecture Lecture 12: Advanced Caching. Prof. Onur Mutlu Carnegie Mellon University 15-740/18-740 Computer Architecture Lecture 12: Advanced Caching Prof. Onur Mutlu Carnegie Mellon University Announcements Chuck Thacker (Microsoft Research) Seminar Tomorrow RARE: Rethinking Architectural

More information

Memory hier ar hier ch ar y ch rev re i v e i w e ECE 154B Dmitri Struko Struk v o

Memory hier ar hier ch ar y ch rev re i v e i w e ECE 154B Dmitri Struko Struk v o Memory hierarchy review ECE 154B Dmitri Strukov Outline Cache motivation Cache basics Opteron example Cache performance Six basic optimizations Virtual memory Processor DRAM gap (latency) Four issue superscalar

More information

Chapters 9 & 10: Memory Management and Virtual Memory

Chapters 9 & 10: Memory Management and Virtual Memory Chapters 9 & 10: Memory Management and Virtual Memory Important concepts (for final, projects, papers) addressing: physical/absolute, logical/relative/virtual overlays swapping and paging memory protection

More information

Advanced Computer Architecture

Advanced Computer Architecture ECE 563 Advanced Computer Architecture Fall 2009 Lecture 3: Memory Hierarchy Review: Caches 563 L03.1 Fall 2010 Since 1980, CPU has outpaced DRAM... Four-issue 2GHz superscalar accessing 100ns DRAM could

More information

Hibachi: A Cooperative Hybrid Cache with NVRAM and DRAM for Storage Arrays

Hibachi: A Cooperative Hybrid Cache with NVRAM and DRAM for Storage Arrays Hibachi: A Cooperative Hybrid Cache with NVRAM and DRAM for Storage Arrays Ziqi Fan, Fenggang Wu, Dongchul Park 1, Jim Diehl, Doug Voigt 2, and David H.C. Du University of Minnesota, 1 Intel, 2 HP Enterprise

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

The Performance Impact of Kernel Prefetching on Buffer Cache Replacement Algorithms

The Performance Impact of Kernel Prefetching on Buffer Cache Replacement Algorithms IEEE TRANSACTIONS ON COMPUTERS, VOL. 56, NO. 7, JULY 2007 889 The Performance Impact of Kernel Prefetching on Buffer Cache Replacement Algorithms Ali R. Butt, Member, IEEE, Chris Gniady, Member, IEEE,

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

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

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

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

Flash-Conscious Cache Population for Enterprise Database Workloads

Flash-Conscious Cache Population for Enterprise Database Workloads IBM Research ADMS 214 1 st September 214 Flash-Conscious Cache Population for Enterprise Database Workloads Hyojun Kim, Ioannis Koltsidas, Nikolas Ioannou, Sangeetha Seshadri, Paul Muench, Clem Dickey,

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 2018 L20 Virtual Memory Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 Questions from last time Page

More information

Architecture Tuning Study: the SimpleScalar Experience

Architecture Tuning Study: the SimpleScalar Experience Architecture Tuning Study: the SimpleScalar Experience Jianfeng Yang Yiqun Cao December 5, 2005 Abstract SimpleScalar is software toolset designed for modeling and simulation of processor performance.

More information

Power and Locality Aware Request Distribution Technical Report Heungki Lee, Gopinath Vageesan and Eun Jung Kim Texas A&M University College Station

Power and Locality Aware Request Distribution Technical Report Heungki Lee, Gopinath Vageesan and Eun Jung Kim Texas A&M University College Station Power and Locality Aware Request Distribution Technical Report Heungki Lee, Gopinath Vageesan and Eun Jung Kim Texas A&M University College Station Abstract With the growing use of cluster systems in file

More information

University of Waterloo Midterm Examination Solution

University of Waterloo Midterm Examination Solution University of Waterloo Midterm Examination Solution Winter, 2011 1. (6 total marks) The diagram below shows an extensible hash table with four hash buckets. Each number x in the buckets represents an entry

More information

Live Virtual Machine Migration with Efficient Working Set Prediction

Live Virtual Machine Migration with Efficient Working Set Prediction 2011 International Conference on Network and Electronics Engineering IPCSIT vol.11 (2011) (2011) IACSIT Press, Singapore Live Virtual Machine Migration with Efficient Working Set Prediction Ei Phyu Zaw

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

A Cache Hierarchy in a Computer System

A Cache Hierarchy in a Computer System A Cache Hierarchy in a Computer System Ideally one would desire an indefinitely large memory capacity such that any particular... word would be immediately available... We are... forced to recognize the

More information

Lecture 19 Apr 25, 2007

Lecture 19 Apr 25, 2007 6.851: Advanced Data Structures Spring 2007 Prof. Erik Demaine Lecture 19 Apr 25, 2007 Scribe: Aditya Rathnam 1 Overview Previously we worked in the RA or cell probe models, in which the cost of an algorithm

More information

COSC 6385 Computer Architecture. - Memory Hierarchies (II)

COSC 6385 Computer Architecture. - Memory Hierarchies (II) COSC 6385 Computer Architecture - Memory Hierarchies (II) Fall 2008 Cache Performance Avg. memory access time = Hit time + Miss rate x Miss penalty with Hit time: time to access a data item which is available

More information

Principles of Operating Systems

Principles of Operating Systems Principles of Operating Systems Lecture 21-23 - Virtual Memory Ardalan Amiri Sani (ardalan@uci.edu) [lecture slides contains some content adapted from previous slides by Prof. Nalini Venkatasubramanian,

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

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2017 Lecture 23 Virtual memory Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 FAQ Is a page replaces when

More information

PAGE REPLACEMENT. Operating Systems 2015 Spring by Euiseong Seo

PAGE REPLACEMENT. Operating Systems 2015 Spring by Euiseong Seo PAGE REPLACEMENT Operating Systems 2015 Spring by Euiseong Seo Today s Topics What if the physical memory becomes full? Page replacement algorithms How to manage memory among competing processes? Advanced

More information

TECHNOLOGY trends have continued to increase the accesstime

TECHNOLOGY trends have continued to increase the accesstime IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 15, NO. 7, JULY 2004 1 Second-Level Buffer Cache Management Yuanyuan Zhou, Member, IEEE, Zhifeng Chen, and Kai Li, Senior Member, IEEE Abstract

More information

Operating Systems. Operating Systems Sina Meraji U of T

Operating Systems. Operating Systems Sina Meraji U of T Operating Systems Operating Systems Sina Meraji U of T Recap Last time we looked at memory management techniques Fixed partitioning Dynamic partitioning Paging Example Address Translation Suppose addresses

More information

CS 4284 Systems Capstone

CS 4284 Systems Capstone CS 4284 Systems Capstone Disks & File Systems Godmar Back Disks & Filesystems Disk Schematics Source: Micro House PC Hardware Library Volume I: Hard Drives 3 Tracks, Sectors, Cylinders 4 Hard Disk Example

More information

CS307: Operating Systems

CS307: Operating Systems CS307: Operating Systems Chentao Wu 吴晨涛 Associate Professor Dept. of Computer Science and Engineering Shanghai Jiao Tong University SEIEE Building 3-513 wuct@cs.sjtu.edu.cn Download Lectures ftp://public.sjtu.edu.cn

More information

Why memory hierarchy? Memory hierarchy. Memory hierarchy goals. CS2410: Computer Architecture. L1 cache design. Sangyeun Cho

Why memory hierarchy? Memory hierarchy. Memory hierarchy goals. CS2410: Computer Architecture. L1 cache design. Sangyeun Cho Why memory hierarchy? L1 cache design Sangyeun Cho Computer Science Department Memory hierarchy Memory hierarchy goals Smaller Faster More expensive per byte CPU Regs L1 cache L2 cache SRAM SRAM To provide

More information