ConceptioArchivearXiv CS
arXiv CSopen access

MAC-Gyver: Open, Programmable, Scheduling for AI-RAN 6G Systems

Unknown · 2026 · arxiv_cs
arXiv CS · Papers · License: Open Access · 2026
Open Source ↗Direct PDF ↓
distributedsystemsprotocols
networking, internet, protocols, distributed systems

1

MAC-Gyver: Open, Programmable, Scheduling for AI-RAN 6G Systems

arXiv:2607.26012v2 [cs.NI] 29 Jul 2026

Maxime Elkael, Reshma Prasad, Tamerlan Aghayev, Salvatore D’Oro, Michele Polese, Tommaso Melodia

Abstract—Cellular networks are integrating Artificial Intelligence (AI) into radio access network control. The MAC scheduler is a promising target because it allocates a limited resource, spectrum, at every slot, under competing latency, throughput, and reliability requirements. However, most learning-based schedulers are evaluated only in simulation. Production schedulers are difficult to modify, and realistic stress tests require more radio hardware than most laboratories can provide. We present MAC-Gyver, an open-source framework for developing and evaluating scheduling applications that execute directly inside the OpenAirInterface scheduler. It exposes scheduler observations and controls through typed interfaces while preserving the underlying protocol and real-time execution paths. The same applications run over the air and in mac-emu, a PHY-less emulator that executes the unmodified OpenAirInterface Layer 2 stack for up to 90 users on one host at real-time slot pace, with a 3GPP-compliant channel model. To showcase the flexibility of MAC-Gyver, we evaluate two use cases. A proactive uplink scheduler predicts packet arrivals and roughly halves median round-trip latency. A frequency-selective uplink scheduler selects contiguous sub-bands from per-PRB sounding observations and is evaluated across mobility and power-limited operating points against an offline scheduling ceiling. Together, they show how the same production stack can be an AI playground that supports implementation, controlled evaluation, and over-the-air validation through complementary scheduling use cases. Index Terms—5G, 6G, AI-RAN, MAC Scheduler, OpenAirInterface, dApp, Network Emulation.

I. I NTRODUCTION Research on 6th generation (6G) cellular systems increasingly considers Artificial Intelligence (AI) as part of the Radio Access Network (RAN) design. This is a key principle within the AI-RAN Alliance, which distinguishes three forms of integration: (i) AI-and-RAN, where AI and RAN workloads share infrastructure; (ii) AI-on-RAN, where the RAN serves edge AI workloads; and (iii) AI-for-RAN, where AI improves RAN operation and its Key Performance Indicators (KPIs) [1]. We study AI-for-RAN at the Medium Access Control (MAC) layer. At every slot, the scheduler selects the users to serve, assigns spectrum, and enforces the Quality of Service (QoS) requirements of traffic ranging from high-throughput video to Ultra Reliable and Low Latency Communications The authors are with the Institute for Intelligent Networked Systems, Northeastern University, Boston, MA, USA. E-mail: {m.elkael, aghayev.t, r.prasad, s.doro, m.polese, melodia}@northeastern.edu. This work was supported by the U.S. NSF under award TI-2449452 and by OUSW(R&E) through Army Research Laboratory Cooperative Agreement Number W911NF-24-2-0065. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the Army Research Laboratory or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Government purposes notwithstanding any copyright notation herein.

(URLLC) [2], [3]. These decisions trade throughput and fairness against latency and reliability on a sub-millisecond timescale, while considering a scarce resource, i.e., the bandwidth, and managing user mobility, Multiple Input, Multiple Output (MIMO), and other requirements [4], [5], [3]. Consequently, many studies apply AI and Machine Learning (ML) to MAC scheduling, but most evaluate their algorithms through analysis or simulation [6]. Only a small subset reaches a production stack [7], [8], [9]. This gap is primarily an engineering problem. In open platforms such as OpenAirInterface (OAI) and OCUDU, the scheduling logic is intertwined with the protocol stack. Implementing a new policy requires understanding thousands of lines of C/C++ together with their timing and thread interactions. Observability is also coarse: signals such as perPhysical Resource Block (PRB) Signal-to-Noise-Ratio (SNR) require further modifications to the stack. These costs keep most learning-based schedulers in simulation, where protocol overhead, timing constraints, and radio impairments are abstracted and necessarily approximated. To address these limitations, we introduce MAC-Gyver, an open and programmable MAC-layer framework. First, MACGyver decomposes the scheduler into a fixed pipeline of typed policy stages. A researcher implements a scheduling policy as a Layer 2 Distributed Application (dApp) [8], [10] and selects it from the Next Generation Node Base (gNB) configuration at boot. The dApp executes synchronously in the scheduler and reads the same state as the default policy. For policies that operate across scheduling opportunities, MACGyver additionally lets dApps observe transmission outcomes, and retain persistent context. Second, mac-emu replaces the radio with a 3GPP-compliant channel model while preserving the protocol stack through Layer 2 (L2). We implement MACGyver in OAI, and show how it runs one gNB and up to 90 concurrent User Equipments (UEs) on a single host at realtime slot pace. Thanks to this design choice, an over-the-air testbed with real radios and mac-emu use the same scheduling interfaces, policies, and event logs. As a consequence, any policy developed in MAC-Gyver can be ported to the over the air network without a second implementation. The testbed provides real channels and commercial devices; mac-emu provides controlled channels, repeatable experiments, and cellscale contention. The connection across emulation and realworld deployment is an advantage compared to traditional discrete-event simulators (e.g., ns-3 [11]), as they only support reimplemented schedulers in simulated time. In this way, MAC-Gyver provides a programmable framework for L2 prototyping and bridges the gap between research and realworld demonstrations.

2

The contributions of this paper are as follows: We decompose the per-slot Uplink (UL) and Downlink (DL) scheduler into typed policy stages that share one candidate structure. The stages expose channel observations, buffer state, Hybrid Automatic Repeat reQuest (HARQ) feedback, and the decisions needed for online control and offline analysis. MAC-Gyver also lets dApps observe transmission outcomes, and retain persistent context across scheduling opportunities. We have implemented this design on the OAI scheduler, and its backbone has already been contributed upstream [12]. • We develop mac-emu, a Physical (PHY)-less emulator that runs one OAI gNB and up to 90 UEs on one host at realtime slot pace. It uses the same policies and logs as the over-the-air deployment. • Thanks to MAC-Gyver’s dApp-based architecture, we demonstrate stateful, closed-loop scheduling with a proactive UL scheduler that learns packet arrivals online and schedules grants before the UE requests them. This application was presented in AUGUSTE [13], of which this paper is an extension. In Over-the-Air (OTA) experiments with commercial UEs, it reduces median Round Trip Time (RTT) by about 50% (20 ms to 10 ms) and one-way UL latency from 20 ms to 7 ms, at 7% overhead. • We use MAC-Gyver and mac-emu to design and evaluate a frequency-selective UL scheduler from per-PRB sounding observations. Although offline analysis favors a more flexible allocator, execution in the complete scheduling loop shows that the simpler policy performs better. The retained policy improves aggregate throughput by up to 7%, with gains determined by channel freshness and the users’ powerlimited operating point. The remainder of this paper is organized as follows. Section II presents the design tradeoffs and the scheduler design, while Section III presents mac-emu. Sections IV and V evaluate the two applications. Section VI reviews related work, and Section VII discusses the lessons learned and concludes. •

II. MAC-G YVER S CHEDULER A RCHITECTURE In this section, we first discuss the constraints and tradeoffs involved in scheduler design. We then use these considerations to motivate MAC-Gyver’s scheduler architecture, which is designed to make scheduling policies easy to modify and extend. A. Scheduler Design Constraints At each scheduling opportunity (i.e., slot), the scheduler decides which UEs to serve and selects their transmission parameters such as the Modulation and Coding Scheme (MCS), the allocated PRBs, the Time-Domain Allocation (TDA) (i.e., which Orthogonal Frequency Division Multiplexing (OFDM) symbols), the beamforming configuration, and the transmit power. Scheduling is therefore a real-time problem, solved every 500 µs at 30 kHz Subcarrier Spacing (SCS), over an action space with several decision variables for each UE. These decision variables are coupled, both with each other and across slots. For example, the UE’s power budget ties the

number of allocated PRBs to the achievable MCS within a slot, while across slots an UL grant must be announced on the Physical Downlink Control Channel (PDCCH) during an earlier DL slot, so the configured K2 values, the Time Division Duplexing (TDD) pattern, and the available control-channel resources determine which future UL slots are reachable. Further constraints, e.g., contiguous UL PRB allocation and the timing of HARQ retransmissions and their Physical Uplink Control Channel (PUCCH) feedback, restrict the feasible schedules. Consequently, formulations that optimize only data-channel PRBs can produce allocations that the cellular stack cannot use when considering the constraint of the 3GPP NR protocols. These characteristics make schedulers hard to design while maintaining flexibility and integrating AI/ML routines. Production implementations, such as the existing OAI scheduler, entangle every scheduling decision with the management of the aforementioned constraints and of the real-time path. Therefore, changing a single decision, e.g., how the MCS is selected, requires understanding and modifying logic across the whole scheduler. At the other extreme, rewriting a scheduler from scratch gives full flexibility, but it means re-implementing the protocol handling, with the risk of re-introducing edge cases and bugs that production code has long since fixed. We therefore propose a modular architecture, which isolates each decision behind a replaceable interface while sharing the feasibility checks and the real-time execution path. We describe it in the next subsection. B. Architecture MAC-Gyver designs and implements the gNB MAC scheduler as a pipeline of stages (Fig. 1), where each stage makes one scheduling decision, e.g., MCS selection or PRB allocation. Stages exchange their inputs and decisions through a shared per-UE candidate structure. Each stage is a replaceable policy. At gNB startup, the configuration selects one implementation per stage and composes a complete scheduler from independent modules, which can be abstracted as dApps. Beyond these stages, MAC-Gyver lets dApps observe transmission outcomes and request additional UL candidates. All dApps may access a persistent stateful context to carry application-defined state across scheduling opportunities. The pipeline order, the candidate structure, and the protocol feasibility checks remain fixed, so dApps change selected scheduling decisions without reimplementing the surrounding protocol handling. Figure 1 shows the pipeline that MAC-Gyver executes at each scheduling opportunity, with the same structure on DL and UL. Candidate collection (1) populates one candidate structure per schedulable UE (Listing 1), i.e., a UE with a pending HARQ retransmission or with new data to send and a free HARQ process. The dApps then decide the MIMO rank and which precoder to use (2), the serving beam (3), the TDA 1 (4), the MCS (5) and the PRB allocation (6). Retransmission candidates traverse the same dApps, but their decisions must preserve the original transport-block size, e.g., 1 in 5G, the TDA indicates to the UE which OFDM symbols it is allowed to use in the associated grant

3

typedef struct nr_dl_candidate { /* Identity and scheduling state */ 3 uint16_t rnti; New Transmissions Processing 4 bool is_retx; // HARQ retx pending Candidate Rank / Beam 5 uint32_t pending_bytes; // RLC buffer occupancy Candidate Request Precoder Selection 6 float avg_throughput; // EWMA goodput Collection dApp A dApp 2 dApp 3 1 7 float bler; // current BLER estimate 8 int current_mcs, max_mcs; DL Tx MCS PRB TDA 9 uint64_t fiveQI; // QoS class Observer Selection Allocation Selection 10 nssai_t nssai; // slice ID dApp B dApp 5 dApp 6 dApp 4 11 bool skipped, scheduled; // stage outcomes 12 /* Channel observations (read-only) */ UL Observer Validate Allocation DL Only – LCID dApp 13 uint16_t cqi; // wideband CQI Correctness Allocation dApp 8 7 C 14 uint8_t csi_ri; // reported rank 15 const int16_t *beam_rsrp; // per-SSB L1-RSRP All dApps Perform Transmission 16 const float *srs_rb_energy; // per-RB channel Persistent Validate Add MAC Send DCI + 17 // energy from SRS Stateful Allocations Subheaders Data to L1 18 /* Decisions, written by the named dApp */ Context 19 NR_sched_pdsch_t sched_pdsch; // MCS, PRBs, Physical Layer / MAC-EMU 20 // layers, TDA 21 int alloc_beam_idx; // selected beam int alloc_cce_index; // PDCCH position Fig. 1: MAC-Gyver dApp architecture. Numbered decision 22 23 } nr_dl_candidate_t; 1

RLC Layer

2

Distributed Unit

dApps form the scheduling pipeline within one opportunity; lettered dApps observe transmission events or request candidates across opportunities. All dApps may access a persistent stateful context.

a TDA, MCS or PRB allocation change is accepted only if it reproduces the same block size. In deployments without beamforming, the beam dApp returns a single default beam and the pipeline operates unchanged. PRB allocation may also lower the selected MCS to satisfy the UE power budget. The validation step (7) then checks each grant against the protocol constraints before dispatch. Finally, the Logical Channel Identifier (LCID) dApp (8) divides the transport-block bytes among logical channels for the UE on the DL only. This multiplexing is indeed a sender-side decision, as the UE MAC performs the same task on the UL path. The dApps receive their input data per UE from the candidate data structure of Listing 1 (nr_ul_candidate_t is the UL analog). They also output their controls in that same structure. Candidate collection fills the metrics in that structure, and decision fields are written by the dApps, which ensures every dApp observes the same state, enriched by the previous dApps’ decisions. Beyond the numbered stages, Figure 1 shows three dApp interfaces for policies that operate outside of the mandatory scheduling chain. The candidate-request dApp (A) runs during UE candidate collection and may request that a UE enter the pipeline before its buffer state indicates pending data (this enables e.g., the proactive scheduler of section IV). The DL transmission observer (B) is invoked after a scheduled transport block has been constructed, while the UL observer (C) receives the outcome of each UL grant. These two observers enable MAC-Gyver to expose data such as the amount of padding bytes in a received UL Packet Data Unit (PDU) or the time of arrival of DL PDUs. Unlike the numbered stages, these observers do not modify the completed transmission. Instead, their primary role is to expose extra data to enable more intelligent decisions. Finally, note that all dApps have access to a stateful context, which is (i) shareable accross the different dApps and (ii) persisted accross slots. This enables dApp designers to expose context in new ways and to make

Listing 1: DL candidate struct.

dApps stateful if needed (for example, combined with dApp (B), it enables tracking the rate of arrival of DL PDUs). In its OAI implementation, MAC-Gyver passes each candidate scheduling structure through OAI’s existing grantvalidation path. This path checks, for example, that the selected PRBs are available, that the PDCCH has sufficient capacity for the grant, and, on the DL, that a PUCCH resource is available for HARQ feedback. When a check fails, the pipeline rejects the grant and reports the cause through the OAI logs, helping the researcher identify and correct infeasible behavior in the corresponding dApp. Only validated grants are committed and sent to Layer 1 through the Functional Application Platform Interface (FAPI) interface. The scheduler backbone underlying MAC-Gyver has been upstreamed to OAI [12], while the complete MAC-Gyver and mac-emu source code is available at https://github.com/ wineslab/MAC-Gyver. The same interfaces also support the agentic scheduler control demonstrated in AgentRAN, which builds on MAC-Gyver’s lightweight design and scheduler-state exposure [14]. The two use cases exercise complementary parts of this architecture. Section IV combines the candidate-request dApp (A), DL transmission observer (B), and UL observer (C) with persistent context to act across scheduling opportunities. Section V uses the rank and precoder produced by dApp (2) to implement frequency-selective PRB allocation in dApp (6); it also replaces MCS selection (5) independently in the oracle experiment. Before presenting these use cases, the next section introduces mac-emu, which preserves these interfaces while providing controlled execution of the complete scheduler. III. M A C - E M U : R EAL -T IME L2 E MULATION AT S CALE In this section, we present mac-emu, the softwareemulation component of MAC-Gyver. Its role is to execute the same OAI scheduler and registered dApps under controlled channel conditions and at cell scale, without requiring radio

4

hardware. mac-emu preserves the protocol stack through L2 and follows the real-time slot clock, so policies exercise the same scheduling state, protocol constraints, and execution path used over the air. A. Motivation Exposing the production scheduler through MAC-Gyver addresses the difficulty of implementation, but evaluating a policy still requires representative channel behavior, cell-scale contention, and repeatable operating conditions. While OTA and hardware-based testbeds provide high-fidelity evaluation environments, they typically lack the scale of real deployments, i.e., tens to a hundred RRC-active UEs [15]. Simulators such as ns-3 [16] provide scale by executing a reimplemented Distributed Unit (DU) in simulated time and cannot directly host arbitrary applications and traffic. Neither option alone provides controlled, real-time, cell-scale execution of the exact policy deployed in the DU. In the current research landscape, scaled real-time experiments happen on hardware based testbeds (e.g., X5G [17], Colosseum [18], OAIC [19]). This gives a great degree of realism, but it comes at the cost of complexity in the infrastructure management and experiment execution. Indeed, managing multiple physical nodes (either for RAN or UEs) requires a high level of automation, multiple servers, and software that is distributed across the network. This complexity, combined with use cases that inherently push the boundaries of previous experiments, forces researchers to often redesign their own harness and scripts for new experiments, which requires them to manage edge cases and carefully handle all the potential states of the experiments. All this complexity compounds due to the mix of software, hardware and networking elements involved, and with the fact that lab deployments usually are temporary, making reproducibility challenging. For these reasons, software-based experimentation should complement, hardware-in-the-loop validation. Software platforms enable rapid, reproducible, and scalable exploration, while hardware remains important for validating selected policies under real radio impairments. Executing the same protocol stack and policy in both environments, as enabled by MAC-Gyver, makes this transition meaningful by avoiding differences caused by reimplementation and subtle differences between simulators and real cellular stacks. One such tool is OAI’s RF Simulator (RFsim). It runs the real OAI stack fully in software, supports application traffic, and can be packaged as a reproducible single-host experiment (via, e.g., Docker Compose). It retains the complete PHY and exchanges In-Phase/Quadrature (IQ) samples between the gNB and software UEs via TCP. This makes RFsim a good tool for protocol-level evaluation. However, retaining waveform processing also preserves its computational cost, and the use of TCP makes it non real-time. Prior work has characterized these limitations. Wei et al. show that PHY processing dominates the computational cost of an OAI gNB, with the DU accounting for most of the cost in a disaggregated deployment [20]. Rouili et al. report that RFsim consumes more CPU than their SDR-based deployment and attribute this overhead to PHY processing and the

exchange of IQ samples [21]. More recently, Mamaghani et al. benchmark an RFsim-based system with up to five UEs on an AMD Ryzen 9 7900X host with 32 GB of memory [22]. After extending RFsim with multi-tap channel convolution, they report a 90th-percentile slot-computation time of 8 ms for five UEs; beyond four UEs, round-trip latency frequently reaches hundreds of milliseconds and connections may fail. These results show that retaining waveform-level processing becomes a bottleneck well before the cell-scale experiments targeted in this work. mac-emu therefore removes waveform-level PHY processing while retaining the protocol layers and scheduling path that determine dApp behavior. This boundary provides the scale of a software abstraction without replacing the DU scheduler under evaluation. The remainder of this section describes the resulting architecture, channel model, and validation. B. Architecture mac-emu runs the production gNB and UE stacks unmodified down to their FAPI boundary, and replaces everything below it (i.e., the PHY). As shown in Figure 2, a thin adapter bypasses the PHY on each side and exchanges the FAPI messages with the mac-emu runtime over UDP, while Radio Resource Control (RRC), Packet Data Convergence Protocol (PDCP), Radio Link Control (RLC), and MAC run the deployed OAI code. Because MAC-Gyver and its dApps execute above this boundary, the same dApp interfaces and policy implementations run in mac-emu and over the air; only the source of Layer 1 observations and transmission outcomes changes. Inside the runtime, a software slot clock paces the system: it fires once per slot (500 µs at the 30 kHz SCS used in this work) and distributes slot ticks to the gNB and every UE. At each tick, DL Downlink Control Informations (DCIs) and data flow from the gNB adapter to the UEs, while UL data and HARQ feedback flow back. Both directions traverse the channel model: for every scheduled transport block, it decides the ACK/NACK outcome that enters the feedback stream, and it synthesizes the Layer 1 measurements that a real PHY would report to the scheduler (purple arrow in Figure 2). Section III-C details this model. Real-time execution rests on three mechanisms. First, the slot clock runs on a dedicated thread with real-time priority, pinned to an isolated core, and paces itself on absolute deadlines. It does so by sleeping until shortly before the next slot boundary, and by busy-spinning for the remainder, avoiding wake-up jitter. Second, the channel model executes asynchronously, on lower-priority worker threads that cannot preempt the thread dedicated to the slot clock. This means that the critical path stays free for message dispatch and scheduling. Third, each UE runs as a separate OAI softUE process whose Layer 1 is bypassed by the UE adapter, so a single host executes the gNB and tens of UEs concurrently. Section III-D quantifies the resulting deadline behavior at up to 90 UEs. We observe no computational bottleneck at this count; rather, 90 is the maximum supported by OAI in our 40 MHz configuration because of its current PUCCH-resource allocation.

5

OAI gNB RRC + PDCP + RLC MAC Scheduler

gNB Adapter

Software Slot Clock Async Channel Model UL Channel

DL Channel

FAPI over UDP

DL Data

RRC + PDCP + RLC

UL Data

ARM Server

Faraday Cage

MAC-Gyver Based DU

Foxconn Radio Unit

USRP Based Channel Emulator (OAL)

Sierra EM 9293 COTS UE

Fig. 3: OAL hardware reference setup.

MAC Layer

UE Adapter Bypassed L1

Bypassed L1 Slot Tick

OAI softUE

L1 Synthetic Measurements

Fig. 2: mac-emu architecture. Unmodified OAI L2 stacks run to their FAPI boundary; adapters and the mac-emu runtime bypass the PHY. The software slot clock paces the gNB and the UE processes; the purple arrow carries the Layer 1 measurements synthesized by the channel model.

C. Channel Model mac-emu abstracts waveform processing but must reproduce its consequences on the scheduler. For each scheduled transport block, its configurable channel model determines the ACK/NACK outcome returned through the protocol stack and synthesizes the Layer 1 measurements exposed to the scheduler and its dApps. The model is defined per UE in a YAML file that specifies the path-loss model, shadowing, small-scale fading, antenna gains, and mobility. We implement free-space, Urban Micro-cell (UMi), and Urban Macro-cell (UMa) path loss as well as TDL and CDL fading from the 3GPP channel model technical report 38.901 [23]. Mobility combines a Doppler frequency with stateful patterns, e.g., a UE that alternates between moving and standing still. As the system is focused on TDD, we assume that the channel is reciprocal: DL and UL share one realization per UE. The ACK/NACK decision proceeds in three steps. First, a link budget and the fading realization produce per-subcarrier SNRs, γk (t) = γ̄ |Hk (t)|2 , (1) where γ̄ is the average SNR from transmit power, antenna gains, path loss, shadowing, and thermal noise, and Hk (t) is the channel frequency response at subcarrier k. Second, Exponential Effective SINR Mapping (EESM) compresses the allocated subcarriers into one effective SNR [24], N   X e−γk /βm , γeff = −βm ln N1

(2)

k=1

where N is the number of allocated subcarriers and βm is the calibration factor of MCS m from [24]. HARQ retransmissions add their effective SNRs in the linear domain (Chase combining). Third, a three-parameter Richards curve maps the combined SNR to an error probability, −c BLERm,w (γ) = 1 + ea(γ−b) , (3) where the parameters (a, b, c) control the steepness, position, and asymmetry of the waterfall for MCS m and number w

of allocated PRBs; the outcome is one Bernoulli draw per transport block. Parameters (a, b, c) are fitted offline for each link direction (DL or UL), MCS, and number of PRBs allocated to the transmission. We do this using link-level simulations of the OAI UE and gNB receivers. OAI exposes each receive chain in isolation as a link-level simulator, nr_dlsim for the UE’s Physical Downlink Shared Channel (PDSCH) receiver and nr_ulsim for the gNB’s Physical Uplink Shared Channel (PUSCH) receiver: each run encodes transport blocks, applies Additive White Gaussian Noise (AWGN), executes the full demodulation and Low-Density Parity-Check (LDPC) decoding chain, and reports the block error rate. We sweep SNR for the AWGN channel and fit Equation (3) to the resulting waterfall. Each possible number of PRBs requires its own curve because it sets the transport-block size and therefore the LDPC codeblock segmentation, which changes both the position and the steepness of the waterfall. We run the parameter sweep offline for a given carrier configuration, producing one curve per direction, MCS, and number of allocated PRBs. For the 40 MHz carrier used in this work (106 PRBs and 29 MCS indices per direction), it yields 6,148 curves. By construction, these curves reproduce the LDPC receivers exactly. A real link, however, deviates from them due to radiofrequency impairments, such as transmitter error-vector magnitude and phase noise, as well as implementation differences between commercial receivers and OAI (e.g. quantization in the ASIC of a UE). We use the hardware reference setup in Figure 3 to calibrate and validate mac-emu. An OAI gNB drives a Foxconn RPQN Radio Unit (RU), which connects through the OpenAirLink (OAL) programmable channel emulator [25] to a Sierra Wireless EM9293 Commercial Off-the-Shelf (COTS) UE. OAL applies controlled attenuation and 3GPP fading profiles to the bidirectional radio link. Measurements from this setup parameterize hardware-specific effects in the channel model, while Section III-D uses the same physical chain for closedloop validation. Note that at the time of writing, our OAL setup only supports a 100 MHz (273-PRB) cell configuration, while mac-emu experiments are at 40 MHz (106-PRB) throughout this work. We therefore cap the hardware scheduler to 106-PRB allocations throughout this section, which equalizes transport-block sizes. We take long fixed-MCS measurements at SNRs well above each waterfall, with HARQ retransmissions disabled so that every logged block is an initial transmission. Where the fitted curves predict a vanishing Block Error Rate (BLER), the hardware instead settles on an error floor. Figure 4 tests whether this floor depends on either MCS or the number of allocated PRBs. Panel (a) varies the MCS over indices 0–14 while capping each allocation at 106 PRBs. After retaining the stationary half of each run, the resulting 9.6 million blocks

6

Average error-floor −3

Error-Floor

10

−4

10

−5

10

represents this correlated error with the Gauss–Markov state ni . The state and the resulting Discontinuous Transmission (DTX) decision are q ρi = e−∆ti /tcorr , (6) ni = ρi ni−1 + 1 − ρ2i ϵi , di = 1{τ̄i + σni > W } ,

−6

(7)

10

0

5 10 (a) MCS

15

20

40 60 80 106 (b) Allocated PRBs

Fig. 4: High-SNR initial-transmission error floor across (a) MCS at 106 PRBs and (b) the number of allocated PRBs at MCS 8. Bars aggregate the retained stationary measurements; error bars show 95% Wilson intervals, and dashed lines show the average error floor in each panel. yield an average error floor of 1.21 × 10−5 with no systematic dependence on MCS. We restrict this experiment to the contiguous range 0–14 because, at higher indices, the setup did not consistently provide stationary measurements sufficiently above the decoding waterfall. Panel (b) fixes MCS 8 and varies the allocation from 20 to 106 PRBs. Across 7.2 million blocks, the average is 1.16×10−5 , with no dependence on the number of allocated PRBs. We therefore set φ = 1.2×10−5 and extend the ACK/NACK decision as  P (NACK) = φ + (1 − φ) BLERm,w γeff , (4) Beyond this data-plane focused model, we also model the effect of channel impairments on the control channel that carries the DL HARQ feedback. Our experiments reveal that, on real hardware, the gNB occasionally fails to detect feedback that the UE did transmit, which the gNB conservatively treats as a NACK, scheduling a retransmission. We measure this effect over three 3GPP TDL fading profiles of increasing delay spread (TDL-A30, TDL-B100, and TDL-C300, i.e., 30 to 300 ns of delay spread [23]), reproduced by the channel emulator: the rate of missed detection is strongly ordered by the delay spread, at 0.06%, 0.77%, and 5.5% of feedback occasions, respectively. The delay-spread dependence follows from the encoding of the HARQ feedback, which goes through PUCCH format 0. PUCCH format 0 encodes ACK/NACK as cyclic shifts of a base sequence. The detector therefore discriminates hypotheses in the delay domain and tolerates a bounded delay error around the expected arrival time. For feedback occasion i, mac-emu computes the instantaneous power-weighted delay centroid PL |hℓ (ti )|2 τℓ , (5) τ̄i = Pℓ=1 L 2 ℓ=1 |hℓ (ti )| where L is the number of channel taps, hℓ (ti ) is the complex coefficient of tap ℓ at time ti , and τℓ is its delay. We use a receiver-level abstraction of the uplink timingtracking loop. The gNB estimates each UE’s uplink arrival time and sends timing-advance commands, which the UE applies to subsequent transmissions. A residual timing error remains at the gNB’s PUCCH detector and evolves across feedback occasions because the loop retains state. mac-emu

where ni is the unit-variance Gauss–Markov timing-error state, ϵi ∼ N (0, 1) is a new Gaussian random sample drawn at feedback occasion i, independently of the previous samples, ∆ti is the time since the previous feedback occasion, and tcorr is the tracking-loop correlation time. The parameter σ scales the timing error, W is the detector window, and di = 1 indicates a DTX. The stationary distribution of ni is independent of tcorr . Consequently, W and σ determine the DTX rate, while tcorr determines how events cluster in time. We calibrate the model against the DTX statistics measured on the OAL-based testbed: W and σ by maximum likelihood on the per-channel DTX rates, and tcorr on the burstiness of the resulting retransmissions. We obtain W = 475 ns, σ = 140 ns, and tcorr = 100 ms, which yields DTX rates of 0.07%/0.28%/5.4% on TDL-A30/-B100/-C300, against the 0.06%/0.77%/5.5% measured on the hardware testbed. Besides the ACK/NACK results, mac-emu also synthesizes the measurements consumed by the scheduler. The wideband Channel Quality Information (CQI) follows the standard reporting rule: the report carries the highest CQI index whose predicted BLER, evaluated through Equation (3), does not exceed the 10% target (TS 38.214, Clause 5.2.2.1) [26]. The scheduler also receives the per-PRB Sounding Reference Signal (SRS) channel matrix. On a real gNB this matrix comes from a channel estimator (e.g., least squares in OAI) and therefore carries estimation error. To model this error, we measure it offline with the SRS receiver in isolation (OAI’s nr_srssim) and inject noise of matching variance into the synthesized matrix, which is derived from the current channel state; the calibrated synthesis matches the simulator with an Root Mean Squared Error (RMSE) of 0.36 dB. The synthesized CQI and SRS measurements follow the purple path in Figure 2 into OAI, where MAC-Gyver exposes them to dApps through the candidate structure. Section V uses the perPRB SRS measurements for frequency-selective allocation. D. Validation We validate the two properties required for using mac-emu as MAC-Gyver’s controlled execution environment: whether the scheduler behaves the same with mac-emu as with a hardware link, and whether it sustains real-time execution under cell-scale contention. The preceding subsection used the OAL setup to estimate the error-floor and PUCCH parameters. We now use the same physical testbed to compare the closedloop MCS, throughput, and BLER observed in mac-emu and on hardware for the default OAI scheduler. We then verify whether the emulator sustains its real-time budget at scale. All hardware comparisons use a single-antenna link. We compare the link-level KPIs of a single-UE deployment on mac-emu and on the hardware testbed under saturated DL User Datagram Protocol (UDP) traffic, across the three

7

mac-emu

OAL (hardware) TDL-A30

TDL-B100

TDL-C300

TDL-A30

TDL-B100

TDL-C300

Throughput (Mbps)

MCS (initial TX)

20

10

40

20

0

0 16

22

28

34

16 22 28 34 Channel attenuation (dB)

16

22

28

34

16

22

28

34

(a) MCS of initial transmissions.

16 22 28 34 Channel attenuation (dB)

16

22

28

34

(b) DL throughput.

Fig. 5: Closed-loop link adaptation in mac-emu and on OAL, one UE, saturated DL traffic. OAL (hardware)

TDL-C300 BLER

TDL-B100 BLER

TDL-A30 BLER

16 dB

mac-emu twin 28 dB

22 dB

34 dB

10−1

10−2

10−1

10−2

10−1

10−2

0

10

20

MCS (initial TX)

0

10

20

MCS (initial TX)

0

10

20

0

MCS (initial TX)

10

20

MCS (initial TX)

Fig. 6: Initial-transmission BLER versus MCS for the same runs as Figure 5.

TDL profiles of Section III-C at four channel attenuations each (16, 22, 28, and 34 dB), i.e., 12 operating points. The emulated gNB mirrors the hardware configuration, which is checked automatically at startup. Notably, the testbed reports no CQI (Channel State Information - Reference Signal (CSIRS) is disabled), so DL link adaptation is purely BLERdriven on both platforms. Since the hardware testbed’s absolute attenuation-to-SNR mapping is not recoverable exactly (the channel emulator applies a programmable attenuation between transmitter and receiver rather than an explicit pathloss model, so the absolute link budget depends on unmeasured gains along the chain), we calibrate mac-emu’s path loss

per operating point, rerunning the experiment to find the closest MCS-distribution match with the hardware setup (via the Wasserstein distance). This enables us to evaluate how closely mac-emu reproduces the hardware setup despite this limitation. For each operating point, we run the experiment five times at the best-matching path loss, on both platforms. Figure 5 reports the MCS and throughput distributions, and Figure 6 the per-MCS initial-transmission BLER. Across the 12 points, the median Wasserstein distance between the pooled MCS distributions is 0.35 MCS steps (worst 0.94), the mean-MCS error stays below 0.35 everywhere, and median throughput agrees to −4% (all points within 13%, which is

90 DL aggregate UL aggregate

60 30

Mean exec. time (µs/slot)

120

UL receive ACK/NACK DL send

300 200

HARQ cleanup Scheduler Slot tick

100 0 1

2

5 10 20 Concurrent UEs

40

90

40

90

(a) Slot-thread execution time.

0 1

2

5 10 20 Number of UEs

40

90

Fig. 7: Aggregate cell throughput versus concurrent UE count.

similar to the variability we observe between runs of the same experiment on hardware) We attribute the consistently lower throughput of mac-emu to the PRBs number mismatch (106 (40 M hz) on mac-emu, 273 (100 M hz) on OAL): while we limit OAL to 106 PRBs in the scheduler, the Synchronization Signal Block (SSB) is scheduled after those PRBs. This is not the case for mac-emu, which loses ≈ 4% of schedulable capacity (1 SSB every 20 ms, which caps the number of contiguous PRBs to 40 for that slot in our setup). The BLER-versus-MCS curves closely follow each other through the band the outer loop targets. The remaining BLER mismatch concentrates on TDL-C300 at low MCS, where missed PUCCH-driven errors dominate: the model injects detector misses independently of the instantaneous channel state, yielding a flat BLER contribution across the low MCSs (absent on the other profiles, whose rates of missed PUCCH are negligible), whereas the hardware’s low-MCS BLER retains more structure. Because the link-adaptation loop rarely selects these low MCS values in steady state, this discrepancy has no visible effect on the resulting MCS and throughput distributions. For the scalability evaluation, we focus on verifying that mac-emu maintains the real-time guarantees at scale. To do this, we gradually increase the number of UEs attached to a 40 MHz SISO cell with very good channel conditions (all UEs reach MCS 28), and saturate both the UL and DL using mgen [27]. We evaluate up to 90 UEs, the maximum supported by OAI in this configuration because of its current PUCCHresource allocation. For this experiment, the gNB thread runs on one isolated core, while the UE processes are distributed across ten additional cores (the whole workload runs on an NVIDIA DGX Spark with 20 CPUs, out of which 10 are performance cores, which we use for mac-emu). We report the aggregate throughput in Figure 7, where we observe that mac-emu sustains the maximum capacity of the cell in both directions (115 and 32 ±0.3 Mbps). In particular, mac-emu shows no computational saturation at the 90-UE limit. The only case where we reach a lower throughput is with a single UE. This is caused by a separate OAI limitation: its rigid PUCCH-allocation policy limits the maximum number of simultaneous HARQ processes in our configuration. Furthermore, we collect a breakdown of the runtime per slot in this experiment, which is reported in Figure 8. We

Deadline-violation prob.

Cell throughput (Mbps)

8

−3

10

−4

10

−5

10

1

2

5 10 20 Concurrent UEs

(b) Deadline-violation probability.

Fig. 8: mac-emu slot-thread scaling under saturated bidirectional traffic, versus concurrent UE count. observe that as the number of UEs increases, the two main contributors to the runtime are the execution of the scheduler and the distribution of the slot ticks to each UE, which exhibit clear non-linear scaling. Despite this, the average runtime always stays below the critical value of 500 µs, i.e. the slot duration. The deadline violation probability is also extremely low (around 10−3 at most), meaning that we near-perfectly respect the real-time deadline. These results establish mac-emu as the controlled execution component of MAC-Gyver. Its channel model reproduces the observations and transmission outcomes that enter the scheduler loop, while its real-time architecture sustains the complete gNB L2 stack at cell scale. The following sections use the resulting framework in two complementary ways: proactive scheduling combines persistent state and eventdriven dApps in an OTA deployment, whereas frequencyselective scheduling composes per-slot decision stages and uses mac-emu to evaluate their interactions under controlled channel conditions. IV. U SE C ASE : P ROACTIVE URLLC S CHEDULING Our first use case uses MAC-Gyver to implement a closedloop proactive UL scheduler. The dApp predicts when a UE will have data and schedules its UL grant before the UE sends an Scheduling Request (SR). It adds the UE to the scheduler’s candidate set while leaving resource allocation and grant validation unchanged. This use case exposes the tradeoff between access latency and unused proactive grants. A. Motivation Our main motivation for proactive scheduling is the SR procedure, which is a major source of UL latency in 5G systems: as shown in Figure 9, when it needs to transmit in the UL, a UE first waits for its periodic SR opportunity on the PUCCH, at which point it transmits a SR bit, indicating to

9

gNB

UE SR tx (1 bit), predefined periodicity

We formalize proactive scheduling as a multi-objective optimization over UL scheduling strategies. Within a URLLC slice of UEs N with homogeneous QoS requirements, we seek strategies that balance three objectives: worst-case expected latency, worst-case jitter, and total slice resource consumption.   maxi∈N E[Lisched (S)] i  minimize maxi∈N P V (Lsched (S)) S∈S (P-URLLC) i∈N Ui (S) E[Ri (S)] , ∀i ∈ N , subject to Ui (S) = Rslice /|N |

UL min grant BSR (+ optional small SDU if capacity) Actual UL grant

Fig. 9: Scheduling request procedure.

1 0.8 0.6 0.4 0.2 0

Default SR-based scheduling Always scheduling in UL 0

5

10

15

20 25 RTT (ms)

30

B. Problem Formulation

35

40

Fig. 10: RTT with and without always-on UL scheduling.

the gNB it needs to transmit data. It then receives a small grant through DCI, returns a Buffer Status Report (BSR), containing the size of the payload. This enables the gNB to then schedule UL in further slots. The initial wait depends on the configured SR periodicity, typically 10–40 ms and up to 640 ms. Limited PUCCH resources require longer periodicities as the number of UEs grows. Consequently, the full procedure adds 15–50 ms and increases jitter, compared with URLLC targets of 1–10 ms [28], [29]. Note that the 5G standard provides Configured Grants (CGs) to avoid the SR delay, in which the gNB pre-configures periodic grants at fixed periodicity and offsets via RRC [2], [30]. However, CGs assume the traffic is periodic and its characteristics are known in advance, which does not hold for event-driven flows, multi-periodic traffic (e.g. a robot with multiple sensors) and more generally, unknown sparse traffic. Our approach targets these broader arrival patterns by learning from events visible by the scheduler, without requiring RRC reconfiguration. To quantify how much latency the SR procedure adds, we compare the default scheduler of OAI with a simple alwayson policy that grants the UE in every slot without waiting for an SR. Figure 10 evaluates both policies over the air with a single UE performing a ‘ping‘ every 100 ms. The default scheduler produces an RTT of 15–25 ms with a median near 20 ms. Always-on scheduling reduces this range to 7– 12 ms and removes most of the variation, confirming that the SR accounts for roughly half of the observed latency. This however comes at a spectrum efficiency cost, as most grants carry no data under such sparse traffic, and the cost grows linearly with the number of URLLC UEs. We therefore use always-on scheduling as the minimum-latency reference and seek a policy that approaches its latency with fewer unused grants.

where: • N is the set of UEs in a URLLC slice, assumed to share homogeneous QoS requirements; • S is the set of feasible scheduling strategies, and S is one such strategy; • i indexes a UE in N ; i • Lsched (S) is the scheduling-induced latency for UE i; i • E[Lsched (S)] is the expected scheduling latency for UE i; i • V (Lsched (S)) is the latency variance (jitter) for UE i; • Ui (S) is the resource-consumption ratio for UE i; • Ri (S) is the random variable of instantaneous resources allocated to UE i; • E[Ri (S)] is the time-averaged resource allocated to UE i; • Rslice is the total PRB budget reserved for the URLLC slice; • |N | is the number of UEs in the slice. Solving Equation (P-URLLC) requires the distribution of scheduling latency, which depends on the unknown UL arrival process. We therefore use an online policy that estimates this process from events available inside the MAC scheduler. Two parameters, the tolerance window TW and slot restriction N , control how closely proactive grants follow each prediction and set the policy’s position on the latency-overhead tradeoff. A state machine alternates between collecting unbiased arrival samples and scheduling from the resulting predictions. C. Architecture and State Machine We first evaluate a simple prediction rule before presenting the full architecture. For Figure 11, we implement a scheduling dApp that issues a proactive UL grant whenever the scheduler has transmitted DL data to the UE within the preceding one to four TDD periods. The figure reports RTT for each lookback window. Extending the window increases the number of proactive grants linearly. A two-period lookback reduces the median RTT to approximately 9 ms, close to always-on scheduling. Unlike always-on scheduling, this rule issues grants only during the two periods following each DL transmission. We now generalize this basic principle beyond a fixed lookback window. As shown in Figure 12, our solution trains a per-UE learner which predicts the next UL arrival from MAC events, and a state machine determines when to use the prediction for proactive scheduling. We implement the proactive scheduler as a combination of three dApps using the interfaces shown in Figure 1: candidate request (A), DL transmission observation (B), and

ULSCH Scheduling

Decision: UE Proactive Scheduling ? 1

DLSCH Scheduling

DCI TX to UE

ULSCH Data RX EWMA

0.6

0

10

20 RTT (ms)

30

40

Fig. 11: RTT with a DL-aware proactive scheduler at varying lookback windows.

UL observation (C). The DL observer dApp reports each constructed transport block, while the UL observer dApp reports the outcome of each UL grant, including its decoding outcome, received payload, padding, grant parameters, and whether the candidate was requested by a dApp. A received payload and an unused proactive grant are therefore two outcomes of the same typed event reported by the UL observer dApp (C). Together, these observations update the per-UE predictor maintained in the dApps’ shared persistent context. During candidate collection, the candidate-request dApp is invoked once for each structurally eligible UE. When the online learner predicts that a proactive grant is due, this dApp requests that the UE enter the candidate set. Because no BSR is available before the SR, the buffer state remains unknown. In our configuration, the independently selected PRB-allocation dApp therefore assigns the minimum grant, after which the candidate follows the standard allocation and validation path. The architecture accepts any arrival predictor that outputs a predicted slot. We evaluate an Exponentially Weighted Moving Average (EWMA) and linear regression in this work. More expressive models, including Neural Networks (NNs) and gradient-boosted trees, can use the same interface; we leave their evaluation to future work. State machine. A state-machine instance is associated with each group of UEs that shares an arrival distribution. When no such prior is available, each UE receives its own instance. A group may share one instance when its members are known to have the same statistics, such as identical sensors on a fixed reporting schedule. We describe one instance below. The scheduler runs all instances independently. At initialization, the instance is in the Learning state, where it schedules proactively in every slot. This both masks the SR delay and collects an unbiased dataset of true UL arrival times. In parallel, the learner is updated from any subset of schedulerobservable features, including past UL inter-arrival times, DL event sizes and timestamps, DL-to-UL response times, and traffic class. The learner emits a predicted slot offset for the next UL arrival. The instance enters Confident once a learnerspecific readiness condition is met, such as a minimum sample count or a bound on prediction variance. In the Confident state, scheduling follows the learner’s prediction through two operator-tunable parameters. The tol-

Prediction Request

Neural Network

4

3

Linear Regression

Event: UL PDU Received

Decision Always Proactive

Learning

• Always schedule proactively • Collect metric • Update Learner

State Transition Controller

Proactive if TX Predicted

Enough Samples

Confident

• Schedule proactively based on prediction Prediction Errors • Update Learner only if Correct

Idle

No Traffic

No Traffic

Traffic Resumes

Controls

Function Calls Data Reports

Pluggable Learners

0

2

Event: PDU without payload

Prediction

0.2

Event: DL Traffic Arrival

Input Metrics (Timeseries, Burst size, …)

1 subframe backward 2 subframes backward 3 subframes backward 4 subframes backward

0.4

State Machine

CDF

0.8

Scheduler

1

Callbacks

10

MAC State Transitions State Machine Transitions

Fig. 12: Proactive scheduler architecture.

erance window TW admits scheduling within ±TW TDD periods of the prediction. The slot restriction N limits proactive grants to the last N slots of each TDD period. Smaller (TW, N ) reduce overhead by committing more closely to the predicted slot. Larger values widen the safety window at the cost of additional grants. In the language of Equation (P-URLLC), Learning realizes the minimum-latency extreme at maximum resource use, while (TW, N ) = (0, 1) approaches the minimum-overhead prediction-driven configuration. Intermediate values trace the empirical latency-overhead frontier. The achievable trade-off depends on prediction accuracy. Two online counters determine whether the instance remains Confident. Consecutive reactive transmissions count missed predictions, while unused proactive grants determine the falsepositive rate. Crossing a configured threshold, such as three consecutive misses or a 10% false-positive rate, returns the instance to Learning. A learner may also emit (TW, N ) dynamically. This lets it absorb drift by temporarily widening the safety window without returning fully to Learning. A third Idle state pauses prediction after extended inactivity, such as 100 slots without UL traffic. When traffic resumes, the instance returns to Learning. Together, the three states balance latency, jitter, and overhead under unknown or drifting traffic without RRC reconfiguration or prior knowledge of the arrival process. D. Evaluation To exercise MAC-Gyver in an over-the-air deployment, we evaluate the proactive scheduler on the testbed shown in Figure 13. The deployment is built on the X5G testbed [17] and the AutoRAN framework [31]. The OAI gNB runs on a Dell PowerEdge R760 server connected to a Foxconn RPQN RU operating in band n78 with 100 MHz bandwidth and numerology µ = 1. A Sierra Wireless EM9293 UE communicates over the air under fair channel conditions, with

11

Baseline (Reactive) TW=0 N=3 TW=1 N=3 TW=2 N=3 TW=3 N=3

RU

UE

RU

CU/DU Cluster UE

Fig. 13: Over-the-air testbed for proactive-scheduler evaluation.

TW=0 N=1 TW=1 N=1 TW=2 N=1 TW=3 N=1

TW=0 N=2 TW=1 N=2 TW=2 N=2 TW=3 N=2

1 0.8 0.6 0.4 0.2 0 0

5

10

15

20 25 RTT (ms)

30

35

40

Fig. 14: RTT for the request-response scenario. a median CQI of 13. The network uses the DDDDDDDSUU TDD pattern with a 10-slot period. We design three complementary scenarios in which proactive scheduling can leverage different forms of temporal structure. Request-response. We generate ICMP echo requests with a 300-byte payload from the User Plane Function (UPF) to the UE at controlled intervals. This scenario represents queryresponse applications such as industrial sensors responding to polling or roadside infrastructure querying vehicle status. The predictable DL-to-UL pattern allows us to evaluate RTT-based learning, where the scheduler predicts UL responses based on prior DL transmissions. We configure the scheduling dApp with an EWMA learner. Size-dependent edge inference. We emulate workloads in which a central node queries an edge device, which runs local ML inference and returns the result. Both the inference latency and the resulting UL payload may depend on the incoming DL traffic. We instantiate this scenario by running an Arctic Embed XS text-embedding model on the UE. It receives a variable-length prompt over DL, performs inference whose duration depends on the input length, and returns the embedding over UL. The server at the UE and the client at the UPF communicate over UDP. We vary the input using random word sequences of different lengths, which produce different burst sizes at the MAC layer. We configure the scheduling dApp to use linear regression on the DL burst size. Periodic autonomous reporting. We generate periodic ULonly traffic at fixed intervals between 10 and 100 ms, with no preceding DL trigger. This represents workloads such as heartbeat messages and autonomous sensor reporting. Since there is no DL correlation to leverage, the scheduler must learn the inter-arrival pattern. We use MGEN to send 97 packets per second. We select this prime-number rate so that the position of packets within the TDD period does not repeat. It produces a 10.31 ms inter-arrival time, between the standardized CG periodicities of 10 and 20 ms. We configure the scheduling dApp with an EWMA learner. For evaluation, we disable the Confident-to-Learning fallback transition that would normally be triggered by accumulated prediction errors. Otherwise, the measured latency and overhead would mix the predictor’s accuracy in the Confident state with the always-schedule safety net of the Learning state, which by construction occupies the 100%-overhead, minimum-delay corner. Disabling the fallback isolates the first

effect, so the reported results reflect Confident-state prediction quality alone. Our baseline is the default OAI scheduler, which does not perform proactive scheduling. For each scenario, we evaluate the latency CDFs across the (TW, N ) sweep. For the request-response scenario, we also evaluate the overhead, defined as the fraction of UL slots in which the UE is scheduled. The sweep traces an empirical latency-overhead trade-off. A sharp knee occurs when one (TW, N ) configuration achieves near-minimum overhead and near-minimum latency, while more aggressive configurations provide no further latency reduction. The location of this knee also indicates prediction quality. For example, a knee at (TW, N ) = (0, 1) means that the learner localizes UL arrivals to one TDD period and one eligible UL slot. Request-response results. We vary TW between 0, which schedules proactively only when the TDD period matches the prediction exactly, and 3, which covers ±3 periods around the prediction. We vary N between 1 and 3 because the configured pattern has at most three UL transmission opportunities per TDD period, comprising two U slots and one mixed S slot. Figure 14 presents the latency results. For every (TW, N ) configuration, the distribution improves substantially over the baseline. The median drops from approximately 20 ms with a long tail to 10 ms. The 90th percentile is also 10 ms, and the long tail disappears. As shown in Figure 15, the overhead, measured as the fraction of UL slots with some resources scheduled either proactively or reactively, scales linearly with TW and N . The optimal configuration for this scenario is TW = 0 and N = 1, where the overhead is 7%. The baseline has the lowest overhead, with 4% of slots scheduled. We present detailed overhead results only for request-response. Overhead scales similarly with TW and N in the other scenarios, with absolute values proportional to their traffic rates. Size-dependent edge inference results. We use TW = 2 and N = 1. As shown in Figure 16, the scheduler predicts the UL arrival time from the DL burst size, reducing end-toend delay by approximately 10 ms over the baseline across all input sizes. This is consistent with the network latency saved in the request-response scenario. Periodic autonomous reporting results. Figure 17 presents the results for the third scenario. We vary TW between 0 and 3 and N between 1 and 3. A tolerance window of TW = 0

% Scheduled UL Slots

12

Baseline (Reactive) TW = 2

TW = 0 TW = 3

20 10 0 BL 1 2 3

1 2 3

1 2 3

1 2 3

Fig. 15: Request-response overhead; bottom labels show N . Avg RTT (ms) - network + inference

Baseline (Reactive) TW=0 N=3 TW=1 N=3 TW=2 N=3 TW=3 N=3

TW = 1

70

TW=0 N=2 TW=1 N=2 TW=2 N=2 TW=3 N=2

1 0.8 0.6 0.4 0.2 0 0

10

20 Latency (ms)

30

40

Fig. 17: One-way UL latency for the periodic autonomous reporting scenario.

ML-Aware UL Scheduler Baseline

60

TW=0 N=1 TW=1 N=1 TW=2 N=1 TW=3 N=1

frequency-domain channel variations to assign each UE a favorable contiguous sub-band. The implementation exercises MAC-Gyver’s fine-grained channel observability, while mac-emu enables controlled evaluation across mobility and power-limited operating points.

50 40 50

60

70 80 90 Number of Input Words

100

Fig. 16: End-to-end latency for the size-dependent edge inference scenario. already improves the CDF over the baseline, but the best results appear from TW = 1, with a median one-way latency of 7 ms and a 99th percentile of 10 ms. The shift in the optimal TW reflects the traffic pattern. The 97-packet/s rate produces a 10.31 ms inter-arrival time that is not a multiple of the TDD period, so successive packets move across slot boundaries within the pattern. A predictor with TW = 0 commits to one TDD period and misses the arrival as drift accumulates. A tolerance of TW = 1 absorbs the drift at low overhead. A CG cannot apply the same optimization because its fixed periodicities of 10 and 20 ms lock the grant to one phase. The same drift would steadily desynchronize the CG schedule from the actual arrivals. The difference between N = 1, 2, 3 is at most 0.1 ms. For this regular traffic, scheduling a few slots earlier has only a small effect on UL latency. The optimal operating point is therefore traffic-dependent, and the architecture allows the learner to emit (TW, N ) from the observed statistics. Overall, this use case demonstrates how MAC-Gyver composes observations, persistent state, and candidate requests across scheduling opportunities. The DL and UL observer dApps update the predictor, while the candidate-request dApp acts on its output; resource allocation and grant validation remain unchanged. The resulting policy executes inside the OAI scheduler over the air. We next exercise the complementary set of interfaces: per-slot decision stages evaluated under controlled channel conditions with mac-emu. V. U SE C ASE : F REQUENCY-S ELECTIVE UL S CHEDULING Our second use case uses MAC-Gyver to implement a frequency-selective UL scheduler. The scheduler leverages

A. Motivation and Problem The potential gain from frequency-selective scheduling comes from multiuser frequency diversity, i.e., multipath propagation produces different strong and weak frequency regions for different UEs. This creates the opportunity of matching each grant to a favorable region, thereby increasing aggregate throughput within the same spectrum budget. To realize this gain, channel estimates need to be fresh. Indeed, the frequency response estimate (measured through SRS in the UL or through CQI in the DL) that the gNB observes must be close enough to the current channel state. As Doppler increases, the channel deviates from the pilot estimates faster, and the real ordering of candidate sub-bands may change compared to the stale information available at the gNB [32]. In the UL, the available gain may also depend on the UE’s operating point (i.e., its power budget and the state of the power-control loop) [33]. These considerations have motivated a broad literature on frequency-selective resource allocation, primarily on the DL. Early multiuser OFDM schedulers jointly assign individual subcarriers and select their transmission rates [34], [35]. These formulations do not map directly to 5G, where scheduling operates at PRB granularity, one MCS applies across a transport block, and UL allocations are subject to standardized resourceallocation and waveform constraints. More recent designs use quantized sub-band channel indicators reported by the UE. For example, measurements on commercial LTE hardware characterize the gain from sub-band CQI reporting [32], while SARA uses sub-band Rank Indicator (RI), Precoding Matrix Indicators (PMI), and CQI reports in 5G-LENA [36]. Depending on the configured resource-allocation type, the DL scheduler may also distribute an allocation across multiple resource-block groups. A smaller body of work studies frequency-domain scheduling on the UL. Earlier work primarily formulates the allocation problem under the contiguity constraint imposed by the uplink

13

waveform. Krishnamoorthy et al. propose frequency-semiselective scheduling to reduce channel-reporting overhead for DFT-S-OFDM [37], while Calabrese et al. construct contiguous channel-aware allocations using a search tree [38]. Lee et al. further show that proportional-fair frequency-domain scheduling under this constraint is NP-hard [4]. Gutierrez et al. provide a closer connection to the LTE measurement procedure [39]. They derive a scalar effective Signal to Interference plus Noise Ratio (SINR) for each UE–PRB pair in the Vienna LTE-A simulator, use Recursive Maximum Expansion to construct contiguous allocations, and select a common MCS from the channel quality across each assigned interval. Because the allocation procedure is shared across their comparisons, the evaluation primarily measures the effect of link adaptation instead of isolating the gain from frequencyselective placement. Their formulation also does not consider how frequency-domain channel quality depends on the selected rank, precoder, or the UE’s power distribution across a grant with a variable number of PRBs. Taken together, these gaps motivate studying frequencyselective allocation within the complete scheduling loop. MAC-Gyver exposes frequency-resolved SRS observations through the shared candidate structure and separates rank and precoder selection, resource allocation, and link adaptation into replaceable stages, while mac-emu provides controlled mobility and power-limited operating points. Using MAC-Gyver’s capabilities, we formulate two realtime allocation policies from a common rank-aware interval utility. The first restricts each UE to a fixed target number of PRBs, while the second retains a bounded set of candidate PRB counts. We first evaluate these policies offline through simulation, before evaluating whether the properties observed in simulation carry within the real network stack. We then further evaluate using MAC-Gyver against a proportional fair policy. B. Design and Implementation We now describe how the allocator dApp converts the SRS observations MAC-Gyver exposes into real-time contiguous grants. We first formulate the allocation problem and derive two policies that restrict its search space sufficiently for perslot execution. We then evaluate their expected allocation quality and computational cost offline in simulation before executing them in mac-emu. Sub-band utility. The allocator first constructs a utility profile over each UE’s sounded band. To do so, it reads the complex SRS estimates exposed through the shared candidate structure of MAC-Gyver. For each candidate UE u and PRB k, the allocator applies the rank and precoder selected by the rank/precoder dApp (stage 2 in Figure 1) and estimates the post-Minimum Mean Square Error (MMSE) SINR γu,ℓ (k) of every scheduled layer ℓ. For multi-layer transmissions, this calculation accounts for spatial conditioning: high channel energy alone does not imply that the layers can be separated reliably. Because SRS uses a per-UE power-control loop distinct from those of other UL channels, the magnitude of the SRS

estimates does not directly represent the PUSCH operating point. We therefore treat the SRS estimates as a relative frequency profile and anchor this profile using the latest PUSCH-measured SINR. We then define the per-PRB utility as the rate proxy qu (k) ≜

Lu X

log2 (1 + γu,ℓ (k)) ,

(8)

ℓ=1

where Lu is the number of layers selected for UE u. We represent a candidate grant by its first PRB s and the number w of contiguous PRBs it contains. Its aggregate utility is Ru (s, w) ≜

s+w−1 X

qu (k).

(9)

k=s

Allocation problem. Let pu denote the proportional-fair priority of UE u, B the number of available PRBs, U the number of candidate UEs, and K the number of additional grants permitted by the remaining PDCCH budget when the allocator is invoked. Hence, κ ≜ min(U, K) is the maximum number of candidates that the allocation can select. Given the interval utilities above, the allocator seeks a set A = {(u, su , wu )} of non-overlapping intervals that maximizes X max pu Ru (su , wu ), (10) A

(u,su ,wu )∈A

subject to |A| ≤ κ, at most one interval per UE, and the contiguity and feasibility constraints of the UL grant. An exact dynamic program can index its state by the next available PRB and the subset of users that remain available. For a candidate set W of PRB counts, with W = |W|, this formulation requires O(B · 2U ) states and O(BU W · 2U ) time in the worst case. Its exponential dependence on U makes it unsuitable for per-slot execution. We therefore formulate two real-time policies that restrict different dimensions of this search. Fixed PRB-count placement. Our first policy, F REQ S EL F IXED, searches only where each grant should be placed. It assumes that up to κ candidates will be selected and divides the B available PRBs equally among them. After enforcing the minimum grant size wmin , the target number of PRBs is    B . (11) wtgt ≜ max wmin , κ Within this search, channel information therefore changes the position of the grant. For each UE u, the policy examines every contiguous run of available PRBs. Within a run of length ℓ, it evaluates all starting positions for an interval containing w = min(wtgt , ℓ) PRBs. Across all runs, it retains the interval (su , wu ) with the largest Ru (su , wu ). This produces one candidate interval per UE with weight pu Ru (su , wu ). Because preferred intervals may overlap, a weighted-intervalscheduling dynamic program selects the maximum-weight non-overlapping subset containing at most κ intervals. The dynamic program is exact over the generated candidate intervals. Restricting each UE to one preferred interval keeps the candidate set small enough for per-slot execution. Variable PRB-count placement. Our second policy, F REQ S EL -R EFINED, also searches over wu ∈ W. Retaining

F REQ S EL -R EFINED slot duration (500 µs)

6

10

5

10

DNF

4

DNF

10

DNF

Allocator runtime (µs, log scale)

F REQ S EL -F IXED exact optimum

3

10

2

10

1

10

8

12 16 32 64 Candidate UEs (K = 8 scheduled)

128

Fig. 18: Scheduler execution time (offline execution).

every user, position, and PRB count in one real-time search would recover the exponential problem above. We instead separate user ordering from PRB-count refinement. First, a maximum-weight assignment maps κ distinct users to κ ordered anchor intervals containing equal numbers of PRBs. Let π = (u1 , . . . , uκ ) denote the resulting user order. Holding π fixed, an ordered dynamic program chooses (suj , wuj ) such that suj + wuj ≤ suj+1 ,

wuj ∈ W, 1 ≤ j < κ. (12) Pκ The dynamic program maximizes j=1 puj Ruj (suj , wuj ) over the feasible positions and PRB counts. It is therefore exact for the selected user order, while avoiding the subset state of the global optimum. Computational cost. Both policies construct qu (k) and its cumulative values in O(B) time per UE. The cumulative representation then allows an interval score to be obtained with two lookups and one subtraction. For F REQ S EL -F IXED, scanning the starting positions costs O(U B), constructing the interval-compatibility relation costs O(U 2 ), and selecting at most κ intervals costs O(U κ). Its overall complexity is therefore O(U B + U 2 + U κ). For F REQ S EL -R EFINED, assigning κ anchor intervals to U users costs O(U κ2 ), while evaluating W candidate PRB counts across B positions for each selected user costs O(κBW ). Including utility-profile construction, its overall complexity is O(U B + U κ2 + κBW ). Offline policy evaluation. We first evaluate whether the two restricted searches can execute within the slot duration. We fix B = 106, K = 8 (and hence κ = 8), and W = 30, vary the number of candidate users from 8 to 128, and measure the execution time of each allocator outside the scheduler loop. Figure 18 shows that both policies remain within the slot budget: with 128 candidates, their 99th-percentile execution times are 168 µs for F REQ S EL -F IXED and 394 µs for F REQ S EL R EFINED. In contrast, the exact solver already requires 3.3 ms for eight users and 247 ms for twelve users, consistent with its exponential complexity. We then compare the allocation quality of the two real-time policies. Each channel instance contains eight independent static rank-2 users over a B = 106-PRB carrier under a CDLB channel with 300-ns delay spread. We replay the searches performed by F REQ S EL -F IXED and F REQ S EL -R EFINED with equal proportional-fair weights and no pre-existing alloca-

Expected cell spectral efficiency (bit/s/Hz)

14

F REQ S EL -F IXED F REQ S EL -R EFINED

10 8 6 4

95

100

105 110 Path loss (dB)

115

Fig. 19: Simulation-based expected cell spectral efficiency for 8 static users under CDL-B 300-ns channel.

tions. For every selected interval, we derive the post-MMSE SINRs from the exact channel state and select the MCS that maximizes expected rate under mac-emu’s calibrated BLER model. We divide the resulting aggregate expected rate by B to obtain the expected cell spectral efficiency in bit/s/Hz. Figure 19 reports this quantity while varying path loss. F REQ S EL -R EFINED outperforms F REQ S EL -F IXED throughout the sweep. Taken together, Figures 18 and 19 identify F REQ S EL R EFINED as a promising real-time policy in the offline evaluation: the implementation remains within the slot budget, while its additional allocation flexibility has measurable value. We next use MAC-Gyver to determine whether this advantage persists inside the complete OAI scheduling loop. C. MAC-Gyver-based Evaluation We use MAC-Gyver to evaluate frequency-selective allocation inside the complete OAI scheduling loop in mac-emu. We first select between the two real-time variants introduced above and then compare the retained F REQ S EL -F IXED policy with proportional fairness across operating conditions. The experiments use saturating UL Multi-Generator (MGEN) traffic, a CDL-B 300 ns channel and two-layer MIMO. Unless stated otherwise, they use 32 users and periodic SRS with an interval of 160 slots (80 ms). Mobility models. We distinguish physical user motion from slow channel evolution around a stationary terminal. Our quasi-static model keeps the UE fixed but uses a maximum Doppler of 0.5 Hz to represent channel variations caused by moving environmental scatterers, as observed on fixed wireless links [40]. For moving users, we set the maximum Doppler according to fD = vfc /c; at our 3.5-GHz carrier frequency, speeds of 1, 2, and 5 km/h correspond to 3.24, 6.48, and 16.20 Hz, respectively. The homogeneous and mixed-cell experiments keep each user in one mobility state throughout the run. We additionally evaluate a Lévy-walk mobility model in which users alternate between movement at 5 km/h and quasi-static pauses. Pause durations follow a truncated Pareto distribution with exponent 0.8 over 30–300 s, while movement durations are exponentially distributed with a mean of 60 s. During pauses, the channel continues to evolve at 0.5 Hz. This model captures

15

PF

F REQ S EL -F IXED

UL throughput (Mbit/s)

36

7

35

6.5

34

F REQ S EL -R EFINED 110 dB path loss

96 dB path loss

6

33

5.5

32 5 Default

MCS Oracle

Default

MCS Oracle

Fig. 20: Aggregate UL throughput in mac-emu. 35 UL throughput (Mbit/s)

the alternating movement and heavy-tailed pause behavior observed in human-mobility traces [41]. Policy selection. We begin by determining whether the additional allocation flexibility of F REQ S EL -R EFINED is beneficial to end-to-end network performance. In the offline evaluation of Figure 19, F REQ S EL -F IXED and F REQ S EL -R EFINED achieve 10.27 and 10.98 bit/s/Hz, respectively, at 96 dB path loss. At 110 dB, they achieve 5.46 and 6.29 bit/s/Hz. Thus, the offline advantage of F REQ S EL -R EFINED grows from 7.0% to 15.2% as the users become power-limited. We next evaluate whether this additional flexibility improves performance inside the complete scheduling loop. We execute F REQ S EL -F IXED and F REQ S EL -R EFINED within MACGyver as PRB allocation dApps. The experiment contains 16 quasi-static users, eight users at 2 km/h, and eight users at 5 km/h. Figure 20 compares aggregate UL throughput at 96 and 110 dB path loss. In each panel, the left group compares proportional fairness and the two frequency-selective policies under the default OAI link adaptation. At 96 dB, F REQ S EL -F IXED and F REQ S EL -R EFINED achieve 33.32 and 32.97 Mbit/s, corresponding to gains of 5.0% and 3.9% over proportional fairness. At 110 dB, they achieve 5.58 and 5.39 Mbit/s, corresponding to gains of 7.0% and 3.3%. Thus, F REQ S EL -R EFINED remains below F REQ S EL -F IXED, and the improvement suggested by the offline optimization does not carry when evaluating with the full scheduler. The oracle-MCS bars on the right of each panel test whether this reversal is caused by the interaction with link adaptation. We replace the default MCS-selection stage with an oracle dApp that uses the exact mac-emu channel state to select the highest MCS whose predicted BLER does not exceed 13%. At 96 dB, F REQ S EL -F IXED and F REQ S EL -R EFINED achieve 36.36 and 35.59 Mbit/s, respectively. At 110 dB, they achieve 7.20 and 6.78 Mbit/s. Although the oracle increases throughput for both policies, it does not change their ordering: F REQ S EL R EFINED remains 2.1% and 5.9% below F REQ S EL -F IXED at the two operating points. Adapting the number of allocated PRBs therefore remains detrimental even under oracle MCS selection. This experiment illustrates how MAC-Gyver supports policy shaping within the complete system rather than from an isolated optimization objective. By replacing the allocation and link-adaptation stages independently while retaining the rest of the scheduling loop, we find that refining the number of allocated PRBs increases computational and implementation complexity without improving throughput. We therefore retain F REQ S EL -F IXED for the remaining experiments, which compare it with proportional fairness under the common CDLB 300-ns channel at 96 dB path loss, unless stated otherwise. Mobility. We first isolate the effect of channel evolution by placing all 32 users in the same mobility state. Figure 21 compares the quasi-static, 1-km/h, and 5-km/h cases. The gain of F REQ S EL -F IXED is largest in the quasi-static cell and decreases with mobility as the channel evolves between the SRS observation and the resulting grant. This trend is consistent with measurements on an experimental LTE system, where the gain from best-sub-band scheduling at 10 km/h disappeared once the CQI reporting delay reached 20 ms [32].

PF F REQ S EL -F IXED

34 33 32 31 static (0.5 Hz)

1 km/h

5 km/h

UE mobility

Fig. 21: Aggregate UL throughput versus user speed. Mixed mobility. Next, we evaluate F REQ S EL -F IXED in cells with mixed mobility. Figure 22 varies the number of 5-km/h users in a 32-user cell, with the remaining users following the quasi-static model. The gain over proportional fairness decreases as the mobile fraction increases, from 7%, or 2.0 Mbit/s, when every user is quasi-static to no measurable gain when every user is mobile. Figure 23 shows how this gain is distributed in a cell containing 16 quasi-static and 16 mobile users. Frequencyselective allocation shifts the throughput distribution of the quasi-static users toward higher rates, while the distribution of the mobile users remains close to that obtained with proportional fairness, as channel evolution removes most of the benefit of SRS-based placement. Lévy-walk mobility. The preceding experiments keep each user in one mobility state throughout the run. We finally examine whether the same behavior holds when individual users alternate between moving and paused periods according to the Lévy-walk model. Figure 24 reports the per-grant MCS distribution conditioned on the user’s state. During quasistatic pauses, F REQ S EL -F IXED shifts the distribution toward higher MCS values relative to proportional fairness. During movement at 5 km/h, the two distributions largely overlap. The benefit therefore follows the user’s current mobility state: frequency-selective placement improves link quality while the observed frequency profile remains sufficiently stable, but provides little value after that profile decorrelates. Overall, F REQ S EL -F IXED improves aggregate UL throughput by up to 7% in the complete scheduler, with gains concentrated among users whose channels vary slowly; the benefit disappears in a fully mobile scenario. More importantly, this experiment illustrates the value of exposing scheduler deci-

31

PF, paused (0.5 Hz) PF, moving (5 km/h)

PF F REQ S EL -F IXED

30.5

F REQ S EL -F IXED, paused (0.5 Hz) F REQ S EL -F IXED, moving (5 km/h)

1

30 0.8

29.5 29

CDF

UL throughput (Mbit/s)

16

28.5 0

8

16 mobile UEs (of 32)

24

32

0.4 0.2 0

Fig. 22: Aggregate UL throughput. PF, static (0.5 Hz) PF, mobile

0.6

F REQ S EL -F IXED, static (0.5 Hz) F REQ S EL -F IXED, mobile

20

22 24 26 per-grant MCS (initial transmissions)

28

Fig. 24: Per-grant MCS conditioned on UE state (Lévy-walk).

1

CDF

0.8 0.6 0.4 0.2 0 0.85

0.9 0.95 per-UE UL throughput (Mbit/s)

1

Fig. 23: Per-user UL throughput in a cell with 16 quasi-static users and 16 users moving at 5 km/h. sions as separate dApp stages. The offline evaluation favors F REQ S EL -R EFINED, but the policy ordering reverses when both allocators execute inside the complete OAI scheduling loop. Because resource allocation and MCS selection are decoupled, we can replace the default link adaptation with an oracle dApp while leaving the allocators and the rest of the scheduler unchanged. Even under these idealized conditions, the reversal persists. Combined with mac-emu’s controlled mobility and power conditions, this decomposition lets us identify which algorithmic refinements survive system integration and discard complexity that does not improve end-to-end performance. VI. R ELATED W ORK We compare MAC-Gyver with existing experimentation platforms and with prior work on the two scheduling problems. A. Experimentation Frameworks, Platforms, and Emulation Open RAN stacks such as OAI [42] and srsRAN/OCUDU [43] implement a full protocol stack compliant with 3GPP NR Release 15/16. Their per-slot schedulers — of which the internals are not standardized, leaving the vendor room to develop their own logic — however, remain monolithic and represent the motivation for the introduction of MAC-Gyver. To our knowledge, MAC-Gyver is the first framework to expose the in-MAC per-slot decision as a pluggable interface in a production RAN stack. External controllers provide a complementary control tier. The Open RAN (O-RAN) architecture hosts control logic

in near-Real-Time (RT) and non-RT RAN Intelligent Controllers (RICs) [44]; FlexRIC connects these controllers to OAI through an E2 agent and service-oriented Software Development Kit (SDK) [45]; and ColO-RAN develops and evaluates machine-learning xApps on programmable platforms [7]. These controllers steer UE-level policies over tens of milliseconds or longer, and this is not compatible with real-time scheduling decisions. A MAC-Gyver dApp applies such a policy directly inside the per-slot scheduler. This design follows the dApp model, which places sub-millisecond inference and control inside the gNB [8], and its E3 interface for attaching dApps and consuming real-time data [10]. MAC-Gyver specializes this model into synchronous scheduling stages and additionally lets stateful dApps observe transmission outcomes and orchestrate controls accross scheduling opportunities. Existing evaluation platforms trade hardware fidelity for scale and accessibility. Colosseum connects Software-defined Radios (SDRs) through an Field Programmable Gate Array (FPGA)-based Radio Frequency (RF) channel emulator [18], while POWDER provides a city-scale over-the-air testbed [46]. Both retain a real PHY and radio hardware, which require shared facilities and limit the number of simultaneous UEs. ns-3 [47] and 5G-LENA [48] scale through simulated time and reimplemented schedulers. Sionna provides differentiable linklevel models [49], and NVIDIA Aerial implements a Compute Unified Device Architecture (CUDA)-accelerated PHY [50]. Closer to mac-emu, 5G-EMANE proposes a multi-user proxy over nFAPI for LTE and NR OAI, providing a PHYless Layer 2 proxy [51]. Its 5G evaluation demonstrates up to 15 users. However, the authors report approximately 30 Mbit/s with 40% packet loss in DL. Moreover, its public implementation2 has seen no commits since January 2024. B. Predictive and Proactive URLLC Scheduling New UL traffic can wait for a periodic SR, a small grant, and a BSR before the gNB issues its data grant. The TDD pattern adds slot-alignment delay, and commercial 5th generation (5G) standalone networks report median UL round-trip times of 50–70 ms [52]. Configured grants remove the SR wait by pre-allocating periodic UL resources [2], [30]. Their fixed period and phase serve strictly periodic traffic. Event-driven 2 https://github.com/EpiSci/oai-lte-5g-multi-ue-proxy

17

and multi-source arrivals can waste resources or miss reserved opportunities. Configured grants also require the application and RRC configuration at the UE to remain synchronized. Furthermore, a traffic period that is not aligned with the TDD pattern drifts relative to the available UL slots. Learning-based schedulers generally act after demand becomes known. LEASCH uses deep reinforcement learning to allocate resource blocks at the MAC layer [5]. Other work jointly allocates resources to URLLC and Enhanced Mobile Broadband (eMBB) traffic [3], controls that split through an ORAN xApp [53], or evaluates data-driven control at scale with ColO-RAN [7]. Our scheduler addresses the preceding access delay. It learns arrivals online from in-RAN events and issues a grant before the UE sends an SR. The Layer 2 dApp needs no offline dataset or application-to-RRC synchronization. To our knowledge, prior work has not demonstrated online arrival prediction and proactive UL grants in a production RAN stack. C. Frequency-Selective and Channel-Aware Scheduling Frequency-selective scheduling first emerged in multiuser OFDM. Wong et al. [34] minimize downlink power under per-user rate constraints, while Rhee and Cioffi [35] maximize capacity through dynamic subchannel assignment. Later downlink work measured a gain of roughly two CQI steps in Long Term Evolution (LTE) field trials [32] and used per-sub-band RI, PMI, and CQI in the SARA scheduler for 5G-LENA [36]. The UL adds a contiguity constraint because SC-FDMA (DFT-S-OFDM) assigns each UE a contiguous set of PRBs. This restriction prevents the scheduler from assigning an arbitrary set of strong sub-bands to one UE. Lee et al. [4] prove that proportional-fair frequency-domain scheduling is NP-hard under this constraint. Consequently, prior uplink schedulers use heuristics such as candidate-tree search [38] or a coarse sub-band grid [37], primarily evaluated through analysis and link- or system-level simulation. Our allocator extends this uplink work in three ways. First, it consumes per-PRB SRS observations inside OAI and places each user’s contiguous grant on a favorable sub-band. Second, it derives real-time policies with different restrictions on the exact contiguous-allocation problem. Finally, it uses offline analysis to shape these policies and integrated execution to select between them. To our knowledge, prior work has not combined these properties in a production RAN stack. VII. C ONCLUSION We presented MAC-Gyver, an open MAC-layer framework for implementing scheduling dApps in the gNB. Its staged pipeline exposes self-contained interfaces to dApps, while its software-emulation component, mac-emu, executes the same policies with tens of UEs at real-time slot pace while emulating realistic channel dynamics. We demonstrate these capabilities with two dApp-based use cases that exercise different parts of the scheduler interface. First, proactive scheduling combines observer and candidate-request dApps through persistent context to implement closed-loop control across scheduling opportunities. In OTA experiments with sparse traffic, it reduces median RTT by approximately 50%. Second, we

develop two real-time frequency-selective schedulers, which we first compare offline through simulations. Although offline analysis favors the more flexible design, executing both in MAC-Gyver (inside mac-emu) shows that the simpler policy performs better within the complete scheduling loop. This use case shows how MAC-Gyver supports algorithm design: offline and simulation-based analysis identifies potentially useful mechanisms, while execution in the complete scheduler determines which mechanisms affect end-to-end performance and should be retained. We then evaluate the retained policy further and show that it improves UL throughput under favorable channel conditions. Together, these applications show how MAC-Gyver supports policy design, controlled cell-scale evaluation, and OTA execution without reimplementation. The open-source release of MAC-Gyver and mac-emu supports reproducible AI-for-RAN research at the MAC layer. R EFERENCES [1] L. Kundu, X. Lin, R. Gadiyar, J.-F. Lacasse et al., “Ai-ran: Transforming ran with ai-driven computing infrastructure,” IEEE Communications Magazine, 2025. [2] 3GPP, “NR; Medium Access Control (MAC) protocol specification,” 3rd Generation Partnership Project (3GPP), Technical Specification (TS) 38.321, 2024, release 18, V18.x. [3] A. Anand, G. de Veciana, and S. Shakkottai, “Joint Scheduling of URLLC and eMBB Traffic in 5G Wireless Networks,” Trans. on Net., vol. 28, no. 2, pp. 477–490, 2020. [4] S. B. Lee, I. Pefkianakis, A. Meyerson, S. Xu et al., “Proportional fair frequency-domain packet scheduling for 3GPP LTE uplink,” in Proc. IEEE INFOCOM, 2009, pp. 2611–2615. [5] F. Al-Tam, N. Correia, and J. Rodriguez, “Learn to Schedule (LEASCH): A Deep Reinforcement Learning Approach for Radio Resource Scheduling in the 5G MAC Layer,” IEEE Access, 2020. [6] P. Kela, B. Liu, and A. Valcarce, “From simulation to practice: Generalizable deep reinforcement learning for cellular schedulers,” arXiv preprint arXiv:2411.08529, 2024. [7] M. Polese, L. Bonati, S. D’Oro, S. Basagni et al., “ColO-RAN: Developing machine learning-based xApps for open RAN closed-loop control on programmable experimental platforms,” IEEE Transactions on Mobile Computing, vol. 22, no. 10, pp. 5787–5800, 2023. [8] S. D’Oro, M. Polese, L. Bonati, H. Cheng et al., “dApps: Distributed applications for real-time inference and control in O-RAN,” IEEE Communications Magazine, vol. 60, no. 11, pp. 52–58, 2022. [9] R. Barker, A. E. Dorcheh, T. Seyfi, and F. Afghah, “Real: Reinforcement learning-enabled xapps for experimental closed-loop optimization in oran with osc ric and srsran,” in ICC Workshops, 2025. [10] A. Lacava, L. Bonati, N. Mohamadi, R. Gangula et al., “dApps: Enabling real-time AI-based open RAN control,” Com. Net., 2025. [11] G. F. Riley and T. R. Henderson, “The ns-3 network simulator,” in Modeling and tools for network simulation. Springer, 2010, pp. 15–34. [12] M. Elkael, “Refactor DLSCH/ULSCH scheduler: Extract the proportional-fair policy behind a function-pointer interface,” OpenAirInterface5G merge request !3902, 2026, merged 2026-0523. [Online]. Available: https://gitlab.eurecom.fr/oai/openairinterface5g/ -/merge requests/3902 [13] M. Elkael, M. Polese, Y. Lee, K. Furueda et al., “Auguste: Online-learning dapp for predictive urllc scheduling,” arXiv preprint arXiv:2606.03664, 2026. [14] M. Elkael, S. D’Oro, L. Bonati, M. Polese et al., “Agentran: An agentic ai architecture for autonomous control of open 6g networks,” IEEE Communications Magazine, 2026. [15] P. F. Pérez, C. Fiandrino, and J. Widmer, “Characterizing and modeling mobile networks user traffic at millisecond level,” in Proceedings of the 17th ACM Workshop on Wireless Network Testbeds, Experimental evaluation & Characterization, 2023, pp. 64–71. [16] T. R. Henderson, M. Lacage, G. F. Riley, C. Dowell et al., “Network simulations with the ns-3 simulator,” SIGCOMM demonstration, vol. 14, no. 14, p. 527, 2008.

18

[17] D. Villa, I. Khan, F. Kaltenberger, N. Hedberg et al., “X5G: An Open, Programmable, Multi-vendor, End-to-end, Private 5G O-RAN Testbed with NVIDIA ARC and OpenAirInterface,” IEEE Transactions on Mobile Computing, 2025. [18] L. Bonati, P. Johari, M. Polese, S. D’Oro et al., “Colosseum: Largescale wireless experimentation through hardware-in-the-loop network emulation,” in Proc. IEEE Int. Symp. on Dynamic Spectrum Access Networks (DySPAN), 2021. [19] P. S. Upadhyaya, N. Tripathi, J. Gaeddert, and J. H. Reed, “Open ai cellular (oaic): An open source 5g o-ran testbed for design and testing of ai-based ran management algorithms,” IEEE Network, 2023. [20] C. Wei, A. Kak, N. Choi, and T. Wood, “5gperf: profiling open source 5g ran components under different architectural deployments,” in Proceedings of the ACM SIGCOMM Workshop on 5G and Beyond Network Measurements, Modeling, and Use Cases, 2022, pp. 43–49. [21] M. Rouili, N. Saha, M. Golkarifard, M. Zangooei et al., “Evaluating open-source 5g sa testbeds: Unveiling performance disparities in ran scenarios,” in NOMS 2024-2024 IEEE Network Operations and Management Symposium. IEEE, 2024, pp. 1–6. [22] A. Mamaghani, U. Ghosh, S. Shakkottai, D. Bharadia et al., “Tinytwin: A cpu-native full-stack digital twin for nextg cellular networks,” in 2026 IEEE International Symposium on Spectrum Innovation (DySPAN). IEEE, 2026, pp. 1–8. [23] 3GPP, “Study on channel model for frequencies from 0.5 to 100 GHz,” 3rd Generation Partnership Project (3GPP), Technical Report (TR) 38.901, 2026, release 19, V19.4.0. [24] S. Lagen, K. Wanuga, H. Elkotby, S. Goyal et al., “New Radio Physical Layer Abstraction for System-Level Simulations of 5G Networks,” in ICC 2020 - 2020 IEEE International Conference on Communications (ICC), 2020, pp. 1–7. [25] Y. Deshpande, X. Wang, and W. Kellerer, “Openairlink: Reproducible wireless channel emulation using software defined radios,” in 2024 IFIP Networking Conference (IFIP Networking). IEEE, 2024, pp. 1–6. [26] 3GPP, “NR; Physical layer procedures for data,” 3rd Generation Partnership Project (3GPP), Technical Specification (TS) 38.214, 2026, release 19, V19.4.0. [27] U.S. Naval Research Lab., “Multi-generator (MGEN) network test tool,” https://github.com/USNavalResearchLaboratory/mgen, accessed 2026. [28] 3GPP, “Service requirements for the 5G system,” 3rd Generation Partnership Project (3GPP), Technical Specification (TS) 22.261, 2026, release 19, V19.14.0. [29] P. Popovski, J. J. Nielsen, C. Stefanovic, E. de Carvalho et al., “Wireless Access for Ultra-Reliable Low-Latency Communications: Principles and Building Blocks,” IEEE Network, vol. 32, no. 2, pp. 16–23, 2018. [30] T.-K. Le, U. Salim, and F. Kaltenberger, “Enhancing URLLC Uplink Configured-Grant Transmissions,” in IEEE 93rd Vehicular Technology Conference (VTC2021-Spring), 2021. [31] S. Maxenti, R. Shirkhani, M. Elkael, L. Bonati et al., “AutoRAN: Automated and Zero-Touch Open RAN Systems,” arXiv preprint arXiv:2504.11233, 2025. [32] P. Ökvist, A. Simonsson, and H. Asplund, “LTE frequency selective scheduling performance and improvements assessed by measurements,” in Proc. IEEE 22nd Int. Symp. Personal, Indoor and Mobile Radio Communications (PIMRC), 2011, pp. 1919–1923. [33] 3GPP, “NR; Physical layer procedures for control,” 3rd Generation Partnership Project (3GPP), Technical Specification (TS) 38.213, 2025, release 18, V18.5.0. [34] C. Y. Wong, R. S. Cheng, K. B. Letaief, and R. D. Murch, “Multiuser OFDM with adaptive subcarrier, bit, and power allocation,” IEEE Journal on Selected Areas in Communications, vol. 17, no. 10, pp. 1747– 1758, 1999. [35] W. Rhee and J. M. Cioffi, “Increase in capacity of multiuser OFDM system using dynamic subchannel allocation,” in Proc. IEEE 51st Vehicular Technology Conference (VTC 2000-Spring), vol. 2, 2000, pp. 1085–1089. [36] G. Ferreira, B. Bojović, A. A. Gargari, and S. Lágen, “SARA: Sub-band aware resource assignment for 5G-LENA,” in ICNS3, 2025. [37] A. Krishnamoorthy, P. J. Sartori, K. L. Baum, V. Nangia et al., “Frequency semi-selective scheduling for a DFT-S-OFDM based uplink,” in Proc. IEEE 68th Vehicular Technology Conference (VTC 2008-Fall), 2008, pp. 1–5. [38] F. D. Calabrese, P. E. Mogensen, C. Rosa, P.-H. Michaelsen et al., “Search-tree based uplink channel aware packet scheduling for UTRAN LTE,” in Proc. IEEE 67th Vehicular Technology Conference (VTC 2008Spring), 2008, pp. 1949–1953.

[39] A. Gutierrez, V. Rangel, J. Gomez, R. M. Edwards et al., “A joint modulation-coding scheme and resource allocation in LTE uplink,” Elektronika ir Elektrotechnika, vol. 26, no. 5, pp. 50–58, 2020. [40] A. Domazetovic, L. J. Greenstein, N. B. Mandayam, and I. Seskar, “Estimating the doppler spectrum of a short-range fixed wireless channel,” IEEE Communications Letters, vol. 7, no. 5, pp. 227–229, 2003. [41] I. Rhee, M. Shin, S. Hong, K. Lee et al., “On the lévy-walk nature of human mobility,” IEEE/ACM Transactions on Networking, vol. 19, no. 3, pp. 630–643, 2011. [42] F. Kaltenberger, A. P. Silva, A. Gosain, L. Wang et al., “OpenAirInterface: Democratizing innovation in the 5G cellular ecosystem,” Computer Networks, vol. 176, p. 107284, 2020. [43] I. Gomez-Miguelez, A. Garcia-Saavedra, P. D. Sutton, P. Serrano et al., “srsLTE: An open-source platform for LTE evolution and experimentation,” in WiNTECH, 2016, pp. 25–32. [44] M. Polese, L. Bonati, S. D’Oro, S. Basagni et al., “Understanding O-RAN: Architecture, interfaces, algorithms, security, and research challenges,” IEEE Communications Surveys & Tutorials, vol. 25, no. 2, pp. 1376–1411, 2023. [45] R. Schmidt, M. Irazabal, and N. Nikaein, “FlexRIC: an SDK for nextgeneration SD-RANs,” in Proc. 17th Int. Conf. on Emerging Networking EXperiments and Technologies (CoNEXT), 2021, pp. 411–425. [46] J. Breen, A. Buffmire, J. Duerig, K. Dutt et al., “POWDER: Platform for open wireless data-driven experimental research,” in Proc. 14th Int. Workshop on Wireless Network Testbeds, Experimental Evaluation & Characterization (WiNTECH), 2020. [47] T. R. Henderson, M. Lacage, G. F. Riley, C. Dowell et al., “Network simulations with the ns-3 simulator,” in ACM SIGCOMM Conference Demonstration Session, 2008. [48] N. Patriciello, S. Lágen, B. Bojovic, and L. Giupponi, “An E2E simulator for 5G NR networks,” Simulation Modelling Practice and Theory, vol. 96, p. 101933, 2019. [49] J. Hoydis, S. Cammerer, F. Ait Aoudia, A. Vem et al., “Sionna: An open-source library for next-generation physical layer research,” arXiv preprint arXiv:2203.11854, 2022. [50] NVIDIA, “NVIDIA Aerial CUDA-accelerated RAN,” https://developer. nvidia.com/aerial, 2024, software and product documentation. [51] B. Ryu, R. Knopp, M. Elkadi, D. Kim et al., “5g-emane: Scalable open-source real-time 5g new radio network emulator with emane,” in MILCOM 2022-2022 IEEE Military Communications Conference (MILCOM). IEEE, 2022, pp. 553–558. [52] M. Ghoshal, O. Basit, S. Wang, P. Dinh et al., “A First Large-Scale Study of Operational 5G Standalone Networks,” CoNEXT, 2025. [53] R. M. Sohaib, S. T. Shah, O. Onireti, Y. Sambo et al., “DRL-Based Joint Resource Scheduling of eMBB and URLLC in O-RAN,” in ICC Workshops, 2024.

ACKNOWLEDGMENTS We thank Robert Schmidt from OpenAirInterface for his precious comments during the review of our open-source contributions.

Record · ID 410986 · SHA-256 1950f65aadaa3423
Retrieved via Conceptio — every document is proof-bundled with source, license, and retrieval metadata.