Network slicing is a key feature introduced for 5G and Beyond 5G (B5G) to provide complete connectivity between people and things by overcoming limited resources. This study considers a theoretical approach for resource allocation when network slicing is employed. Specifically, an algorithm finding a feasible region of users for a given environment is proposed, and a continuous time Markov chain is adopted for its analysis. Some performance measures, such as average throughput and expected total revenue of the infrastructure provider, are expressed by the stationary probabilities of the Markov chain. A simple example and three different environments are presented in the experiment to illustrate the analysis procedure and investigate the effects of environments on performance, respectively. This analytical approach can simplify and speed up the evaluation of the performance of the network operator's strategy and increases the reliability of the evaluation, which is beneficial in practical applications. Moreover, this can provide theory based-guidance for infrastructure providers in determining the consistent network slice allocation policies, considering the users' needs and the network operator's decision strategy.