In this paper, we study joint power control and scheduling in uplink massive multiple-input multiple-output (MIMO) systems with randomly arriving data traffic. We consider both co-located and Cell-Free (CF) Massive MIMO, where the difference lies in whether the antennas are co-located at the base station or spread over a wide network area. The data is generated at each user according to an individual stochastic process. Using Lyapunov optimization techniques, we develop a dynamic scheduling algorithm (DSA), which decides at each time slot the amount of data to admit to the transmission queues and the transmission rates over the wireless channel. The proposed algorithm optimizes the long-term user throughput under various fairness policies while keeping the transmission queues stable. Simulation results show that the state-of-the-art power control schemes developed for Massive MIMO with infinite backlogs can fail to stabilize the system even when the data arrival rates are within the network capacity region. Our proposed DSA shows advantage in providing finite delay with performance optimization whenever the network can be stabilized.Index Terms-Massive MIMO, dynamic resource allocation, cross-layer control, Lyapunov optimization, drift-plus-penalty. has been studied in [21], where the optimal control strategy is decoupled into subproblems of flow control, routing and resource allocation. The proposed algorithms based on the driftplus-penalty (DPP) technique are shown to provide stability and achieve time-average throughput arbitrarily close to the optimal fairness operating point. Similar types of DPP-based algorithms can be found in [22], [23]. A general presentation of cross-layer control (CLC) and resource allocation strategies can be found in [24], with special focus on flow control algorithms that achieve optimal network fairness with stability guarantees. Recently, Lyapunov optimization has been used to study power control and scheduling in delay-aware device-todevice communication [25] and packet-based communication with deadlines [26]. Although the use of Lyapunov optimization in communication systems is not a new topic, very few works have