The gas flow characteristics in lid-driven cavities are influenced by several factors, such as the cavity geometry, gas properties, and boundary conditions. In this study, the physics of heat and gas flow in cylindrical lid-driven cavities with various cross sections, including fully or partially rounded edges, is investigated through numerical simulations using the direct simulation Monte Carlo (DSMC) and the discrete unified gas kinetic scheme (DUGKS) methods. The thermal and fluid flow fields are systematically studied for both constant and oscillatory lid velocities, for various degrees of gas rarefaction ranging from the slip to the free-molecular regimes. The impact of expansion cooling and viscous dissipation on the thermal and flow fields, as well as the occurrence of counter-gradient heat transfer (also known as anti-Fourier heat transfer) under non-equilibrium conditions, is explained based on the results obtained from numerical simulations. Furthermore, the influence of the incomplete tangential accommodation coefficient on the thermal and fluid flow fields is discussed. A comparison is made between the thermal and fluid flow fields predicted in cylindrical cavities and those in square-shaped cavities. The present work contributes to the advancement of micro-/nano-electromechanical systems by providing valuable insight into rarefied gas flow and heat transfer in lid-driven cavities.