objectives objectives
play

Objectives Objectives 28th February 28th February 4th March - PDF document

First S.Ha.R.K. Workshop First S.Ha.R.K. Workshop Pontedera Pontedera Objectives Objectives 28th February 28th February 4th March 2005 4th March 2005 Drivers realization Drivers realization S.Ha.R.K. S.Ha.R.K.


  1. First S.Ha.R.K. Workshop First S.Ha.R.K. Workshop Pontedera Pontedera Objectives Objectives 28th February – 28th February – 4th March 2005 4th March 2005 � Drivers realization � Drivers realization S.Ha.R.K. S.Ha.R.K. – – Drivers & Interrupts Drivers & Interrupts � Different approaches � Different approaches � S.Ha.R.K. evolution � S.Ha.R.K. evolution � Present implementation in S.Ha.R.K. � Present implementation in S.Ha.R.K. Mauro Marinoni [ Mauro Marinoni [ mauro.marinoni@unipv.it mauro.marinoni@unipv.it ] ] � Interrupt Server � Interrupt Server � Linux Compatibility Layer � Linux Compatibility Layer Robotic Lab Robotic Lab � Available drivers � Available drivers University of Pavia (Italy) University of Pavia (Italy) � � Work in progress Work in progress � Future Work � Future Work Pontedera, 3th March 2005 Pontedera, 3th March 2005 2 2 / 55 / 55 Drivers Implementation Drivers Implementation Comparison Terms Comparison Terms � The approach must be selected according to: � Different approaches to a new driver layer � � The approach must be selected according to: Different approaches to a new driver layer � � Requirements: Requirements: implementation: implementation: � Predictability; � Predictability; � � Write it from scratch ; Write it from scratch ; � � Reliability; Reliability; � � Reuse low level calls code and rewrite the � Stability; Reuse low level calls code and rewrite the � Stability; � � Maintainability. rest; rest; Maintainability. � � Team characteristics: Team characteristics: � Reuse as much code as possible; � Reuse as much code as possible; � � Dimension; Dimension; � Most of the recyclable code came from NOT � Most of the recyclable code came from NOT � � Knowledge; Knowledge; Real- Real -Time Operating Systems. Time Operating Systems. � Time. � Time. Pontedera, 3th March 2005 Pontedera, 3th March 2005 3 / 55 3 / 55 Pontedera, 3th March 2005 Pontedera, 3th March 2005 4 / 55 4 / 55 Advantages & Drawbacks Advantages & Drawbacks Advantages & Advantages & Drawbacks Drawbacks � The code is not developed focusing on � The code is not developed focusing on � Importing pre � Importing pre- -existent code: existent code: real- real -time issues then predictability is time issues then predictability is � Increase Reliability and Stability; � Increase Reliability and Stability; penalized. penalized. � � Require � The imported code usually present a lot a � The imported code usually present a lot a Require less less technical technical knowledge knowledge and and features unusable on the new OS. This features unusable on the new OS. This production time; production time; increase the execution time and the total increase the execution time and the total � Decrease the amount of code that must be � Decrease the amount of code that must be code dimension. code dimension. implemented. implemented. “ “ The only piece that can The only piece that can’ ’t break off is the one you don t break off is the one you don’ ’t mount t mount ” ” Spitfire engineer Spitfire engineer Pontedera, 3th March 2005 Pontedera, 3th March 2005 5 / 55 5 / 55 Pontedera, 3th March 2005 Pontedera, 3th March 2005 6 / 55 6 / 55 1

  2. S.Ha.R.K. Drivers Evolution S.Ha.R.K. Drivers Evolution S.Ha.R.K. Drivers Evolution S.Ha.R.K. Drivers Evolution ��� ��� ��� ��� ���� ���� ���� ���� ���� ���� ���� ���� ��� ��� ��� ��� ��� ��� ���� ���� ���� ���� ���� ���� ���� ���� ��� ��� ��� ��� ��� ��� � Drivers � Drivers inherited from � Drivers written from � Drivers inherited from written from scratch; scratch; Linux; Linux; � Most of the S.Ha.R.K. drivers system has been � Most of the S.Ha.R.K. drivers system has been � Almost full Real � � � Drivers rich of features; Almost full Real- -Time Time Drivers rich of features; rewritten in the transition between versions 1.22 rewritten in the transition between versions 1.22 implementation; implementation; � � Small amount of code Small amount of code and 1.4. and 1.4. � Small drivers either in � Small drivers either in needs to be rewritten; needs to be rewritten; � The point of view changed from an almost term of dimension or term of dimension or � � Higher � Higher number of The point of view changed from an almost number of execution time; execution time; peripherals supported. peripherals supported. homemade implementation to an integration of homemade implementation to an integration of � Few � Few supported supported drivers inherited from an external O.S. drivers inherited from an external O.S. peripherals. peripherals. Pontedera, 3th March 2005 Pontedera, 3th March 2005 7 / 55 7 / 55 Pontedera, 3th March 2005 Pontedera, 3th March 2005 8 / 55 8 / 55 Modular Structure Modular Structure Good Things… Good Things … � The interesting part of the new approach is that porting a � The interesting part of the new approach is that porting a � A modular approach was implemented to � A modular approach was implemented to new driver is quicker and require a smaller amount of new driver is quicker and require a smaller amount of maintain backward compatibility and to allow full maintain backward compatibility and to allow full time and code. time and code. homemade drivers. homemade drivers. � I.E. Porting the whole input layer (keyboard, mouse, � I.E. Porting the whole input layer (keyboard, mouse, joystick and PC speaker) joystick and PC speaker) � � Requires one person for less than a week; Requires one person for less than a week; � � Code dimension grows from ? to 450Kb but only 70Kb need to be Code dimension grows from ? to 450Kb but only 70Kb need to be written. written. Pontedera, 3th March 2005 Pontedera, 3th March 2005 9 / 55 9 / 55 Pontedera, 3th March 2005 Pontedera, 3th March 2005 10 10 / 55 / 55 … … and Dark Shadows and Dark Shadows The Interrupts Server The Interrupts Server � Linux ISRs are developed to work with � Linux ISRs are developed to work with � Is composed basically of 4 elements: � Is composed basically of 4 elements: disabled interrupts. disabled interrupts. � � A scheduling algorithm thought to manage A scheduling algorithm thought to manage � Even if we can estimate a WCET for every � Even if we can estimate a WCET for every only one non- only one non -preemptable task; preemptable task; ISR, it is not possible to guarantee how ISR, it is not possible to guarantee how � � A not A not- -preemptable task in charge of executing preemptable task in charge of executing much utilization is stolen by ISR execution much utilization is stolen by ISR execution handlers. handlers. time during interrupt burst. time during interrupt burst. � A FIFO queue of interrupts waiting to be � A FIFO queue of interrupts waiting to be processed; processed; “ “One One layer layer to rule them all, one to rule them all, one layer layer to find them all, one to find them all, one � � A list of couples (interrupt number, handler A list of couples (interrupt number, handler layer to bring them all and in an layer to bring them all and in an utilization estimation utilization estimation bind bind function); function); them all.” them all. ” Pontedera, 3th March 2005 Pontedera, 3th March 2005 11 / 55 11 / 55 Pontedera, 3th March 2005 Pontedera, 3th March 2005 12 / 55 12 / 55 2

Recommend


More recommend