Elamur Research

LithOS: An Operating System for Efficient Machine Learning on GPUs

Paper · 2025 · Patrick H. Coppock; Brian Zhang; Eliot H. Solomon; Vasilis Kypriotis; Leon Yang; Bikash Sharma; Dan Schatzberg; Todd C. Mowry; and Dimitrios Skarlatos

Summary

A GPU can have spare computing capacity and still be a poor place to put another job. The spare capacity may appear only between requests, or during parts of a job that cannot use all the hardware. A second job can fill those gaps, but once it starts a long operation, an urgent request may have to wait. The authors found this tension in a production advertising inference service at Meta, where device compute utilization averaged 27% even though the service had to meet tight response-time requirements. LithOS is their proposal for managing that tradeoff in software for GPU computing.

LithOS sits between applications and the NVIDIA driver. It separates the moment an application submits work from the moment the work reaches the GPU. The scheduler assigns individual thread processing clusters, or TPCs, to jobs and lends idle clusters to other work. It also divides long GPU operations into smaller launches called atoms. Each atom performs a subset of the original operation, giving the scheduler a chance to change the allocation before launching the next subset. The Rust prototype works beneath existing application frameworks and can split operations without their source code.

In experiments with concurrent inference services, LithOS reduced tail latency by 13× relative to NVIDIA’s Multi-Process Service, or MPS. Against the strongest prior research comparison highlighted by the authors, it reduced tail latency by 3× and improved aggregate throughput by 1.6×. When inference shared the device with training, the average tail-latency improvement over MPS was 4.7×. The authors report a 1.18× tail-latency improvement and 1.35× aggregate throughput relative to the strongest prior research comparison in that setting. These experiments isolate the scheduling mechanisms by turning off LithOS’s resource and power optimizations.

The paper tests those optimizations separately. For compute right-sizing, LithOS learns how much an operation speeds up as it receives more clusters, then applies a configurable limit on predicted slowdown. Across the tested workloads, this reduced time-weighted TPC usage by a mean of 26%, with a mean tail-latency increase and throughput decrease of 4% each. For power management, LithOS estimates how a sequence of operations responds to running at a lower clock frequency. That policy saved a mean of 26% in GPU energy relative to maximum frequency, with a 7% mean increase in tail latency. The experiments show how control over short pieces of GPU work can support scheduling, capacity management, and power management in the same software layer.

Deep dive: LithOS: An Operating System for Efficient Machine Learning on GPUs

LithOS shares GPUs by scheduling small pieces of work, reducing inference delays and adapting compute capacity and power to each workload. · about 35 minutes to read

The problem and its context

Why spare capacity can be hard to use

An inference service receives inputs and runs a trained network to produce answers. The arrival rate varies, but the service still has to respond promptly when traffic climbs. Keeping the network and its associated data resident in GPU memory avoids having to load them in the middle of serving a request. Keeping enough compute available for busy periods, in turn, can leave the device lightly loaded at other times. From the service operator’s perspective, some spare capacity is a consequence of planning for response time.

Batching introduces a similar tradeoff within a busy period. A service can group several requests so the GPU has more work to do in parallel. Waiting to collect a larger batch, however, uses part of the time the service has available to answer each request. The authors describe small batches as a reason the production service leaves compute capacity unused even when demand is high. They also point out that a program can leave GPU cores idle while waiting for communication. The amount of work the hardware could execute and the amount a particular application can supply at a given moment are different quantities.

The paper situates its production study alongside reports from Microsoft and Alibaba. It cites average GPU utilization of 52% in the Microsoft report and median utilization of 10% in the Alibaba report. Those statistics describe different deployments and use different ways of summarizing their observations. They illustrate the range of underutilization that motivates the paper. The Microsoft study concerns large-scale multi-tenant GPU training clusters.

What the production service reveals

The authors examine a subset of Meta’s advertising inference services. The part of the fleet they describe uses NVIDIA H100 nodes with 8 GPUs per node. The devices are divided using NVIDIA’s Multi-Instance GPU feature, called MIG. Operators analyze the networks offline and assign them to devices or partitions before deployment, with placement guided by requirements on the slowest responses. That setup makes the production study an example of a service already using hardware sharing and deliberate placement.

Over the observed week, device compute utilization ranged from 17% to 40%, averaging 27%. Utilization of the streaming multiprocessors, the GPU’s principal execution units, averaged 14%, with a low of 6.7% and a peak of 21%. Memory bandwidth utilization averaged 20%. Memory capacity usage, by comparison, stayed around 28%. The service kept data resident to respond quickly, while the amount of computation and memory traffic changed with incoming requests.

Demand followed a daily cycle. The authors report a 2.2× span between the minimum and maximum request rates, with the changes in traffic closely tracking changes in GPU utilization. Demand also varied substantially by network. The most popular member of the sampled group received several hundred times as many requests as the least popular. Giving each service room for its own peaks can leave some allocations lightly used for much of the observation period. The opportunity for sharing arises because these services place different demands on the hardware.

The authors also compare the space taken up by weights, parameters, and embeddings. The largest and smallest networks in their sample differ in size by more than 10×. A small memory footprint does not necessarily mean a service is rarely called. The smallest network in the sample receives traffic comparable to some larger ones. The placement problem therefore depends on both what must fit in memory and how much work arrives once those allocations are resident. A placement based on memory size can leave open the question of what happens when requests from different services reach the GPU together.

These observations give the paper a concrete target. Sharing should let other applications use compute that a latency-sensitive service leaves idle. It should also let that service obtain resources quickly when work comes in. A continuously running training job is one possible recipient of spare capacity, since completing more training work is beneficial even when individual batches have no hard deadline. Another inference service is a different case. It may have an objective of its own, so giving the first service priority over everything else is insufficient.

How earlier sharing schemes divide the device

The paper distinguishes temporal sharing from spatial sharing. Temporal sharing gives an application the device for a period of time, then hands it to another application. NVIDIA’s default time slicing rotates access among jobs, with exclusive turns lasting several milliseconds. The request-level serving systems the paper discusses, including Clipper, Clockwork, and INFaaS, make decisions about when to run whole requests. Other systems, such as PipeSwitch, AntMan, and TGS, can schedule individual kernels. A kernel is a GPU operation launched by an application, such as a convolution. Changing where turns begin and end gives a scheduler more control, while exclusive access still leaves any spare capacity inside a turn unavailable to other jobs.

Spatial sharing allows work from different applications to execute at the same time. MPS, NVIDIA’s Multi-Process Service, allows different GPU contexts to share an execution context. Concurrent work can keep the GPU busier. When jobs compete for the same resources, however, sharing can increase the time an urgent request takes to finish. The paper illustrates this with an execution timeline. The original task completes its critical kernels promptly when it runs alone, in spite of leaving hardware idle. With MPS, other work fills more of the device, and those same requests complete later.

MIG offers a different kind of spatial sharing. It divides compute and memory resources into hardware partitions at the boundary of a general processing cluster, or GPC. Separate partitions provide strong isolation, but a lightly loaded instance leaves resources idle inside its boundary. The paper cites a reconfiguration cost of >5s. Adjusting the partition in response to a short burst of requests is consequently a different proposition from changing which clusters may run the next kernel.

Prior research also tries to prevent a background job from interfering with latency-sensitive work by deciding which kernels may launch together. In the paper’s account, Orion looks for contention between operations, while REEF and other approaches limit when best-effort work may use the GPU. Such policies have to contend with head-of-line blocking. Once a long operation has taken a resource, an urgent operation can wait behind it even though the urgent operation has a higher priority. The delay depends on how long an already admitted piece of work holds the resource. If the scheduler only chooses among whole kernels, that piece can be long relative to an inference deadline.

Why the authors move control below the framework

Some prior systems coordinate applications at the serving or machine-learning framework level. The paper describes arrangements in which jobs share a process and use a custom framework. Some also require offline profiles or changes to kernel code. Coordinating at that level can give the scheduler useful information about the applications. It also makes compatibility and cooperation part of the design. The paper identifies TGS as an example of a software approach that makes sharing transparent to containerized applications, alongside NVIDIA’s native sharing options.

The authors identify a similar issue in managing the amount of compute assigned to a job. Many earlier right-sizing techniques operate on whole jobs. If one operation needs much of the GPU and another has too few threads to exploit it, a single allocation gives the system a coarse compromise. Some work cited in the paper also depends on offline measurements, specialized hardware, or changes above the driver. LithOS instead seeks to make an allocation decision using information about an individual kernel as it runs.

The power-management literature described in the paper includes policies that work at the level of an inference request and approaches that profile different input lengths. Some also train predictors of output length. Those policies use information about the particular service being optimized. LithOS asks whether the system can infer enough from the work arriving at the driver to make frequency decisions without that application-specific preparation. The paper discusses these earlier approaches in connection with DynamoLLM.

The operating-system analogy supplies the design direction. A CPU operating system controls which work runs on which cores and when to hand those cores over. The authors want comparable control over GPU work, while accounting for the way GPUs execute many thread blocks at once and the difficulty of interrupting active work. Their design places the boundary at the driver interface. Below that boundary LithOS can observe launches, queue them, and decide which hardware they should use. Above it, the application continues to issue CUDA calls.

The method, step by step

From an application call to a GPU launch

An application writes a kernel as a grid of thread blocks. Each block contains threads that execute on a streaming multiprocessor, or SM. The application specifies a grid and resources such as shared memory at launch. On the hardware side, SMs belong to thread processing clusters, or TPCs, which in turn belong to GPCs. In the paper’s H100 example, each of the 8 GPCs contains 9 TPCs, each TPC contains 2 SMs, and each SM contains 128 cores. A thread block is a division of program work, while a TPC is a division of the physical compute resources. LithOS can choose which TPCs a piece of work may occupy.

Applications submit work through CUDA streams. A stream orders its operations from first submitted to first eligible to execute, while independent streams can allow concurrent execution. A CUDA launch can be asynchronous, so the application can continue while its GPU work waits or runs. Some calls instead have to wait for earlier operations to complete. LithOS uses these existing semantics to insert a scheduling decision between application submission and dispatch to the device.

The prototype runs its control logic on CPU cores. Its dynamically linked library, LibLithOS, presents a CUDA Driver API interface to the application. When an application creates a stream, LithOS creates a corresponding launch queue. An asynchronous kernel launch places work in that queue and returns control to the caller. The queued work remains available to the scheduler until the scheduler chooses to dispatch it. This delay is deliberate. Once the GPU has the launch, LithOS loses the opportunity to change the resources or priority attached to it.

The launch queues give LithOS a view of eligible work from different applications. Dispatch threads decide when to send it, and separate tracking records the work already outstanding. The goal is to keep enough work available to feed the GPU while preserving room to respond to new requests. A large device backlog can hide submission delays, but it can also commit the device to work that the scheduler would have reordered had it remained in software.

How LithOS dispatches GPU work

The steps in order.

How LithOS dispatches GPU workStep 1: Intercept a CUDA launch1. Intercept a CUDA launchStep 2: Queue the work for its stream2. Queue the work for its streamStep 3: Check quotas and available clusters3. Check quotas and available clustersStep 4: Predict duration and split long kernels4. Predict duration and split long kernelsStep 5: Apply enabled resource and frequency policies5. Apply enabled resource and frequency policiesStep 6: Dispatch work within the backlog limit6. Dispatch work within the backlog limitStep 7: Track completions and update runtime estimates7. Track completions and update runtime estimates

Assign clusters and lend spare capacity

Users or administrators can give an application a compute quota expressed as a number of TPCs. The quota identifies the compute capacity the scheduler should make available when the application has work. Each dispatch can have its own TPC assignment. This is how LithOS can use a finer partition than MIG and make a different placement decision for the next launch without reconfiguring hardware instances.

A static quota would leave its assigned clusters idle whenever the application runs out of eligible work. LithOS therefore implements TPC Stealing. An application can borrow capacity that another application is not using. In the paper’s scheduling example, the first job can accelerate a piece of work by drawing on clusters set aside for an idle job. When the idle job receives a request, subsequent dispatches can return capacity to it. Borrowing and returning compute take place by changing launch assignments.

The challenge is the interval between a new request arriving and the borrowed clusters becoming available. If a best-effort kernel has just begun using them, the request may be delayed by work with a lower priority. This is priority inversion. A priority policy can decide who receives the next available resource, but the resource must first become available. LithOS uses predictions of kernel duration, limits on outstanding work, and lower hardware stream priorities for borrowed capacity to reduce the chance of a long wait.

The scheduler maintains timers for individual TPCs based on predicted durations at dispatch. These timers help it judge when an occupied cluster is likely to become free. Sync queues track launches that have already reached the GPU. A tracker thread observes completions, updates the scheduler’s view of the queues, and refreshes the relevant timing information. The scheduler throttles submissions against a tunable backlog threshold. This preserves the ability to react to a new arrival while keeping the device supplied.

These mechanisms address different kinds of delay. Stream priority influences which work is favored when the hardware can choose among pending operations. Backlog control influences how much work has already escaped software control. Duration prediction helps the scheduler estimate when that work will release resources. Atomization changes the amount of work a single dispatch represents, which is especially important when the kernel would otherwise stay on the GPU for much longer than the scheduler wants to commit the resources.

Split a long kernel without changing its code

The paper calls a subset of a kernel’s thread blocks an atom. If a kernel is predicted to run a long time on the TPCs it has been assigned, LithOS divides it into atoms that can be dispatched separately. At a boundary between atoms, it can alter where the remaining work runs. An urgent request still might wait for a piece already executing. The opportunity comes from withholding later pieces or sending them to other clusters.

To select how finely to split work, the scheduler predicts the kernel’s duration under the current TPC assignment. The atomizer uses that estimate and a tunable target duration. The paper describes the initial sizing calculation as a division.

predicted kernel duration ÷ atom_duration

The first quantity is the scheduler’s estimate for the whole kernel on its assigned TPCs. atom_duration is the target time for a chunk. The quotient guides how many atoms to make. The target trades shorter intervals between scheduling decisions against the costs of making and launching more pieces.

The difficulty is maintaining the original kernel’s view of its grid. A kernel may use its block coordinates to decide what part of the input to read or where to store a result. Giving a chunk a smaller grid and numbering its blocks from the beginning could change that computation. LithOS launches a small wrapper, called a Prelude kernel, with the original grid configuration and resource requirements. Each block in the wrapper checks its own position. Blocks within the selected range enter the original kernel, and the others exit before doing its work.

For that test, the wrapper maps the original multidimensional coordinates to a linear block index.

block_idx = blockIdx.z × gridDim.y × gridDim.x + blockIdx.y × gridDim.x + blockIdx.x

block_idx is the flattened index of the current block. blockIdx.x, blockIdx.y, and blockIdx.z are its coordinates on the three grid axes. gridDim.x and gridDim.y are the grid extents in the corresponding directions. The multiplication by both extents counts the blocks in preceding planes. The multiplication by gridDim.x counts the blocks in preceding rows of the current plane, and blockIdx.x gives the remaining position within the row.

block_idx_lo ≤ block_idx < block_idx_hi

block_idx_lo is the inclusive start of the selected range and block_idx_hi is its exclusive end. The condition holds when block_idx, the flattened index, belongs to that atom. The metadata supplied to the wrapper contains the range and the original kernel’s entry point. Passing that entry point lets the wrapper invoke the original code with the launch arguments. Partitioning the index range into disjoint intervals gives each original block exactly one chance to execute the kernel body across all the launches.

The authors use a convolution with grid dimensions {8,8,1} to illustrate the process. Its 64 blocks have flattened indices from 0 to 63. One Prelude launch can accept [0,32) and another can accept [32,64). Both launches have the same grid shape as the original convolution. A block in the latter interval uses its original coordinates when it reaches the convolution, even though its work happens during a later launch. This particular grid can be split into as many as 64 atoms.

The wrapper approach matters for compatibility. LithOS can use the entry point of a kernel from a closed library such as cuDNN without access to the code that defined it. It also avoids requiring the application to compile a special variant of each kernel for each chunk size. The paper evaluates the mechanism as a runtime operation below the application’s framework.

The wrapper has a cost. A block that exits early still enters the wrapper, and launching more atoms creates more of this work. For a kernel composed of many small pieces of computation, the extra traffic and the checks can outweigh the scheduling benefit. LithOS can disable atomization for some kernels. It can also adjust the target duration for grids with many blocks to avoid excessive splitting. The design therefore treats a short atom as a scheduling opportunity with an associated launch cost.

The scheduler and atomizer together determine how quickly borrowed capacity can be relinquished. In the paper’s example, stealing alone lets a job use clusters that would be idle, but a later request can be blocked behind a whole kernel. With atoms, subsequent pieces of the borrower’s kernel can be held back from the borrowed clusters as soon as the other job has work. The original application still submits one kernel. LithOS can make several placement decisions during its execution.

Learn timings while applications run

Predicting kernel duration is a shared dependency of the scheduling, right-sizing, and power policies. LithOS records durations during normal execution and maintains predictions separately for independent launch queues. A measurement is associated with conditions that can affect it, including TPC allocation, frequency, and the way the kernel was atomized. Those details matter because measuring one kernel on a wide partition says little by itself about how long an atom from it would run on a narrower partition.

A CUDA kernel function can appear in several parts of a network. The paper uses convolution to illustrate the identification problem. Two layers can call the same function on differently sized tensors and take different amounts of time. A timing record keyed only by the function would combine executions with different cost. LithOS uses explicit application synchronization events to identify batch boundaries and then records the ordinal position of a launch within the batch.

The paper denotes this position by k in its description of prediction. It is the position of a kernel after the beginning of the batch. The runtime can associate that position with an operator in a repeatedly executed sequence without inspecting the application’s dataflow graph. This use of k is separate from the latency slip parameter, for which the paper uses the same letter. The ordinal is part of identifying an observation, while the slip parameter controls a policy decision.

When there is no measurement for a particular configuration, the predictor assumes linear scaling as a fallback. The example in the paper starts from an atom measured at a TPC allocation of 100% and uses a linear trend to estimate its runtime on half the device. Completions then provide observations under the configurations that actually run. LithOS learns from measurements of running work and supports this process without preparing an offline profile of every application.

Choose enough TPCs for the kernel

Right-sizing asks how many clusters an operation can use productively. Different kernels in the same execution can scale differently. The paper’s Llama inference example includes matrix multiplication and attention kernels that continue to gain from more TPCs with diminishing returns. A kernel applying a token frequency penalty shows no scaling benefit in the example. Allocating clusters for the most scalable operation throughout the entire workload would reserve resources during work that cannot benefit from them.

LithOS estimates a kernel’s scaling curve from its latency on the full TPC complement and on a single TPC. Its fitted expression follows the shape of Amdahl’s law for parallel speedup.

l = m ÷ t + b

l is the predicted kernel latency and t is the number of TPCs assigned. m is the fitted constant for the portion that changes as cluster count increases. b is the fitted latency that remains as the parallel term shrinks. The authors relate b intuitively to the time needed for a single thread block on an SM. In this expression, an increase in t shrinks the contribution from m, and b determines where the predicted benefit levels off.

The scheduler also uses occupancy to catch operations for which the fitted curve is unhelpful. Occupancy here means how many of the kernel’s blocks can run at once on a TPC. The driver can supply occupancy information, while LithOS already knows the size of the grid from launch and atomization metadata. A small grid can run out of blocks to assign well before it runs out of available clusters.

useful TPC bound = total kernel blocks ÷ concurrent blocks per TPC

useful TPC bound is the heuristic estimate of how many clusters the grid could use at once. total kernel blocks counts the blocks in the launch. concurrent blocks per TPC is the estimated capacity for that kernel on a cluster. The quotient is an occupancy-based bound on useful allocation. It gives the scheduler an alternative to extrapolating a scaling curve for some very short operations.

At dispatch, LithOS checks that bound against the job’s allocation. If the estimate is lower, it launches the kernel using the estimated bound. Otherwise, it consults the fitted curve and chooses the smallest allocation whose predicted latency stays within the configured multiplicative slip factor k. This factor expresses how much slower the kernel is allowed to be under the policy. The paper gives an example in which an administrator accepts up to 10% degradation. Atoms from the kernel inherit its TPC allocation under right-sizing, using the paper’s observation that they exhibit the same scaling behavior as their parent.

Right-sizing thus uses measured latency and available parallelism to answer related questions. The occupancy check estimates whether enough blocks exist to fill more clusters. The latency curve estimates whether assigning more clusters would shorten the operation enough to matter under the configured tolerance. The result is a launch decision that can change from kernel to kernel, even when both operations come from the same application and share the same overall quota.

Choose a clock frequency for a sequence

The power policy uses dynamic voltage and frequency scaling, or DVFS. Its control decision is the frequency at which to run GPU work. Lowering frequency can save energy, but it can also prolong execution. Kernels can differ in sensitivity to that change. A compute-heavy operation may slow substantially when its clock falls, whereas an operation spending much of its time waiting for memory may change less. LithOS estimates those sensitivities from execution data.

Frequency changes impose a cost substantially longer than many kernels. The paper gives a switching latency of roughly 50ms. Accordingly, the policy considers the cumulative effect of slowing a sequence of kernels instead of pursuing a new frequency at every launch. It assigns greater weight to kernels that account for more of a stream’s execution time.

w = kernel runtime ÷ cumulative kernel runtime in the stream

w is the weight of the kernel within its stream. kernel runtime is the total runtime attributed to that kernel in the sequence. cumulative kernel runtime in the stream is the total across all the kernels considered. The quotient measures how much the individual kernel contributes to the time the sequence spends executing.

k = lat(fₜₕ) ÷ lat(fₘₐₓ) − 1

In the frequency derivation, k denotes the fractional latency increase at the frequency being considered. lat(f) means the latency of the kernel at frequency f. fₜₕ is a supported device frequency under consideration, and fₘₐₓ is the device’s maximum frequency. The constant 1 removes the baseline from the latency ratio, leaving the excess over the maximum-frequency latency. For frequency selection, the configured slip specifies the allowed increase that the policy compares with its prediction.

lat(fₜₕ) ÷ lat(fₘₐₓ) − 1 ≈ s × (fₘₐₓ ÷ fₜₕ − 1)

The frequency and latency terms retain the same meanings. s is the sensitivity of the kernel to a change in frequency. The second 1 in the expression removes the baseline from the ratio of maximum to candidate frequency. The approximation treats relative slowdown as proportional to that change in inverse frequency. The paper motivates this relationship with a first-order Taylor approximation.

s = k ÷ (fₘₐₓ ÷ fₜₕ − 1)

Here s is the sensitivity inferred from a fractional slowdown k observed at the candidate frequency. fₘₐₓ and fₜₕ are the maximum and candidate frequencies, respectively. Subtracting 1 gives the change in inverse frequency relative to the maximum-frequency baseline. The quotient expresses how much measured slowdown is associated with that change when there is a frequency difference to measure.

S = Σ(w × s)

S is the sensitivity for the sequence. Σ adds a contribution for each kernel in that sequence. Each contribution is the kernel’s runtime weight w multiplied by its frequency sensitivity s. This lets a frequent or long-running compute-sensitive operation influence the decision more than a brief operation with the same sensitivity.

S × (fₘₐₓ ÷ f_final − 1) ≤ k

f_final is the frequency the policy selects for the work, fₘₐₓ is the maximum frequency, and S is the aggregate sensitivity. The 1 in parentheses removes the baseline contribution from the frequency ratio. The left side estimates the sequence’s fractional slowdown. The inequality compares that estimate with k, the permitted fractional increase in the frequency calculation.

f_final = fₘₐₓ ÷ (1 + k ÷ S)

This expression gives the frequency at the boundary of the slowdown inequality when S is positive. f_final and fₘₐₓ again denote the target and maximum frequencies. k is the allowed fractional slowdown in the calculation, and S is the sequence sensitivity. The 1 restores the baseline to the inverse-frequency ratio. The device supports discrete frequencies, so the expression guides a choice from hardware-supported settings.

LithOS gathers initial timings for unseen kernels at maximum frequency. Beginning with an assumption of linear scaling, it tries a reduction guided by the configured slip. The observed performance determines whether it probes lower frequencies or stops after confirming that the kernel responds much as expected. It extends the learning period to avoid frequent switches while the evidence is sparse. As it records observations, it fits the frequency response and uses the sequence estimate to guide later choices. Atoms inherit their parent kernel’s frequency target.

The three decisions share an implementation but act on different quantities. Atomization determines which blocks belong to the work sent in a launch. TPC allocation determines which compute clusters may execute that work. Frequency selection determines the operating speed for a sequence. Keeping the decisions at the driver boundary allows observations from the same application stream to support all of them.

Preserve the application interface

The reported prototype uses ∼5000 lines of Rust, excluding code generated for CUDA Driver API interposition. It provides implementations for selected calls such as kernel launch and generates interposition code for the rest of the interface. Libraries and frameworks that eventually reach that API can access LithOS through the same driver boundary. The prototype supports native and containerized applications, and it relies on MPS to enable concurrent execution across GPU contexts.

Applications retain separate address spaces. The authors describe illegal memory accesses as terminating the offending application and describe handling common faults by intercepting signals so the affected application can be stopped without terminating other contexts. These facilities concern memory access and fault handling. The TPC scheduler concerns interference over compute resources, with its own mechanisms for quotas, borrowing, and admission. The paper’s operating-system proposal puts these responsibilities at a common boundary while continuing to use the underlying NVIDIA stack.

Experiments and results

Testbed, workloads, and comparisons

The controlled experiments ran on a Lambda Labs instance with 216 GB of host memory, 30 CPU cores, and an A100 SXM4 GPU. The GPU had 108 SMs and 40 GB of memory. The setup used Ubuntu 22.04 and CUDA 12.8. The inference services ran on Triton 24.12, using TensorRT 10.7 or TensorRT-LLM 0.16.0 where applicable. RetinaNet used ONNX Runtime. This is a separate setting from the H100 service study. The production study establishes the motivation, while these tests change the scheduling policies under controlled conditions.

The inference workloads span vision and language. The vision selections were RetinaNet, YOLOv4, and ResNet-50 v1.5. The language selections were Llama 3 8B, GPT-J 6B, and BERT-Large. The authors use a Microsoft Azure trace for the large-language inference workloads. Triton uses dynamic batching for the high-priority services. The results describe serving behavior, including the time a request spends in the serving stack before its end-to-end response. The language workload selection includes BERT.

Training workloads include MobileNetV2, VGG-19, and ResNet-50. The set also includes DLRM recommendation training, BERT-Large training, and Llama 3 fine-tuning. The best-effort training job runs continuously. The described batch-sizing policy aims to leave room for co-resident allocations, while the workload table reports the actual per-workload configurations. Those configurations span different batch sizes and iteration latencies. DLRM, for instance, has a batch size of 32,768 and a reported training latency of 74 ms. Llama 3 fine-tuning has a batch size of 4 and a reported latency of 690 ms. The batch count therefore has to be read together with the identity of the workload. The convolutional training selection includes VGG.

The NVIDIA baselines were time slicing, MPS, stream priority, and MIG. The authors also compared against TGS, REEF, and Orion. They could run the open-source TGS directly. For REEF and Orion, the available implementations depended on specific drivers and software stacks, so the authors reimplemented their scheduling approaches on the same interposition infrastructure used for LithOS.

The paper also spells out how those implementations handle multiple high-priority applications. In the REEF extension, best-effort kernels wait if any high-priority application is running. In the Orion extension, best-effort kernels wait if they would contend with any high-priority kernel. This distinction matters in a test with more than one protected service, because both systems need an admission rule for the additional high-priority work. The experiments also include a thread-limits configuration that provisions separate shares for the high-priority applications.

The main multitenancy tests leave hardware right-sizing and DVFS disabled. Their throughput and latency results therefore reflect the scheduling design, including the way it launches and places atoms. The capacity and power evaluations enable the relevant optimizations in separate tests. This setup allows readers to trace each reported gain to the policy that was active.

Sharing among inference services

The inference-only test gives the applications different jobs. A high-priority application called HP A is evaluated on the fraction of requests that finish within a specified time. HP B, also high priority, has a throughput objective measured relative to what it can attain when alone on the GPU. A best-effort application submits work in a closed loop. The high-priority services instead receive Poisson arrivals, so the test exercises variable request timing even at a configured load.

The language workloads are candidates for HP B and for the best-effort role. HP A can also be ResNet or RetinaNet. The authors test all combinations in their setup. Their HP A settings pair the workload’s arrival rate with a latency constraint. ResNet runs at 1000 requests per second with a 15 ms constraint. RetinaNet runs at 9 requests per second with a 100 ms constraint. Llama 3 and GPT-J each run at 0.5 requests per second with a 2000 ms constraint. BERT runs at 30 requests per second with a 130 ms constraint. The paper draws the deadlines from the Datacenter scenario of the MLPerf Inference Benchmark.

The partitioned configurations target shares of 75% for HP A and 25% for HP B. MIG’s supported layouts require the authors to use a 3/7-4/7 split. MIG and thread limits serve the provisioned high-priority applications without the best-effort application in this test. Systems that distinguish work by priority but lack separate partitions for the two high-priority services give both the high designation and assign the background work low priority.

The paper plots attainment of the service-level objective, or SLO, beside aggregate throughput. An attainment value of 100% means both high-priority services reach their respective objectives. On the throughput scale, 1 represents the paper’s full-device reference. The chart below uses the aggregate throughput values that the authors report for MPS, the partitioned configurations, and LithOS.

Aggregate normalized throughput in inference-only multitenancy

MPS led on raw throughput, while LithOS achieved the full-device reference with both service objectives met.

Aggregate normalized throughput in inference-only multitenancyMIG: 0.59MIG0.59Thread limits: 0.66Thread limits0.66LithOS (this paper): 1LithOS (this paper)1MPS: 1.08MPS1.08
The numbers
System or settingnormalized aggregate throughput
MIG0.59
Thread limits0.66
LithOS (this paper)1
MPS1.08

MPS attains 42% on the SLO measure in spite of reaching aggregate throughput of 1.08. Allowing kernels to share resources within an SM enables efficient packing, while the service experiences interference from the competing work. MIG and thread limits meet the objectives by provisioning separate resources for the protected jobs, with lower combined throughput from those jobs. Among the systems in the paper without isolation between the high-priority apps, TGS leads on objective attainment at 72%. LithOS reaches 100% attainment and aggregate throughput of 1.

Goodput helps locate the sources of that result. The paper excludes HP A requests that miss their latency constraint from the useful-throughput calculation. LithOS and the fixed partitions perform similarly for HP A on this measure. For HP B, the reported goodput is 0.31 with MIG and 0.50 with LithOS. LithOS also supplies 0.15 of best-effort throughput on the paper’s normalized scale. The best-effort application is absent under the fixed-partition configurations, so this part of the comparison reflects differences in which work the policies can admit.

For HP A latency, the authors calculate P99 for each workload and average across the combinations. P99 identifies the position near the slow end of the request distribution. It gives a view of service behavior that aggregate completion rate can obscure. The paper reports that LithOS and the partitioning schemes keep tail latencies within the specified constraints across the workloads shown. Compared with MPS, LithOS reduces P99 latency by 13×. The corresponding improvements are 12× over Orion and 3× over TGS. In its headline comparison against the strongest prior research result, the paper also reports 1.6× aggregate throughput. The objective, goodput, and P99 results describe why that combination of service performance and throughput matters.

Sharing between inference and training

The hybrid test places one latency-sensitive service beside a continuously running training job. The inference choices include BERT-Large, RetinaNet, and YOLOv4, with Llama 3 8B and GPT-J 6B as the other choices. The training job is drawn from the paper’s training suite, and the authors run all pairings. They choose the Poisson request load so that the inference service by itself uses around 80% of the GPU. The scheduling question is how much useful training can run while the service continues to handle incoming requests promptly. One of the detector workloads is YOLOv4.

The paper normalizes inference latency to the value for the same service running alone. For aggregate throughput, it normalizes inference throughput by the offered request rate and training throughput by the rate of that training job running alone. It then adds the normalized quantities. The resulting aggregate tracks progress for both workloads even though one completes requests and the other completes training work. The inference contribution can also be read separately to see whether the service is keeping pace with its offered load.

Under MPS, normalized inference latency is 5.83× the isolated case, and the service reaches 60% of offered throughput. Time slicing gives the inference service roughly 50% of GPU time, and the MIG setup gives it 50% of the device spatially. Both fall short of sustaining peak service throughput. Stream priority produces 2.89× isolated latency, with service throughput as low as 68%. The authors associate these outcomes with the difficulty of responding to a busy inference service when scheduling decisions or reservations remain coarse.

TGS reaches 1.41× isolated inference latency on average. The authors connect its result to a rate controller that expects a constant work arrival rate, an assumption poorly suited to the arrival patterns in this experiment. REEF’s average normalized inference latency is 2.89×, with tail latency reaching 8.93× in the comparisons reported. The paper attributes this to insufficient throttling of training in some combinations. In both cases the background work changes the timing conditions that the protected service encounters.

LithOS keeps the inference tail within 20% of the isolated reference in the comparison reported by the authors. Its relative improvement over TGS is 1.18× on average, and over REEF it is 2.34× on average. Compared with MPS, its tail-latency improvement is 4.7× on average and reaches 13.54×. LithOS keeps service throughput within 1% of offered load in the worst case. The authors also report that it delivers an average of 34× the training throughput and 1.35× the aggregate throughput of TGS. Training throughput is measured against TGS’s background progress in this comparison. Aggregate throughput incorporates the high-priority service, which explains why the two factors answer different questions.

Capacity and energy under separate policies

For right-sizing, the authors compare time-weighted average TPC usage before and after the policy. This measure gives longer-running work greater influence on the estimate of used compute capacity. The policy reduces that usage by as much as 51%, with mean savings of 26% across the evaluated workloads. With the latency slip parameter set to 1.1, the mean P99 increase is 4% and the mean throughput decrease is 4%. The authors observe that only part of an inference request or training iteration is spent executing GPU kernels, which helps explain why a kernel-level tuning parameter and an end-to-end performance change can differ.

For DVFS, the reference is execution at the GPU’s maximum frequency. The authors compare the energy consumed in that run with the energy consumed under the adaptive policy. Across the tested inference and training workloads, energy savings reach 46%, with a mean of 26%. The DVFS test uses a slip parameter of 1.1 and records a mean P99 latency increase of 7%. This comparison measures energy over execution, so it accounts for both the lower operating frequency and the longer time a workload may take to finish.

The two savings results quantify different changes. The capacity experiment tracks time-weighted use of a compute allocation. The frequency experiment tracks GPU energy. They arise from separate tests with their respective baselines, and the scheduling-only comparisons have both features disabled.

What the ablations show

How much the scheduling changes contribute

The hybrid breakdown starts from MPS and enables LithOS’s scheduling features in stages. With TPC scheduling active, normalized high-priority P99 latency reaches 1.38× the isolated reference. The service sustains its ideal throughput in that stage because the scheduler throttles background dispatches as needed. Adding atomization brings average normalized P99 latency to 1.19×. The comparison isolates the value of adjusting the unit of dispatch after the system already has control over where work may run.

High-priority P99 inference latency in the hybrid scheduling ablation

Splitting kernels lowered tail latency further after cluster scheduling was enabled.

High-priority P99 inference latency in the hybrid scheduling ablationTPC scheduling: 1.38TPC scheduling1.38TPC scheduling with kernel atomization (this paper): 1.19TPC scheduling with kernel atomization(this paper)1.19
The numbers
System or settingP99 latency relative to isolated inference
TPC scheduling1.38
TPC scheduling with kernel atomization (this paper)1.19

The authors report a 10% throughput overhead associated with atomization in this breakdown. They explain it in terms of reduced best-effort throughput as LithOS gives precedence to the inference service. The latency figure on its own would miss that cost. Protecting the high-priority tail can involve leaving fewer opportunities for background work, even though the complete scheduler can sustain substantial background throughput in the broader comparison.

The staged result also identifies what TPC scheduling can accomplish before the system splits kernels. It can prevent some contention by controlling where work is allowed and by slowing the admission of background work. Atomization adds the ability to revisit that choice during the lifetime of a long kernel. The relevant improvement is the reduction in the time the device stays committed to a single background launch.

Force the background job to issue longer kernels

The authors run a more targeted comparison with high-priority BERT inference. Its background job is either VGG training or Llama 3 inference. In the training experiment, they vary VGG’s batch size. In the inference experiment, they vary the length of the input sequence to the background Llama 3 workload. Both changes exercise the scheduler under conditions that can lengthen kernels, while the measurement remains the P95 latency of the protected BERT service.

Against REEF, LithOS improves that P95 latency by 6.5× for the training-batch experiment and 3.9× for the inference-sequence experiment. The comparison internal to LithOS is particularly informative. Enabling atomization improves P95 by 2× in the VGG experiment and by 1.3× in the Llama 3 experiment. With the full LithOS scheduler, BERT’s P95 stays within 14%, or 1ms, of the ideal for the largest training batch. For the longest inference sequence, it stays within 7%, or 0.45ms. These are BERT P95 results for a particular pairing and stress test, complementing the P99 results reported over the wider set of workloads.

The paper’s kernel-duration analysis explains the choice of these tests. Across training workloads, longer batches can lead to P99 kernel runtimes of several milliseconds. DLRM has kernel latencies exceeding 30ms in that analysis. The authors use memory usage to place batch sizes from different training workloads on a common axis, since the same raw batch count has different meanings across networks. They separately use small, medium, and large prompt groups from the Azure trace to show that inference itself can produce long kernels. Together, these observations show why a scheduler has to account for the duration of a launch even when both applications are serving requests.

Check the estimates that guide scheduling

The authors test predicted atom duration against timings measured with CUDA events. They count an absolute error greater than 50μs as a misprediction. For high-priority work, the misprediction rate is 0.9% in inference-only sharing and 0.38% in inference–training sharing. The corresponding P99 absolute errors are 49μs and 31μs. These comparisons test the timing estimates supplied to the scheduler and atomizer under concurrent execution.

Best-effort work is harder to predict. Its misprediction rates are 14% in inference-only sharing and 11% in the hybrid setting. The authors relate those errors to the lower priority of background work and the interruptions it experiences when high-priority work arrives. The error rates describe different scheduling conditions. High-priority work generally receives more consistent access, while the duration observed for background work can reflect the scheduler’s response to another application.

The authors also check the fitted curves used for compute right-sizing. They calculate a kernel-execution-time-weighted average of R² for the kernels to which they fit a curve. This statistic measures agreement between the fitted scaling curve and the measured latencies. Across the workloads tested, the average ranges from 0.92 for Llama fine-tuning to 0.99 for RetinaNet inference. The reported fits cover the kernels that pass the occupancy selection used for fitting. The occupancy heuristic handles cases in which available thread blocks already put a more direct limit on useful TPC allocation.

Limitations

Limits identified by the authors

The authors present LithOS as a prototype and a first step toward operating-system control of GPU workloads. Their implementation targets NVIDIA GPUs and uses MPS for concurrent execution across contexts. Its scheduling layer remains subject to the lifetime of work already dispatched. Atomization reduces the size of that commitment by introducing more launch boundaries. For a piece that has already started, the remaining wait still depends on its duration and on the state of the device.

There is an explicit overhead to choosing a very short target atom duration. The Prelude kernel performs extra work, including launching blocks that leave after checking their indices. The authors describe disabling or coarsening atomization for some workloads to keep this cost manageable. They also identify very short kernels as difficult cases for the simple TPC scaling curve. Their occupancy rule addresses one reason for poor scaling, namely too few blocks to occupy additional clusters.

Frequency transitions are another stated constraint. At roughly 50ms, a switch is costly relative to short operations, so LithOS aggregates estimates over work sequences and learns conservatively. The measured savings belong to that form of control. The authors suggest finer-grained frequency changes could create more opportunities, and they expect larger TPC counts could create more room for right-sizing. Those observations concern future hardware possibilities.

Limits of the evidence

The H100 advertising-service data and the A100 experiments answer different questions. The service observation establishes that a deployment with offline placement and hardware partitions can leave compute idle while serving requests under tight latency requirements. The prototype results establish performance on the A100 testbed with the specified arrival patterns, pairings, and software. Production deployment of LithOS in the measured service, and performance at fleet scale, are outside that evaluation.

The baselines also embody specific configurations. Comparing fixed partitions with LithOS in the inference-only experiment includes a difference in admission of best-effort work, since the fixed-partition configurations run only the provisioned services. For REEF and Orion, the measured behavior comes from the authors’ reimplementations and their rules for extending the policies to multiple high-priority jobs. The results establish relative performance for those implementations and configurations on the common testbed.

The right-sizing and power results give separate policy effects. The measured release in time-weighted TPC capacity does not establish how much additional application throughput a deployment would recover from that capacity. That depends on whether another job is ready to use the clusters and on how its work fits. The energy comparison similarly concerns GPU energy for the tested workloads, relative to their maximum-frequency runs. The paper leaves open the combined effect of enabling both policies during the full set of multitenant experiments.

The timing statistics describe the observed distribution of errors, with higher rates for background work than for protected work. They do not establish a bound on prediction error for arbitrary arrivals or launch sequences. Similarly, the scheduling results measure achieved tail latencies and objective attainment in the tested scenarios. They do not establish a worst-case deadline guarantee. The predictor observes kernel positions within batches, and the accuracy results apply to the sequences and configurations represented in the evaluation.

Finally, the isolation evidence covers specific properties. TPC placement controls access to compute clusters, the prototype maintains separate application address spaces, and the authors describe handling common faults. Memory and changes to a shared clock can still affect performance across work on the device. The paper provides evidence of useful performance isolation in its scheduling tests and describes mechanisms for process containment. A general characterization of isolation across all shared resources lies outside those tests.

What came after

There are no later citing works to discuss.

Cite

Cite as Patrick H. Coppock; Brian Zhang; Eliot H. Solomon; Vasilis Kypriotis; Leon Yang; Bikash Sharma; Dan Schatzberg; Todd C. Mowry; and Dimitrios Skarlatos. 2025. LithOS: An Operating System for Efficient Machine Learning on GPUs. arXiv:2504.15465.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2504.15465 · arXiv 2504.15465

@misc{mowry2025lithos,
  title = {{LithOS: An Operating System for Efficient Machine Learning on GPUs}},
  author = {Patrick H. Coppock; Brian Zhang; Eliot H. Solomon; Vasilis Kypriotis; Leon Yang; Bikash Sharma; Dan Schatzberg; Todd C. Mowry; and Dimitrios Skarlatos},
  year = {2025},
  doi = {10.48550/arxiv.2504.15465},
  eprint = {2504.15465},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2504.15465}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/coppock-2025-lithos-operating-system-efficient-machine/