Task Offloading and Resource Allocation Using Deep Reinforcement Learning