Abstract:Network slicing is a key enabler for providing a differentiated service support to heterogeneous use cases and applications in 5G and beyond networks through creating multiple logical slices. Resource allocation for satisfying diverse requirements of slices is a highly challenging task under time-varying traffic and wireless channel conditions. This paper presents a deep reinforcement learning (DRL) approach for allocating radio resources to slices, where the objective is to meet the latency requirement of the low-latency slice without jeopardizing the performance of the other slice. The proposed DRL approach is implemented within an open source mobile network emulator, namely OpenAirInterface, to create an O-RAN compliant end-to-end 5G network capable of dynamic resource allocation capabilities. The intelligent resource allocation mechanism operates on the RAN Intelligent Controller (RIC) as an xApp, enabling monitoring and dynamic resource control of the gNB through the E2 interface. The results demonstrate that the latency requirement of the low-latency slice is met under extremely loaded traffic scenarios, where the trained DRL model deployed on the near-RT RIC platform is used to dynamically allocate the radio resources to the slices.