With the advanced communication technology, the number of users and applications are increasing exponentially leading towards the scarcity of resources and an increase in power consumptions. The data traffic on the base station also rises with the number of users. For the reduction in the outage probability of the cellular users in 5G, device to device (D2D) communication considered as a prominent solution. D2D communication can occur as an underlay or overlay mode reusing the cellular licensed band. In this paper existing work on resource allocation for in-band underlay D2D communication mode is analyzed taking different scenarios for sharing of common resources among cellular and D2D users. Various methods for resource allocation for D2D communication are discussed extensively, including auction algorithm, game theory approach, graph theory, greedy water filling, fractional frequency reuse (FFR) and iterative method. The second important aspect of communication is power conservation, D2D communication does data offloading and battery life conservation. Along with the battery life conservation, power control techniques discussed at length. A summary of methods used in the existing research like energy harvesting with simultaneous wireless information and power transfer (SWIPT), the sleep mode of the base station (BS) is presented. Further, in the view of D2D this paper presents insight of green communication. The characteristic of D2D communication being to reuse resources attracts researchers, academia, and industries to work on security aspects. From a security perspective of D2D communication existing work on physical layer security, intrusion detection system and beamforming are discussed.