Massive multiuser multiple-input multiple-output (MIMO) systems have been recently introduced as a promising technology for the next generation of wireless networks. It has been proven that linear precoders/detectors such as maximum ratio transmitting/maximum ratio combining (MRT/MRC), zero forcing (ZF), and linear minimum mean square error (LMMSE) on the downlink (DL)/uplink (UL) transmission can provide near optimal performance in such systems. Acquiring channel state information (CSI) at the transmitter as well as the receiver is one of the challenges in multiuser massive MIMO that can affect the network performance. Any data transmission in multiuser massive MIMO systems starts with the user transmitting UL pilots. The base station (BS) then uses the MMSE estimation method to accurately estimate the CSI from the pilot sequences. Since the UL and DL channels are reciprocal in time division duplex (TDD) mode, the BS employs the obtained CSI to precode the data symbols prior to DL transmission. The users also need the CSI knowledge to accurately decode the DL signals. Beamforming training (BT) scheme is one of the methods that is proposed in the literature to provide the CSI knowledge for the users. In this scheme, the BS precodes and transmits a pilot sequence to the users such that each user can estimate its effective channel coefficients. Developing an optimal resource distribution method that enhances the system performance is another challenging issue in multiuser massive MIMO. As mentioned earlier, CSI acquisition is one of the requirements of multiuser massive MIMO, and UL pilot transmission is the common method to achieve that. Conventionally, equal powers have been considered for the pilot transmission phase and data transmission phase. However, it can be shown that the performance of the system under this method of power distribution is not optimal. Therefore, to further improve the performance of multiuser massive MIMO technology, especially in cases where the antenna elements are not well separated and the propagational dispersion is low, optimal resource allocation is required. Hence, the main objective of this M.A.Sc. thesis is to develop an optimal resource allocation among pilot and data symbols to maximize the spectral efficiency, assuming different receivers such as MRC, ZF, and LMMSE are employed at the BS. Since the calculation of spectral efficiency using the lower bound on the achievable rate is computationally very intensive, we first obtain closed-form expressions for the achievable UL rate of users, assuming the angular domain in the physical channel model is divided into a finite number of separate directions. An approximate expression for spectral efficiency is then developed using the aforementioned closed-form rates. Finally, we propose a resource allocation scheme in which the pilot power, data power, and training duration are optimally chosen in order to maximize the spectral efficiency in a given total power budget. Extensive simulations are conducted in MATLAB and the results are presented that illustrate the notable improvement in the achievable spectral efficiency through the proposed power allocation scheme. Moreover, the results show that the performance of the proposed method is much superior when the number of channel directions or the number of antennas at BS increases. Furthermore, while the advantage of the proposed method is more notable in the case of ZF and LMMSE receivers, it still outperforms the equal power allocation method for the MRC receiver in terms of spectral efficiency.