This paper presents a novel framework for Collaborative Learning Networks (CLNs) in classrooms, aiming to optimize resource utilization and enhance educational services. The study addresses the inefficiencies of traditional education models, particularly the underutilization of computational resources and limited access to specialized software. The proposed framework employs a mix of task-based and random allocation strategies to distribute computational tasks within the CLN, considering each device’s capabilities and task requirements. The findings show significant improvement in resource utilization, facilitated by device-to-device collaboration and task sharing, thus enriching students’ learning experiences. This work contributes to optimizing resource utilization in education, advancing the field of CLNs.