Keywords: Resource allocation, Operating systems, Scheduling, Workloads, Adaptability, Machine learning, Predictive capabilities, Efficiency, Responsiveness, Self-optimizing
An operating system has to share a limited set of resources, namely processor time, memory, storage and input/output channels, among many programs that all want them at once. How well it does this decides whether a computer feels fast or sluggish, whether work gets done at a good rate, and whether every program gets a fair turn. Today that job is harder than it used to be. A single machine may be running a desktop session, a database, a cloud service and an AI job side by side, and each of these asks for resources in a very different way. Most classic scheduling methods were designed long before this mix became normal (Silberschatz et al., 2018) [1].
The classic methods are easy to describe. First-Come, First-Served (FCFS) is simple, but one long job can hold up many short ones. Shortest Job First (SJF) keeps the average wait low, but only if we know in advance how long each job will run, and we rarely do. Priority scheduling lets important work go first, but low-priority work can wait forever unless the system gradually raises its priority (aging). Round Robin is fair to interactive programs, but if the time slice is badly chosen the system wastes effort switching between processes. Multilevel queues are more flexible, but they still follow rules that someone wrote down beforehand.
What these methods share is that they react. They look at the system as it is right now and pick the next process, with no real idea of what the workload will need a few moments later. When a sudden burst of computation, a jump in memory use or a heavy stretch of disk activity arrives, the scheduler has no time to prepare. Waiting times grow, context switches pile up, the CPU sits idle at the wrong moments, and applications slow down.
Machine learning offers a way out. If a model can learn from past behavior how demand tends to change, it can guess what is coming and let the scheduler act before the squeeze happens. We do not suggest throwing away the proven ideas behind scheduling. The aim is to add prediction on top of them.
In this paper we describe a framework that turns operating-system measurements into features, uses machine learning models to estimate near-future CPU, memory and I/O demand, and passes those estimates to a decision step that adjusts scheduling. We also report a small measurement study that shows the kind of workload variation that makes prediction worthwhile.
Work on scheduling has moved from fixed algorithms, through hand-tuned heuristics, to methods that learn. The older algorithms are still widely used because they cost almost nothing to run and everyone understands how they behave. Their weakness is that fixed rules cope poorly when workloads are mixed and keep changing (Silberschatz et al., 2018) [1].
The known problems are familiar. FCFS suffers from the convoy effect, where short jobs queue behind a long one. SJF needs burst-length information that is hard to get. Priority scheduling needs aging to avoid starvation, and Round Robin depends heavily on the time slice. These shortcomings led to multilevel feedback queues and proportional-share schedulers, which adapt a little more but are still rule-based (Silberschatz et al., 2018) [1].
Learning-based approaches have grown quickly. Tree-based supervised models such as Random Forest (Breiman, 2001) [2] and gradient-boosted trees such as XGBoost (Chen et al., 2016) [3] are popular for predicting resource demand, because they are accurate on tabular data and fast enough at prediction time to sit inside an existing scheduling policy. Neural networks can capture more complicated patterns. Rossi and colleagues, for example, forecast cloud CPU and memory demand with Bayesian and LSTM models trained on Google and Alibaba cluster traces, and show that attaching an uncertainty estimate to the forecast improves service-level results (Rossi et al., 2025) [4]. Kahu goes closer to the operating system and trains deep networks to predict what the Linux scheduler will do next (Kahu, 2025) [5].
Reinforcement learning goes a step further and learns a scheduling policy directly by trial and error. Decima, which schedules jobs in data-processing clusters, is a well-known example and outperformed hand-tuned heuristics in the authors' experiments (Mao et al., 2019) [6]. Alps brings an adaptive, learning-based priority scheduler into the operating system for serverless functions [7]. These systems show what is possible, but they also show the price: training takes time, early behavior can be unstable, and the extra computation matters when decisions must be made in microseconds.
Several practical problems keep coming up. Models need representative data, and one trained on a certain workload may fail on another. Running a model costs time and memory. Predictions from complicated models are hard to explain to an administrator. Inside or close to the kernel, decisions must be very fast. A usable design therefore has to balance accuracy against speed, memory, robustness and explainability.
The gap we address is putting these pieces together: cheap-to-run prediction, decisions that take the workload into account, and a feedback loop that keeps the model honest, all inside one scheduling framework.
Our framework is a loop with seven stages (Fig. 1). The operating system supplies measurements of what processes are doing. These are cleaned and turned into features. Models estimate what each resource will need shortly. A decision step combines those estimates with the current state and with fairness rules to change priorities and resource shares. Finally, what actually happens is compared with what was predicted, and the difference is fed back so the models can be corrected.
The collector records CPU use, thread activity, memory use, I/O operations, context switches, process priority, queue behavior and the scheduler's own history. Each reading has to be tied to the right moment in time, so that a measurement can be matched to the scheduling decision that came before it. Kernel tracing or light monitoring services can do this without disturbing the workload much.
Raw logs are messy. They contain gaps, duplicates, clashing timestamps, extreme values and text-like fields such as process names. We remove duplicates, line up the timestamps, smooth out noise and convert text fields into numbers. We then build features that describe how things are changing: moving averages of CPU use, how fast memory is growing, how often new processes arrive, queue lengths, I/O waiting time and signs that processes are competing for the same resource.
Many telemetry variables say nearly the same thing. Principal Component Analysis (PCA) and feature-importance rankings let us keep the variables that matter. A smaller input makes prediction faster, uses less memory and lowers the chance of overfitting. Visual tools such as t-SNE are useful for exploring the data offline, but the live pipeline should only use transformations that are cheap to compute.
We consider Random Forest (Breiman, 2001) [2], gradient boosting with XGBoost (Chen et al., 2016) [3] and plain regression trees, because they are accurate and quick at prediction time. Each model estimates near-future CPU use, memory demand or I/O load. We train on historical observations, check them with cross-validation, and measure error with Mean Absolute Error (MAE) and Root Mean Square Error (RMSE). Hyperparameters are tuned to get good accuracy without making prediction too expensive.
The predictions are combined into a risk score for each process or thread. The score looks at the expected CPU peak, the expected memory use, the chance of conflict with other processes and how the process has behaved before. A process that is likely to cause a bottleneck soon can be served earlier or given a higher priority. Low-risk work can be delayed when the system is under pressure. Fairness weights make sure prediction-based priority does not push other processes aside without good reason.
The framework keeps comparing predicted usage with real usage and returns CPU, memory, queue time and throughput figures to the decision step. If the errors become large, it recalibrates or does a light retraining. This stops the scheduler from relying forever on a model that was trained on yesterday's workload.
A dashboard can show current resource use, forecasts, risk and history. Charts and heatmaps make CPU spikes, memory oddities and I/O bottlenecks easy to spot, and show what the scheduling decisions actually did. This openness matters, because people are more willing to trust an ML-assisted scheduler when they can see why it behaves as it does.
The last step connects the prediction and decision parts to the scheduler. Depending on the platform, they can run as a kernel extension or as a privileged service in user space that talks to the kernel. Before real use the system needs sandbox tests, stress tests, compatibility checks and a measurement of how much time prediction itself takes. The key rule is that prediction must make scheduling better without adding noticeable delay or instability.

This paper proposes the framework and has not yet trained or benchmarked the prediction models, so we do not claim any performance improvement. What we did measure is how a mixed workload behaves, because that behavior is the reason prediction is useful. We ran four small test processes on a two-core Linux machine with about 8 GB of memory and sampled system-wide and per-process figures once a second for 120 seconds using the psutil library. The four processes were deliberately different: one alternated 4 seconds of heavy computation with 3 seconds of rest (cpu_burst), one repeatedly grew and released memory in 25 MB steps (mem_grower), one wrote to disk with forced flushes in 5-second phases (io_writer), and one did light, steady work (steady_task). The workload is synthetic and the machine is small, so the numbers show patterns, not typical production figures.
Fig. 2 shows where CPU time went. On average about 42% was spent running user code and about 17% in the kernel, with roughly 5% spent waiting for I/O and the remaining 36% idle. CPU use overall averaged about 60% but swung between 15% and 94% from one second to the next. A scheduler that only reacts would see these swings only after they started. A predictor could see that a compute burst or a stretch of I/O waiting is likely and act earlier.

Fig. 3 shows memory use rising and falling in a repeating pattern, between about 462 MB and 773 MB, as the memory-growing process allocated and released memory. Memory did not hold a steady level. Because the direction and the speed of the change are visible well before memory runs short, they make good input signals for a forecasting model.

Fig. 4 shows that demand was uneven. The burst process averaged about 55% of a core and reached almost 100% while it was active, the disk-writing process averaged about 32%, the steady process about 27%, and the memory process under 3%. A process that repeatedly shows high demand is a good candidate for earlier attention, or for a different time slice, while short interactive tasks can be protected from long waits.

Fig. 5 shows the same unevenness for memory. The memory-growing process peaked at about 211 MB, while each of the others stayed near 11 to 12 MB. In real systems browsers, databases and virtual machines play that role. How fast a process's memory grows is therefore an important signal, and forecasting CPU and memory together should tell us more than forecasting either alone.
Taken together, the measurements show the main things the framework relies on: demand changes over time, a few processes account for most of the load, and different resources move at different moments. CPU use, kernel time, I/O waiting and context switches (about 820 per second on average, peaking above 2,100) all changed during the run, which supports treating them as joined signals instead of separate ones. By anticipating busy periods, the framework should be able to reduce queue build-up, serve likely-critical processes sooner and delay low-risk work when resources are tight, while the feedback loop improves the models as more data arrives.
The study has clear limits. The workload is synthetic, the machine is small, and the run lasted only two minutes. We did not train a prediction model or compare against FCFS, SJF, Round Robin, priority scheduling or a modern baseline, so no waiting-time, turnaround-time, throughput, MAE, RMSE or inference-latency results are reported. Any statement that the framework improves scheduling is a design expectation and not yet an experimental finding. A fair evaluation would run all of these schedulers on the same real workloads and report these measures with repeated trials.
We presented a machine learning framework for predictive resource management in operating systems. It gathers telemetry, cleans it, builds and trims features, predicts future CPU, memory and I/O demand, scores risk, adjusts scheduling, and uses feedback to keep predictions accurate. Unlike a purely reactive scheduler, it tries to prepare for what the workload will need next.
Our measurements on a mixed workload show why that is attractive: demand rises and falls, a handful of processes account for most of the CPU and memory use, and memory can change quickly. Fixed rules alone handle such patterns awkwardly, whereas an adaptive scheduler can learn the recurring ones and still watch the real state of the system.
The next step is a proper quantitative evaluation on several kinds of real workloads with repeated runs, measuring waiting time, turnaround time, response time, throughput, CPU use, context switches, memory pressure, prediction error and the cost of prediction itself. After that, deep learning, hybrid models and reinforcement learning can be tested for workloads that are especially irregular, and the framework can be tried in cloud, virtualized, containerized and distributed settings to see how well it scales.

In the long run the goal is an operating system that watches how its workload behaves, anticipates what it will need, and keeps adapting, while staying responsive, fair, reliable and light on resources.