arXiv:2610.18767cs.DSOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.18767

Two Holes Make a Difference: Deterministic Paging with Delay and Deadlines

Darya Melnyk, Linda Thelen, Yuyi Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

In this paper, we study online paging with delay or deadlines. In online paging with delay, an online algorithm manages a cache of size k and needs to serve incoming requests by adding the requested pages to the cache. In addition, it has the option to delay serving incoming requests at a cost that depends on the delay. We propose a new online algorithm, which combines a threshold rule with first-in, first-out (FIFO) replacement, and show that it is (2k+2)(2k + 2)-competitive for cache size k. This result corrects a previously published claim that the competitive ratio is exactly 2k+12k + 1 regardless of the number of holes (pages outside the cache). However, in the case of one hole, we show that the FIFO rule with a different threshold is indeed (2k+1)(2k + 1)-competitive, giving a tight result.

In the case of deadlines, the same analysis gives a deadline-triggered algorithm that is (k+1)(k+1)-competitive in general and kk-competitive if there is only one hole. Moreover, we show that the second hole makes paging with deadlines strictly harder than classical paging, where the competitive ratio is independent of the number of holes. For paging with deadlines, we prove a deterministic lower bound of k+12k + \frac{1}{2}, already for two holes. We show that, as a consequence, no threshold-triggered algorithm can achieve a competitive ratio less than 2k+322k + \frac{3}{2} in general.

1 Introduction

The paging problem is a fundamental problem in online computation, and it is one of the first problems studied in the competitive analysis framework [17]. In paging, an algorithm maintains a cache of k pages from a universe of n>kn > k pages. Upon requests to pages outside the cache—the holes—the algorithm must load them and evict others. The problem was first introduced in its offline variant by Belady [3], who was studying virtual-storage computers, which allowed algorithms to access larger amounts of data than could be stored in the physical memory of the computer. Today, the paging problem is often presented as a way to maintain a small fast local memory—the cache—by pulling and pushing data to and from a slow large memory. The requests are issued by the CPU directly to the cache, and one often cannot predict which page will be requested in the future. Paging has served as the starting point for weighted [2] and learning-augmented [14, 16] variants, and for broader models such as the k-server problem [15] and metrical task systems [5].

Classical paging assumes that every request needs to be served immediately. In practice, however, many requests can wait: background jobs, prefetches, or batch queries can tolerate some latency. As a result, requests can be batched, reducing the overall cost. This is captured by the paging with delay problem, first introduced by Azar et al. [1] as a special case of online service with delay, who proved a competitive ratio of O(k)\mathcal{O}(k). Here, an algorithm decides not only which page to evict but also when a page is worth fetching. A first exact analysis of this problem was presented in [13]. The authors proved a lower bound of 2k+12k + 1 for the competitive ratio of any algorithm and claimed to derive a tight upper bound for the problem. However, the claimed upper bound may only hold when k+1k + 1 pages are considered (the case with one hole). The example below shows that the LRU algorithm from [13] fails to be (2k+1)(2k + 1)-competitive on k+2k + 2 pages, so that the best remaining upper bound is the competitive ratio of 6k from [1].

1^{1}TU Berlin, Germany

2^{2}TU Darmstadt, Germany

3^{3}CRRC Zhuzhou Institute & Tengen Intelligence Institute, China

Example 1.1. Consider the LRU rule from [13]: if the adversary requests a page that is not in the cache already, the algorithm waits until the cost of delaying the request reaches the threshold δ:=k+1k\delta := \frac{k+1}{k}, and then fetches it. To serve the page, the algorithm evicts the least recently used page from the cache. Figure 1 presents a sample input sequence, where the competitive ratio of the algorithm is strictly larger than 2k+12k + 1, disproving the claimed upper bound from [13].

On this input sequence, LRU fetches a new page 5 times, incurring delay δ\delta each time. Its total cost therefore is 5⋅(1+δ)=12.55 \cdot (1 + \delta) = 12.5. OPT does not pay any delay cost and achieves a cost of exactly 2. The competitive ratio of LRU on this input sequence is 6.25>5=2k+16.25 > 5 = 2k + 1. Observe that the sequence can be continued by swapping the outer and the inner pages, and repeating the same request sequence. For general kk, see Theorem 6.1.

Figure

— LRU — OPT ○ request released × delay reaches δ=32\delta = \frac{3}{2}

Figure 1: A request sequence where the LRU algorithm with delays has competitive ratio larger than 2k+12k + 1 (illustrated for the case k = 2, with 4 pages). Each y-level represents a page, and the cache trajectories of LRU and OPT are shown in blue and orange, respectively. Each line represents a cache slot, and a line at the y-level of some page means that the corresponding cache slot holds the page associated with the y-level.

The results in this paper open new questions about the competitive ratio of the paging problem with delays, and suggest that there may be interesting new bounds to be discovered when two or more holes are considered, or through eviction rules other than the standard rules from classical paging.

Our results We give a simple, nearly optimal algorithm for paging with delay, relate the remaining gap to paging with deadlines, and show that, for deadlines, two holes make paging strictly harder than classical paging. Table 1 summarizes all bounds.

For paging with delay, we show that a simple nonclairvoyant algorithm, which fetches a page once its accumulated delay reaches a fixed threshold δ\delta and evicts pages in first-in, first-out order ( δ\delta-FIFO), is strictly (2k+2)(2k + 2)-competitive.

Theorem 1.2. 1-FIFO is strictly (2k+2)(2k+2)-competitive.

This is only an additive 1 above the lower bound of 2k+12k+1, which holds even for clairvoyant algorithms. On k+1k+1 pages and with threshold k+1k\frac{k+1}{k}, the algorithm is strictly (2k+1)(2k+1)-competitive, recovering the claimed bound from [13] through a new analysis. Our analysis is tight: for every fixed threshold, δ\delta-FIFO is no better than (2k+2)(2k+2)-competitive on k+2k+2 or more pages (Theorem 6.1).

An algorithm for paging with delay makes two decisions: when to fetch a page, which is a rent-or-buy decision, and which page to evict. Deciding which page to evict is already reflected in the paging with deadlines problem. For this problem, the same analysis as for Theorem 1.2 gives an upper bound of k+1k+1 in general, and a tight bound of k for the case of one hole. The latter coincides with the competitive ratio of classical paging, which does not depend on the number of holes. For paging with deadlines, however, we prove that the problem is strictly harder with more than one hole.

Theorem 1.3. Every deterministic clairvoyant online algorithm for paging with deadlines has competitive ratio at least k+12k + \frac{1}{2} on n≥k+2n \ge k + 2 pages.

The reason is that, with at least two pages missing from the cache, the optimal offline algorithm can serve requests in a different order than the online algorithm does.

Lastly, we study threshold algorithms for paging with delay, which time a fetch based on a fixed threshold for the delay cost. We show that this rule costs an additive k+1k+1 in the competitive ratio over the deadlines case: every lower bound ρ\rho for deadlines yields a lower bound of ρ+k+1\rho + k + 1 for threshold algorithms with delay (Proposition 6.3). For threshold-triggered FIFO, our analysis gives delay upper bounds exactly k+1k+1 above the deadline upper bounds.

All proofs were verified in Lean.4^{4}

ProblemPagesAlgorithmsLower boundUpper bound
Delayn=k+1n = k+1any2k+12k+1Krnetić et al. [13]2k+12k+1Theorem 3.5
n≥k+2n \ge k+2any2k+12k+1Krnetić et al. [13]2k+22k+2Theorem 1.2
threshold2k+322k+\frac{3}{2}Theorem 6.42k+22k+2Theorem 1.2
δ\delta-FIFO2k+22k+2Theorem 6.12k+22k+2Theorem 1.2
Deadlinesn=k+1n = k+1anykkSleator and Tarjan [17]kkTheorem 4.2
n≥k+2n \ge k+2anyk+12k+\frac{1}{2}Theorem 1.3k+1k+1Theorem 4.3

Table 1: Deterministic bounds for the competitive ratios of paging with delay and with deadlines. Results from this paper are in bold. Lower bounds hold for clairvoyant algorithms and non-strict competitive guarantees; upper bounds are strict and attained by nonclairvoyant algorithms. The row for threshold algorithms concerns the best algorithm within that class. The δ\delta-FIFO lower bound holds for every threshold δ>0\delta > 0, and its upper bound uses δ=1\delta = 1.

Related work Online problems with delay were first considered in the definition of the online TCP acknowledgment problem, where sending acknowledgments of messages can be delayed and aggregated to reduce the number of sent messages, while the delay results in latency costs [6, 7]. The idea of explicitly adding delays to online problems was proposed by Emek et al. [8], who presented the problem of min-cost perfect matching with delays, showing that delaying a decision may help to match nodes at a lower cost.

The paging problem with delay was introduced by Azar et al. in [1] as a special case of online service with delay problems. The authors present an O(kd4)\mathcal{O}(kd^4)-competitive clairvoyant algorithm on hierarchically separated trees (HSTs) of depth dd. By using a randomized embedding of general metrics into HSTs, they also present an O(klog⁡5n)\mathcal{O}(k\log^5 n)-competitive algorithm on general metrics. On star metrics, which correspond to weighted paging with delay, their algorithm is O(k)\mathcal{O}(k)-competitive. Krnetić et al. [13] prove a 2k+12k+1 clairvoyant lower bound and claim a 2k+12k+1 nonclairvoyant upper bound. In this work, we show that the latter upper bound only holds when one hole is allowed.

For a single server in general nn-point metric spaces, Touitou [18] presented an upper bound of O(log⁡n)\mathcal{O}(\log n) on the competitive ratio of clairvoyant online service with delay. In the nonclairvoyant case, Touitou [19] later presented an upper bound of O(nlog⁡n)\mathcal{O}(\sqrt{n}\log n). In the special case of uniform line metrics, Bienkowski et al. [4] showed an upper bound of O(log⁡n)\mathcal{O}(\log n) without clairvoyance.

4^{4} Formalization: https://github.com/licsth/paging-with-delay-formalization

Online service with deadlines contains the k-server problem as a special case, where each request must be served immediately. Thus, the clairvoyant lower bound of k on the competitive ratio [17] carries over to the paging problem with deadlines, already on k+1k+1 pages.

Randomized versions of these problems have also been considered in the literature. Gupta et al. [12] give a clairvoyant upper bound of O(log⁡nlog⁡k)\mathcal{O}(\log n \log k) on the weighted paging problem with delay, leaving a gap of a factor O(log⁡n)\mathcal{O}(\log n) to the Ω(log⁡k)\Omega(\log k) lower bound from classical paging [10]. For classical (weighted) paging, the bound Θ(log⁡k)\Theta(\log k) is tight [2]. For arbitrary metrics, Gupta et al. [11] present a clairvoyant O(polylog⁡(n,Δ))\mathcal{O}(\text{poly}\log(n, \Delta))-competitive algorithm, where Δ\Delta is the aspect ratio of the metric space, i.e., the ratio of the largest to the smallest inter-point distance.