SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
Part	
  2	
  :	
  Code	
  Reading	
  
of	
  

F9	
  Microkernel	
  

Scheduling	
  
ben6	
  
2013-­‐11-­‐18	
  
F9	
  

Agenda	
  

•  Brief	
  of	
  F9	
  Microkernel	
  Scheduling	
  
•  All	
  about	
  Algorithms	
  
•  Scheduling	
  Code	
  reading	
  
F9	
  

Agenda	
  

•  Brief	
  of	
  F9	
  Microkernel	
  Scheduling	
  
•  All	
  about	
  Algorithms	
  
•  Scheduling	
  Code	
  reading	
  
F9	
  Microkernel	
  Overview	
  
•  an	
  experimental	
  microkernel	
  used	
  to	
  construct	
  
flexible	
  embedded	
  systems	
  inspired	
  by	
  famous	
  L4	
  
microkernel.	
  	
  
•  The	
  moMvaMon	
  of	
  F9	
  microkernel	
  is	
  to	
  deploy	
  
modern	
  kernel	
  techniques	
  to	
  support	
  	
  
–  running	
  real-­‐Mme	
  and	
  Mme-­‐sharing	
  applicaMons	
  (ex:	
  	
  
wireless	
  communicaMons)	
  for	
  ARM	
  Cortex-­‐M	
  series	
  
microprocessors	
  with	
  efficiency	
  (performance	
  +	
  
power	
  consumpMon)	
  	
  
–  security	
  (memory	
  protecMon	
  +	
  isolated	
  execuMon)	
  
CharacterisMcs	
  
•  Energy	
  efficient	
  scheduling	
  
•  Tickless	
  Mmer	
  
Mckless	
  scheduler	
  
•  F9	
  implements	
  a	
  Mckless	
  scheduler	
  which	
  implies	
  
the	
  dynamic	
  Mmer.	
  
•  You	
  can	
  track	
  the	
  development	
  here:	
  
	
  
hWps://github.com/southernbear/RIOT/wiki/
Development	
  
•  F9	
  follows	
  some	
  concepts	
  about	
  TiROS	
  for	
  
Mckless:	
  
	
  	
  	
  	
  hWp://Mros.sourceforge.net/
F9	
  

Agenda	
  

•  Brief	
  of	
  F9	
  Microkernel	
  Scheduling	
  
•  All	
  about	
  Algorithms	
  
•  Scheduling	
  Code	
  reading	
  
Tickless	
  Scheduling
•  Reference	
  concept	
  of	
  TiROS	
  
•  TiROS	
  avoids	
  most	
  context-­‐switching	
  
overhead	
  costs	
  by	
  eliminaMng	
  periodic	
  Mcks.	
  
•  Most	
  embedded	
  real-­‐Mme	
  OSes,	
  a	
  trade	
  off	
  
between	
  high	
  Mme-­‐resoluMon	
  (by	
  increasing	
  
Mck	
  frequency)	
  and	
  overhead.	
  
•  TiROS	
  does	
  not	
  use	
  Mcks	
  and	
  achieves	
  high-­‐
Mme	
  resoluMon	
  with	
  very	
  low	
  overhead.
F9	
  

Agenda	
  

•  Brief	
  of	
  F9	
  Microkernel	
  Scheduling	
  
•  All	
  about	
  Algorithms	
  
•  Scheduling	
  Code	
  reading	
  
Scheduling	
  related	
  code	
  
• 
• 
• 
• 
• 
• 
• 

ipc.c	
  
kMmer.c	
  
sched.c	
  	
  	
  	
  	
  (most	
  important)	
  
so]irq.c	
  
syscall.c	
  
systhread.c	
  
thread.c	
  
KMmer_handler	
  

Timer	
  handler	
  in	
  ISR	
  
vector	
  table	
  
kMmer_handler	
  
Hardware	
  interrupt	
  
trigger	
  ktmer_handler	
  
Plaborm/irq.h:	
  schedule_in_irq	
  

Trigger	
  point	
  of	
  
scheduling	
  which	
  while	
  
IRQ	
  event	
  occurs	
  

include/plaborm/irq.h	
  
IRQ_HANDLER	
  

include/plaborm/irq.h	
  
context_switch	
  

include/plaborm/irq.h	
  
Scheduler	
  slots
•  sched.h

sched.h	
  

	
  26	
  typedef	
  struct	
  sched_slot	
  {	
  
	
  27	
  	
  	
  	
  	
  tcb_t	
  *ss_scheduled;	
  
	
  28	
  	
  	
  	
  	
  sched_handler_t	
  ss_handler;	
  
	
  29	
  }	
  sched_slot_t;	
  
sched_slot_t	
  

ss_scheduled	
  
ss_handler

Priority	
  in	
  order	
  
Schedule	
  handler	
  

typedef	
  tcb_t	
  *(*sched_handler_t)(struct	
  sched_slot	
  *slot);	
  
Select	
  target	
  thread	
  

ss_handler	
  is	
  used	
  
while	
  currnt	
  slot	
  
thread	
  is	
  empty	
  or	
  
not	
  runnable	
  
thread_state_t	
  

Only	
  scheduling	
  for	
  T_RUNNABLE	
  State	
  
Thread	
  control	
  block	
  

TCB	
  using	
  by	
  schedule	
  slots	
  
__NAKED	
  
•  __aWribute__((naked))	
  

Using	
  While	
  IRQ	
  funcMon	
  

Use	
  this	
  aWribute	
  on	
  the	
  ARM,	
  AVR,	
  MCORE,	
  MSP430,	
  NDS32,	
  RL78,	
  RX	
  and	
  SPU	
  
ports	
  to	
  indicate	
  that	
  the	
  specified	
  funcMon	
  does	
  not	
  need	
  prologue/epilogue	
  
sequences	
  generated	
  by	
  the	
  compiler.	
  	
  
	
  
It	
  is	
  up	
  to	
  the	
  programmer	
  to	
  provide	
  these	
  sequences.	
  	
  
	
  
The	
  only	
  statements	
  that	
  can	
  be	
  safely	
  included	
  in	
  naked	
  funcMons	
  are	
  asm	
  
statements	
  that	
  do	
  not	
  have	
  operands.	
  	
  
	
  
All	
  other	
  statements,	
  including	
  declaraMons	
  of	
  local	
  variables,	
  if	
  statements,	
  and	
  so	
  
forth,	
  should	
  be	
  avoided.	
  Naked	
  funcMons	
  should	
  be	
  used	
  to	
  implement	
  the	
  body	
  of	
  
an	
  assembly	
  funcMon,	
  while	
  allowing	
  the	
  compiler	
  to	
  construct	
  the	
  requisite	
  
funcMon	
  declaraMon	
  for	
  the	
  assembler.	
  	
  
kMmer	
  event	
  scheduling	
  
schedule_slot_set_handler	
  
thread.c	
  
Conclusion	
  
•  F9	
  Microkernel	
  uses	
  following	
  concepts	
  
–  Tickless	
  Scheduling	
  
–  Dynamic	
  Timer	
  
To	
  archive	
  energy	
  efficiency	
  scheduling	
  
Discussions	
  

F9	
  

?	
  
Kernel	
  line	
  of	
  code	
  for	
  reading	
  

Kernel	
  C	
  code	
  line:	
  2183	
  
Git	
  head:	
  4d87f204252d57525f9cd93f163ca5225cc34bb7	
  
References	
  
•  F9	
  Microkernel	
  source	
  code	
  and	
  introducMon	
  
•  hWps://github.com/southernbear/RIOT/wiki/Development	
  
•  TiROS	
  for	
  Mckless	
  hWp://Mros.sourceforge.net/	
  
•  GCC	
  Naked	
  AWribute	
  

	
  

Contenu connexe

Tendances

AAME ARM Techcon2013 006v02 Implementation Diversity
AAME ARM Techcon2013 006v02 Implementation DiversityAAME ARM Techcon2013 006v02 Implementation Diversity
AAME ARM Techcon2013 006v02 Implementation DiversityAnh Dung NGUYEN
 
Linux Kernel Image
Linux Kernel ImageLinux Kernel Image
Linux Kernel Image艾鍗科技
 
Arm v8 instruction overview android 64 bit briefing
Arm v8 instruction overview android 64 bit briefingArm v8 instruction overview android 64 bit briefing
Arm v8 instruction overview android 64 bit briefingMerck Hung
 
2 introduction to arm architecture
2 introduction to arm architecture2 introduction to arm architecture
2 introduction to arm architecturesatish1jisatishji
 
AAME ARM Techcon2013 003v02 Software Development
AAME ARM Techcon2013 003v02  Software DevelopmentAAME ARM Techcon2013 003v02  Software Development
AAME ARM Techcon2013 003v02 Software DevelopmentAnh Dung NGUYEN
 
AAME ARM Techcon2013 005v02 System Startup
AAME ARM Techcon2013 005v02 System StartupAAME ARM Techcon2013 005v02 System Startup
AAME ARM Techcon2013 005v02 System StartupAnh Dung NGUYEN
 
ds894-zynq-ultrascale-plus-overview
ds894-zynq-ultrascale-plus-overviewds894-zynq-ultrascale-plus-overview
ds894-zynq-ultrascale-plus-overviewAngela Suen
 
An Overview Study on 32-bit MCU MB91460 Series and its Peripherals
An Overview Study on 32-bit MCU MB91460 Series and its PeripheralsAn Overview Study on 32-bit MCU MB91460 Series and its Peripherals
An Overview Study on 32-bit MCU MB91460 Series and its PeripheralsPremier Farnell
 
AAME ARM Techcon2013 004v02 Debug and Optimization
AAME ARM Techcon2013 004v02 Debug and OptimizationAAME ARM Techcon2013 004v02 Debug and Optimization
AAME ARM Techcon2013 004v02 Debug and OptimizationAnh Dung NGUYEN
 
ARM AAE - Memory Systems
ARM AAE - Memory SystemsARM AAE - Memory Systems
ARM AAE - Memory SystemsAnh Dung NGUYEN
 
Q4.11: ARM Technology Update Plenary
Q4.11: ARM Technology Update PlenaryQ4.11: ARM Technology Update Plenary
Q4.11: ARM Technology Update PlenaryLinaro
 
ARM AAE - Developing Code for ARM
ARM AAE - Developing Code for ARMARM AAE - Developing Code for ARM
ARM AAE - Developing Code for ARMAnh Dung NGUYEN
 
HKG18-110 - net_mdev: Fast path user space I/O
HKG18-110 - net_mdev: Fast path user space I/OHKG18-110 - net_mdev: Fast path user space I/O
HKG18-110 - net_mdev: Fast path user space I/OLinaro
 
BKK16-303 96Boards - TV Platform
BKK16-303 96Boards - TV PlatformBKK16-303 96Boards - TV Platform
BKK16-303 96Boards - TV PlatformLinaro
 
Scalable Matrix Multiplication for the 16 Core Epiphany Co-Processor
Scalable Matrix Multiplication for the 16 Core Epiphany Co-ProcessorScalable Matrix Multiplication for the 16 Core Epiphany Co-Processor
Scalable Matrix Multiplication for the 16 Core Epiphany Co-ProcessorLou Loizides
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013Wave Digitech
 
A-LOOP: AMP system: 2-cores ARM Cortex A9/Linux OS and 4-cores Leon3/Linux OS...
A-LOOP: AMP system: 2-cores ARM Cortex A9/Linux OS and 4-cores Leon3/Linux OS...A-LOOP: AMP system: 2-cores ARM Cortex A9/Linux OS and 4-cores Leon3/Linux OS...
A-LOOP: AMP system: 2-cores ARM Cortex A9/Linux OS and 4-cores Leon3/Linux OS...Vittoriano Muttillo
 
GCC for ARMv8 Aarch64
GCC for ARMv8 Aarch64GCC for ARMv8 Aarch64
GCC for ARMv8 Aarch64Yi-Hsiu Hsu
 

Tendances (20)

AAME ARM Techcon2013 006v02 Implementation Diversity
AAME ARM Techcon2013 006v02 Implementation DiversityAAME ARM Techcon2013 006v02 Implementation Diversity
AAME ARM Techcon2013 006v02 Implementation Diversity
 
ARM Architecture in Details
ARM Architecture in Details ARM Architecture in Details
ARM Architecture in Details
 
Linux Kernel Image
Linux Kernel ImageLinux Kernel Image
Linux Kernel Image
 
Arm v8 instruction overview android 64 bit briefing
Arm v8 instruction overview android 64 bit briefingArm v8 instruction overview android 64 bit briefing
Arm v8 instruction overview android 64 bit briefing
 
2 introduction to arm architecture
2 introduction to arm architecture2 introduction to arm architecture
2 introduction to arm architecture
 
AAME ARM Techcon2013 003v02 Software Development
AAME ARM Techcon2013 003v02  Software DevelopmentAAME ARM Techcon2013 003v02  Software Development
AAME ARM Techcon2013 003v02 Software Development
 
AAME ARM Techcon2013 005v02 System Startup
AAME ARM Techcon2013 005v02 System StartupAAME ARM Techcon2013 005v02 System Startup
AAME ARM Techcon2013 005v02 System Startup
 
ds894-zynq-ultrascale-plus-overview
ds894-zynq-ultrascale-plus-overviewds894-zynq-ultrascale-plus-overview
ds894-zynq-ultrascale-plus-overview
 
An Overview Study on 32-bit MCU MB91460 Series and its Peripherals
An Overview Study on 32-bit MCU MB91460 Series and its PeripheralsAn Overview Study on 32-bit MCU MB91460 Series and its Peripherals
An Overview Study on 32-bit MCU MB91460 Series and its Peripherals
 
AAME ARM Techcon2013 004v02 Debug and Optimization
AAME ARM Techcon2013 004v02 Debug and OptimizationAAME ARM Techcon2013 004v02 Debug and Optimization
AAME ARM Techcon2013 004v02 Debug and Optimization
 
ARM AAE - Memory Systems
ARM AAE - Memory SystemsARM AAE - Memory Systems
ARM AAE - Memory Systems
 
Q4.11: ARM Technology Update Plenary
Q4.11: ARM Technology Update PlenaryQ4.11: ARM Technology Update Plenary
Q4.11: ARM Technology Update Plenary
 
ARM AAE - Developing Code for ARM
ARM AAE - Developing Code for ARMARM AAE - Developing Code for ARM
ARM AAE - Developing Code for ARM
 
HKG18-110 - net_mdev: Fast path user space I/O
HKG18-110 - net_mdev: Fast path user space I/OHKG18-110 - net_mdev: Fast path user space I/O
HKG18-110 - net_mdev: Fast path user space I/O
 
ARM AAE - System Issues
ARM AAE - System IssuesARM AAE - System Issues
ARM AAE - System Issues
 
BKK16-303 96Boards - TV Platform
BKK16-303 96Boards - TV PlatformBKK16-303 96Boards - TV Platform
BKK16-303 96Boards - TV Platform
 
Scalable Matrix Multiplication for the 16 Core Epiphany Co-Processor
Scalable Matrix Multiplication for the 16 Core Epiphany Co-ProcessorScalable Matrix Multiplication for the 16 Core Epiphany Co-Processor
Scalable Matrix Multiplication for the 16 Core Epiphany Co-Processor
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
 
A-LOOP: AMP system: 2-cores ARM Cortex A9/Linux OS and 4-cores Leon3/Linux OS...
A-LOOP: AMP system: 2-cores ARM Cortex A9/Linux OS and 4-cores Leon3/Linux OS...A-LOOP: AMP system: 2-cores ARM Cortex A9/Linux OS and 4-cores Leon3/Linux OS...
A-LOOP: AMP system: 2-cores ARM Cortex A9/Linux OS and 4-cores Leon3/Linux OS...
 
GCC for ARMv8 Aarch64
GCC for ARMv8 Aarch64GCC for ARMv8 Aarch64
GCC for ARMv8 Aarch64
 

En vedette

While software engineer meets 3d printer
While software engineer meets 3d printerWhile software engineer meets 3d printer
While software engineer meets 3d printerBenux Wei
 
Tdd with python unittest for embedded c
Tdd with python unittest for embedded cTdd with python unittest for embedded c
Tdd with python unittest for embedded cBenux Wei
 
F9 microkernel app development part 2 gpio meets led
F9 microkernel app development part 2 gpio meets ledF9 microkernel app development part 2 gpio meets led
F9 microkernel app development part 2 gpio meets ledBenux Wei
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 

En vedette (8)

While software engineer meets 3d printer
While software engineer meets 3d printerWhile software engineer meets 3d printer
While software engineer meets 3d printer
 
C&cpu
C&cpuC&cpu
C&cpu
 
Tdd with python unittest for embedded c
Tdd with python unittest for embedded cTdd with python unittest for embedded c
Tdd with python unittest for embedded c
 
Sf 160 kjs manual
Sf 160 kjs manualSf 160 kjs manual
Sf 160 kjs manual
 
Audi a6 adr
Audi a6 adrAudi a6 adr
Audi a6 adr
 
F9 microkernel app development part 2 gpio meets led
F9 microkernel app development part 2 gpio meets ledF9 microkernel app development part 2 gpio meets led
F9 microkernel app development part 2 gpio meets led
 
Develop Your Own Operating System
Develop Your Own Operating SystemDevelop Your Own Operating System
Develop Your Own Operating System
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 

Similaire à F9 Microkernel code reading part 2 scheduling

Design of control unit.pptx
Design of control unit.pptxDesign of control unit.pptx
Design of control unit.pptxShubham014
 
conrol_Unit_part_of_computer_architecture.pptx
conrol_Unit_part_of_computer_architecture.pptxconrol_Unit_part_of_computer_architecture.pptx
conrol_Unit_part_of_computer_architecture.pptxjbri1395
 
Tank water level & monitoring solution based on the STM32L476 MCU
Tank water level & monitoring solution based on the STM32L476 MCUTank water level & monitoring solution based on the STM32L476 MCU
Tank water level & monitoring solution based on the STM32L476 MCUJulio César Carrasquel
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontrollersnehapvs
 
AVR_Course_Day4 introduction to microcontroller
AVR_Course_Day4 introduction to microcontrollerAVR_Course_Day4 introduction to microcontroller
AVR_Course_Day4 introduction to microcontrollerMohamed Ali
 
Introduction to arm processor
Introduction to arm processorIntroduction to arm processor
Introduction to arm processorRAMPRAKASHT1
 
1.Introduction to AVR.pdf
1.Introduction to AVR.pdf1.Introduction to AVR.pdf
1.Introduction to AVR.pdfMostafaKhaled78
 
Basics of micro controllers for biginners
Basics of  micro controllers for biginnersBasics of  micro controllers for biginners
Basics of micro controllers for biginnersGerwin Makanyanga
 
Oscar compiler for power reduction
Oscar compiler for power reduction Oscar compiler for power reduction
Oscar compiler for power reduction magoroku Yamamoto
 
Summer training embedded system and its scope
Summer training  embedded system and its scopeSummer training  embedded system and its scope
Summer training embedded system and its scopeArshit Rai
 
淺談 Live patching technology
淺談 Live patching technology淺談 Live patching technology
淺談 Live patching technologySZ Lin
 
HiPEAC Computing Systems Week 2022_Mario Porrmann presentation
HiPEAC Computing Systems Week 2022_Mario Porrmann presentationHiPEAC Computing Systems Week 2022_Mario Porrmann presentation
HiPEAC Computing Systems Week 2022_Mario Porrmann presentationVEDLIoT Project
 

Similaire à F9 Microkernel code reading part 2 scheduling (20)

Cache profiling on ARM Linux
Cache profiling on ARM LinuxCache profiling on ARM Linux
Cache profiling on ARM Linux
 
Design of control unit.pptx
Design of control unit.pptxDesign of control unit.pptx
Design of control unit.pptx
 
unit_1.pdf
unit_1.pdfunit_1.pdf
unit_1.pdf
 
UNIT 2.pptx
UNIT 2.pptxUNIT 2.pptx
UNIT 2.pptx
 
Microcontrollers
MicrocontrollersMicrocontrollers
Microcontrollers
 
conrol_Unit_part_of_computer_architecture.pptx
conrol_Unit_part_of_computer_architecture.pptxconrol_Unit_part_of_computer_architecture.pptx
conrol_Unit_part_of_computer_architecture.pptx
 
Tank water level & monitoring solution based on the STM32L476 MCU
Tank water level & monitoring solution based on the STM32L476 MCUTank water level & monitoring solution based on the STM32L476 MCU
Tank water level & monitoring solution based on the STM32L476 MCU
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 
Debate on RISC-CISC
Debate on RISC-CISCDebate on RISC-CISC
Debate on RISC-CISC
 
AVR_Course_Day4 introduction to microcontroller
AVR_Course_Day4 introduction to microcontrollerAVR_Course_Day4 introduction to microcontroller
AVR_Course_Day4 introduction to microcontroller
 
Introduction to arm processor
Introduction to arm processorIntroduction to arm processor
Introduction to arm processor
 
ankit
ankitankit
ankit
 
1.Introduction to AVR.pdf
1.Introduction to AVR.pdf1.Introduction to AVR.pdf
1.Introduction to AVR.pdf
 
Unit 3 CO.pptx
Unit 3 CO.pptxUnit 3 CO.pptx
Unit 3 CO.pptx
 
OpenPOWER Webinar
OpenPOWER Webinar OpenPOWER Webinar
OpenPOWER Webinar
 
Basics of micro controllers for biginners
Basics of  micro controllers for biginnersBasics of  micro controllers for biginners
Basics of micro controllers for biginners
 
Oscar compiler for power reduction
Oscar compiler for power reduction Oscar compiler for power reduction
Oscar compiler for power reduction
 
Summer training embedded system and its scope
Summer training  embedded system and its scopeSummer training  embedded system and its scope
Summer training embedded system and its scope
 
淺談 Live patching technology
淺談 Live patching technology淺談 Live patching technology
淺談 Live patching technology
 
HiPEAC Computing Systems Week 2022_Mario Porrmann presentation
HiPEAC Computing Systems Week 2022_Mario Porrmann presentationHiPEAC Computing Systems Week 2022_Mario Porrmann presentation
HiPEAC Computing Systems Week 2022_Mario Porrmann presentation
 

Dernier

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 

Dernier (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 

F9 Microkernel code reading part 2 scheduling

  • 1. Part  2  :  Code  Reading   of   F9  Microkernel   Scheduling   ben6   2013-­‐11-­‐18  
  • 2. F9   Agenda   •  Brief  of  F9  Microkernel  Scheduling   •  All  about  Algorithms   •  Scheduling  Code  reading  
  • 3. F9   Agenda   •  Brief  of  F9  Microkernel  Scheduling   •  All  about  Algorithms   •  Scheduling  Code  reading  
  • 4. F9  Microkernel  Overview   •  an  experimental  microkernel  used  to  construct   flexible  embedded  systems  inspired  by  famous  L4   microkernel.     •  The  moMvaMon  of  F9  microkernel  is  to  deploy   modern  kernel  techniques  to  support     –  running  real-­‐Mme  and  Mme-­‐sharing  applicaMons  (ex:     wireless  communicaMons)  for  ARM  Cortex-­‐M  series   microprocessors  with  efficiency  (performance  +   power  consumpMon)     –  security  (memory  protecMon  +  isolated  execuMon)  
  • 5. CharacterisMcs   •  Energy  efficient  scheduling   •  Tickless  Mmer  
  • 6. Mckless  scheduler   •  F9  implements  a  Mckless  scheduler  which  implies   the  dynamic  Mmer.   •  You  can  track  the  development  here:     hWps://github.com/southernbear/RIOT/wiki/ Development   •  F9  follows  some  concepts  about  TiROS  for   Mckless:          hWp://Mros.sourceforge.net/
  • 7. F9   Agenda   •  Brief  of  F9  Microkernel  Scheduling   •  All  about  Algorithms   •  Scheduling  Code  reading  
  • 8. Tickless  Scheduling •  Reference  concept  of  TiROS   •  TiROS  avoids  most  context-­‐switching   overhead  costs  by  eliminaMng  periodic  Mcks.   •  Most  embedded  real-­‐Mme  OSes,  a  trade  off   between  high  Mme-­‐resoluMon  (by  increasing   Mck  frequency)  and  overhead.   •  TiROS  does  not  use  Mcks  and  achieves  high-­‐ Mme  resoluMon  with  very  low  overhead.
  • 9. F9   Agenda   •  Brief  of  F9  Microkernel  Scheduling   •  All  about  Algorithms   •  Scheduling  Code  reading  
  • 10. Scheduling  related  code   •  •  •  •  •  •  •  ipc.c   kMmer.c   sched.c          (most  important)   so]irq.c   syscall.c   systhread.c   thread.c  
  • 11. KMmer_handler   Timer  handler  in  ISR   vector  table  
  • 12. kMmer_handler   Hardware  interrupt   trigger  ktmer_handler  
  • 13. Plaborm/irq.h:  schedule_in_irq   Trigger  point  of   scheduling  which  while   IRQ  event  occurs   include/plaborm/irq.h  
  • 16. Scheduler  slots •  sched.h sched.h    26  typedef  struct  sched_slot  {    27          tcb_t  *ss_scheduled;    28          sched_handler_t  ss_handler;    29  }  sched_slot_t;   sched_slot_t   ss_scheduled   ss_handler Priority  in  order  
  • 17. Schedule  handler   typedef  tcb_t  *(*sched_handler_t)(struct  sched_slot  *slot);  
  • 18. Select  target  thread   ss_handler  is  used   while  currnt  slot   thread  is  empty  or   not  runnable  
  • 19. thread_state_t   Only  scheduling  for  T_RUNNABLE  State  
  • 20. Thread  control  block   TCB  using  by  schedule  slots  
  • 21. __NAKED   •  __aWribute__((naked))   Using  While  IRQ  funcMon   Use  this  aWribute  on  the  ARM,  AVR,  MCORE,  MSP430,  NDS32,  RL78,  RX  and  SPU   ports  to  indicate  that  the  specified  funcMon  does  not  need  prologue/epilogue   sequences  generated  by  the  compiler.       It  is  up  to  the  programmer  to  provide  these  sequences.       The  only  statements  that  can  be  safely  included  in  naked  funcMons  are  asm   statements  that  do  not  have  operands.       All  other  statements,  including  declaraMons  of  local  variables,  if  statements,  and  so   forth,  should  be  avoided.  Naked  funcMons  should  be  used  to  implement  the  body  of   an  assembly  funcMon,  while  allowing  the  compiler  to  construct  the  requisite   funcMon  declaraMon  for  the  assembler.    
  • 25. Conclusion   •  F9  Microkernel  uses  following  concepts   –  Tickless  Scheduling   –  Dynamic  Timer   To  archive  energy  efficiency  scheduling  
  • 27. Kernel  line  of  code  for  reading   Kernel  C  code  line:  2183   Git  head:  4d87f204252d57525f9cd93f163ca5225cc34bb7  
  • 28. References   •  F9  Microkernel  source  code  and  introducMon   •  hWps://github.com/southernbear/RIOT/wiki/Development   •  TiROS  for  Mckless  hWp://Mros.sourceforge.net/   •  GCC  Naked  AWribute