1 / 18

Development of Real Time Kernel Master of Technology In EMBEDDED SYSTEM

Development of Real Time Kernel Master of Technology In EMBEDDED SYSTEM. SCHOOL OF ELECTRONICS DEVI AHILYA VISWAVIDYALAYA INDORE. April 2010. Guided by - Dr. RajKamal Head of Dept. Soex. Presented by - Barakha Raghuwanshi M.Tech. E.S.IV Sem. Real Time Operating System.

adin
Download Presentation

Development of Real Time Kernel Master of Technology In EMBEDDED SYSTEM

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Development of Real Time KernelMaster of TechnologyInEMBEDDED SYSTEM SCHOOL OF ELECTRONICS DEVI AHILYA VISWAVIDYALAYA INDORE. April 2010 Guided by - Dr. RajKamal Head of Dept. Soex . Presented by - Barakha Raghuwanshi M.Tech. E.S.IV Sem

  2. Real Time Operating System • Real Time Operating Systems are used to control user programs and system resources in multitasking environment at real time systems. Kernel is the core program of operating system. Characteristics: RTOS kernel should be – • Multitasking, pre-emptible. • Task Priority, Prevent Starvation • Real Time Operation, Fast response time • Low Interrupt and Task switching latency. • Resource allocation • Other Operating systems function as Memory management,

  3. Characteristics of Proposed kernel • Multitasking, Priority based scheduler, Which also support Round Robin scheduling if priority of tasks are same. • Solve starvation problem. • Preemptive scheduler. • Support Real time operation • Provide Interrupt handlers with low latency • Low task switching latency. • Memory Management. • Inter Task communication.

  4. Task Management • Creation of Task • Scheduling of Task • Finishing of Task • Wait Task • Resume Task

  5. Os_Create_Task Macro Task_id, Priority Start Task_id, Priority Memory allocation for (TIB) Task_id, Priority, Context Register etc. Stop

  6. Task ManagementTask Information Block Each task when created have a 16 byte (TIB) task information block in scratchpad RAM. Byte Description 0 - 1 Task ID (Starting Location of Task) 2 Task priority (“0” highest/”0FFh” lowest) 3 Task status 00000000- Task can execute 0001nnnn-Send message to task‘ nnnn’ 00100000-Wait for a message 010000ii – Waiting for interrupt ii 11111111-No task loaded for TIB 4 Task stack pointer 5 to 10 Task context registers in the stack 11 to 15 For saving data and calling subroutine

  7. Memory Allocation: 128 byte RAM are allocated statically as : 70 to 7F 60 to 6F 50 to 5F 40 to 4F 30 to 3F 20 to 2F 00 to 1F

  8. Priority based Pre-emptive Scheduler Start Status of tasks from TIB After Each Second Scheduler is started again by RTC it also check starvation of task Check State if ready Yes Take Priorities and Task_id from TIB’s Sort priorities, Make list of Task_id accordingly No Call next Task Compare Sorted priority (rem. task) Wait task or End Task update State &/or Priority and switch Same Set Context switch flag set Start first task Task are called in time slice mode (context switching) Check Flag by RTC

  9. Context Switching Start Cont. SW flag, Cur_task Set SP, Save Cont reg. Check flag, set next task. End

  10. End Task Start State = Finish Priority = 0FF Switch to Scheduler End

  11. Real Time Clock & Environment • Timer Real Time Clock • After 5 mille Sec. Context Switching • After each Second Scheduler is restarted

  12. Real Time Clock & Environment Start Tick, Sec., Min., Hour, Flag, TimerInterrupt Set & start Pop Context Reg Set & start Timer Interrupt Call Context Switch No Main Prg. Watch Timer Flag If set Yes Push Context Reg., INC Tick No No If Tick ==200 If Context Switching Require Yes Exit RTC INC Sec ,Tick=0, Save context Start Scheduler, check starvat. Yes No If Sec ==60 No Yes Yes INC Hour INC Min, Sec=0 If Min ==60

  13. Starvation Solution Start Current time – start time =>10 Sec Call Wait task End

  14. Wait Task Start Delay_Time in hh,mm,ss State = Wait, Resu_Time = Curr_Time + delay_Time, Switch to Scheduler End

  15. Resume Task Start If Cur_time=>Resu_Time State = ready End

  16. Inter Task Communication • Inter task communication is performed through Messages. • Message pointer are sent to mailbox. • Task read message from mailbox and make null to mailbox. • Os_Create_Mbox, Os_Send_Msg, and Os_Read_msg macro are used for this purpose.

  17. Interrupt Handler Start at ISR PushContext Reg. acall os_int_X Pop Context Reg. Reti

  18. THANK YOU

More Related