Fog computing has proved its importance over legacy cloud architectures for computation, storage, and communication where edge devices are used to facilitate the delay-sensitive applications. The inception of fog nodes has brought computing intelligence close to the end-devices. Many fog computing frameworks have been proposed where edge devices are used for computation. In this paper, we proposed a simulation framework for fog devices that can use end devices to handle the peak computation load to provide better Quality of Services (QoS). The regional fog nodes are deployed at network edge locations which are used as an intelligent agent to handle the computation requests by either scheduling them on local servers, cloud data centers, or at the under-utilized end-user devices. The proposed device-to-device resource sharing model relies on Ant Colony Optimization (ACO) and Earliest Deadline First(EDF) Algorithm to provide a better quality of service using device available at multi-layer design. The concept of using IoT devices as fog nodes has improved the performance of legacy fog based systems. The proposed work is benchmarked in terms of system cost, efficiency, energy, and quality of service. Further, the proposed framework is with xFogSim in terms of task efficiency.