Last week, I am still doing on contiki’s functions testing in my new porting microprocessor and platform. After 1 week plus of function testing, the basic functions are working in my porting microprocessor and platform. The process in contiki OS called protothread. All of those protothread are scheduled in cooperative manner. The current cooperative process need to be finish first before the following scheduled cooperative process can be run. Other than that, contiki os also support preemptive process. It is normally used to handle interrupts events. Because preemptive process will block cooperative process, after preemptive process completely executed only resume back the previous cooperative process. By testing the function, I found that, PROCESS_YIELD, PROCESS_WAIT_EVENT and PROCESS_WAIT_UNTIL functions able to block the protothread being execute and run the following protothread. All of the blocked protothread are looking for an event to be posted only can resume back and execute the unfinished codes. In addition, contiki os also supported on semaphore event, there are three functions PT_SEM_INIT, PT_SEM_WAIT and PT_SEM_SIGNAL. Those protothread will wait for a signal only can run the code.
For next week, I will using FreeRTOS to port a new processor and platform and learning the RTOS concept and building method. FreeRTOS also an OS can run in multiple process. The scheduler of FreeRTOS is a kernel to decide the status of task. Same as contiki, there are also functions in FreeRTOS os to control the tasks to wait or execute.
Next week, I will using the same way to do in contiki for FreeRTOS to learn on this OS.
0 Comments