Grid is collection of heterogeneous resources which are highly dynamic and unpredictable in nature. Various resource allocation techniques are used for effective use of resources. Tasks are submitted with constraints (cost, deadline, etc.) to improve the performance of distributed environment. Based on resource availability, several tasks select the same resource to achieve minimum execution cost. Therefore, an effective scheduling is required to execute tasks on the same resource to reduce average waiting time of tasks. In this paper, an extensive survey of resource allocation techniques is done based on several parameters. A resource allocation and task scheduling mechanism is proposed to optimize cost and average waiting time of heterogeneous tasks. The uniqueness of the proposed model is that it makes task execution schedule and sends calculated data to resource manager before actual task execution for reducing average waiting time of tasks. Further, we validate the effectiveness of the proposed model using GridSim by considering random values of task and resources. Experimental results show that the proposed model provides up to 37% reduction in average waiting time than existing approaches under various environment conditions.