In this paper, we describe the design and working of the data handling system of a Nanosatellite that houses three interconnected microcontrollers, each present on a different PCB. Each microcontroller handles and performs a set of tasks to ensure the smooth and proper functioning of the satellite. A brief description of the evolution of the system organization and the motivation behind the choice of the microcontrollers has been provided. An in-depth explanation of the tasks and their distribution among the three microcontrollers follows. The scheduling of jobs on two of the microcontrollers is brought about through the use of a Real-Time Operating System (RTOS), Micrium OS-III, which allows the system to be sensitive to the priorities and time constraints of each task. An in-depth qualitative analysis of the application of the RTOS has been presented along with a vigorous quantitative analysis through the use of Segger System View and the Sampled Graph feature in IAR. In contrast to this OS-based implementation, the third microcontroller is run and controlled purely through interrupts from the other two processors. The paper explains the use of a partial OS based and partial interrupt based task switching model and lists out the advantages and limitations of the same. The paper also describes the various stages involved in the onboard processing of images obtained from the thermal camera, which includes image compression and data encoding algorithms before transmitting that help in reducing data loss during transmission and allow error detection and correction upon reception of the payload data.