SlideShare uma empresa Scribd logo
1 de 56
Baixar para ler offline
Microkernel development: from project to implementation Rodrigo Maximiano Antunes de Almeida E-mail: rmaalmeida@gmail.com Twitter: @rmaalmeida Universidade Federal de Itajubá
Creative Commons License The work ” Microkernel development: from project to implementation ” of Rodrigo Maximiano Antunes de Almeida was licensed with  Creative Commons 3.0 – Attribution – Non Commercial – Share Alike license . Additional permission can be given by the author through direct contact using the e-mail: rmaalmeida@gmail.com
[object Object],[object Object]
//today topics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object]
kernel_project ( 1 );
kernel_project ( 1 ); ,[object Object],[object Object],[object Object],[object Object]
kernel_project ( 1 ); ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
kernel_project ( 1 ); ,[object Object],[object Object]
kernel_project ( 1 ); ,[object Object],[object Object],[object Object],[object Object]
kernel_project ( 1 ); ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object]
concepts ( 2 ); ,[object Object]
concepts ( 2 ); ,[object Object],[object Object],[object Object],[object Object],[object Object]
concepts ( 2 ); //defining the type pointerTest //it is a pointer to function that: //  receives no parameter //  returns no parameter typedef   void   (* pointerTest )(void); //Function to be called void  nop  (void){  __asm NOP __endasm  } //creating an pointerTest variable; pointerTest   foo ; foo   =   nop ; (* foo )();  //calling the function via pointer
concepts ( 2 ); temporal_conditions ( 2.2 );
concepts ( 2 ); In the majority part of embedded systems, we need to guarantee that a function will be executed in a certain frequency. Some systems may even fail if these deadlines are not met.
concepts ( 2 ); ,[object Object],[object Object],[object Object],[object Object]
concepts ( 2 ); ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
concepts ( 2 ); ,[object Object],[object Object],[object Object]
concepts ( 2 ); ,[object Object]
concepts ( 2 ); ,[object Object],[object Object]
concepts ( 2 ); ,[object Object],[object Object],[object Object],[object Object],[object Object]
concepts ( 2 ); void_pointers ( 2.3 );
concepts ( 2 ); ,[object Object],[object Object],[object Object],[object Object]
concepts ( 2 ); char   * name   =   "Paulo" ; double   weight   =   87.5 ; unsigned   int   children   =   3 ; void   main   (void){ //its not printf, yet. print ( 0 ,   & name ); print ( 1 ,   & weight ); print ( 2 ,   & children ); }
concepts ( 2 ); void  print (int  option ; void * parameter ){ switch( option ){ case  0 : printf ( "%s" ,(char*) parameter ); break; case  1 : printf ( "%f" ,*((double*) parameter )); break; case  2 : printf ( "%d" ,*((unsigned int*) parameter )); break; } }
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
microkernel ( 3 ); init_kernel ( 3.0 );
microkernel ( 3 ); ,[object Object],[object Object],[object Object]
microkernel ( 3 ); //CONFIG.H code char at   0x300000   CONFIG1L   =   0x01 ;   // No prescaler used code char at   0x300001   CONFIG1H   =   0x0C ;   // HS: High Speed Cristal code char at   0x300003   CONFIG2H   =   0x00 ;   // Disabled-Controlled by SWDTEN bit  code char at   0x300006   CONFIG4L   =   0x00 ;   // Disabled low voltage programming //INT.H void   InicializaInterrupt (void); //TIMER.H char   FimTimer (void); void   AguardaTimer (void); void   ResetaTimer (unsigned   int   tempo ); void   InicializaTimer (void); //BASICO.H (only part of it) #define   SUCCESS   0 #define   FAIL   1 #define   REPEAT   2 //bit functions #define   BitFlp ( arg , bit )   (( arg )   ^=   ( 1 << bit ))   //special register information #define   PORTD   (*(volatile __near   unsigned   char*) 0xF83 ) #define   TRISC   (*(volatile   __near   unsigned   char*) 0xF94 )
microkernel ( 3 ); //first implementation kernel_example ( 3 + 1 / 10 );
microkernel ( 3 ); ,[object Object],[object Object],[object Object],//pointer function declaration typedef   void(* ptrFunc )(void); //process pool static   ptrFunc   pool [ 4 ];
microkernel ( 3 ); ,[object Object],void   tst1 (void){ printf ( &quot;Process 1&quot; ); } void   tst2 (void){ printf ( &quot;Process 2&quot; ); } void   tst3 (void){ printf ( &quot;Process 3&quot; ); }
microkernel ( 3 ); ,[object Object],[object Object],[object Object],[object Object],//kernel internal variables ptrFunc   pool [ 4 ]; int   end ; //kernel function's prototypes void   kernelInit (void); void   kernelAddProc (ptrFunc   newFunc ); void   kernelLoop (void);
microkernel ( 3 ); //kernel function's implementation void  kernelInit (void){ end  =  0 ; } void  kernelAddProc (ptrFunc  newFunc ){ if ( end  < 4 ){ pool [ end ] =  newFunc ; end ++; } }
microkernel ( 3 ); //kernel function's implementatio n void  kernelLoop (void){ int  i ; for(;;){ //cycle through the processes for( i = 0 ;  i < end ;  i ++){ (* pool [ i ])(); } } }
microkernel ( 3 ); //main loop void  main (void){ kernelInit (); kernelAddProc ( tst1 ); kernelAddProc ( tst2 ); kernelAddProc ( tst3 ); kernelLoop (); }
microkernel ( 3 ); ,[object Object]
microkernel ( 3 ); //second implementation //circular buffer and struct added kernel_example ( 3 + 2 / 10 );
microkernel ( 3 ); ,[object Object],[object Object],[object Object],[object Object],[object Object]
microkernel ( 3 ); //return code #define   SUCCESS   0 #define   FAIL   1 #define   REPEAT   2 //function pointer declaration typedef   char(* ptrFunc )(void); //process struct typedef   struct   { ptrFunc   function ; }   process ; process  pool [ POOL_SIZE ];
microkernel ( 3 ); char  kernelInit (void){ start  =  0 ; end  =  0 ; return  SUCCESS ; } char   kernelAddProc (process   newProc ){ //checking for free space if   (   (( end + 1 )% POOL_SIZE )   !=   start ){ pool [ end ]   =   newProc ; end   =   ( end + 1 )% POOL_SIZE ; return   SUCCESS ; } return   FAIL ; }
microkernel ( 3 ); void   kernelLoop (void){ int   i = 0 ; for(;;){ //Do we have any process to execute? if   ( start   !=   end ){ printf ( &quot;Ite. %d, Slot. %d: &quot; ,   i ,   start ); //check if there is need to reschedule if   ((*( pool [ start ]. Func ))()   ==   REPEAT ){ kernelAddProc ( pool [ start ]); } //prepare to get the next process;   start   =   ( start + 1 )% POOL_SIZE ; i ++;   // only for debug; } } }
microkernel ( 3 ); //vector of structs process  pool [ POOL_SIZE ]; //  pool[i] //  pool[i].func //  *(pool[i].func) // (*(pool[i].func))() //vetor of pointers for struct process*  pool [ POOL_SIZE ]; //  pool[i] //  pool[i].func //  pool[i]->func //  pool[i]->func()
microkernel ( 3 ); void   kernelLoop (void){ int   i = 0 ; for(;;){ //Do we have any process to execute? if   ( start   !=   end ){ printf ( &quot;Ite. %d, Slot. %d: &quot; ,   i ,   start ); //check if there is need to reschedule if   ( pool [ start ]-> Func ()   ==   REPEAT ){ kernelAddProc ( pool [ start ]); } //prepare to get the next process;   start   =   ( start + 1 )% POOL_SIZE ; i ++;   // only for debug; } } }
microkernel ( 3 ); ,[object Object],void   tst1 (void){ printf ( &quot;Process 1&quot; ); return   REPEAT ; } void   tst2 (void){ printf ( &quot;Process 2&quot; ); return   SUCCESS ; } void   tst3 (void){ printf ( &quot;Process 3&quot; ); return   REPEAT ; }
microkernel ( 3 ); void   main (void){ //declaring the processes process   p1   =   { tst1 }; process   p2   =   { tst2 }; process   p3   =   { tst3 }; kernelInit (); //Test if the process was added successfully if   ( kernelAddProc ( p1 )   ==   SUCCESS ){ printf ( &quot;1st process added&quot; );} if   ( kernelAddProc ( p2 )   ==   SUCCESS ){ printf ( &quot;2nd process added&quot; );} if   ( kernelAddProc ( p3 )   ==   SUCCESS ){ printf ( &quot;3rd process added&quot; );} kernelLoop (); }
microkernel ( 3 ); ,[object Object],[object Object],[object Object],Console Output: --------------------------- 1st process added 2nd process added 3rd process added Ite. 0, Slot. 0: Process 1 Ite. 1, Slot. 1: Process 2 Ite. 2, Slot. 2: Process 3 Ite. 3, Slot. 3: Process 1 Ite. 4, Slot. 0: Process 3 Ite. 5, Slot. 1: Process 1 Ite. 6, Slot. 2: Process 3 Ite. 7, Slot. 3: Process 1 Ite. 8, Slot. 0: Process 3 ... ---------------------------
microkernel ( 3 ); ,[object Object],[object Object],[object Object]
microkernel ( 3 ); ,[object Object],//process struct typedef   struct   { ptrFunc   function ; int   period ; int   start ; }   process ;
microkernel ( 3 ); ,[object Object],void   isr (void)  interrupt   1 { unsigned   char   i ; i   =   ini ; while( i != fim ){ if(( pool [ i ]. start )>( MIN_INT )){ pool [ i ]. start --; } i   =   ( i + 1 )% SLOT_SIZE ; } }
microkernel ( 3 ); ,[object Object],char   AddProc (process   newProc ){ //checking for free space if   (   (( end + 1 )% SLOT_SIZE )   !=   start ){ pool [ end ]   =   newProc ; //increment start timer with period pool [ end ]. start   +=   newProc . period ; end   =   ( end + 1 )% SLOT_SIZE ; return   SUCCESS ; } return   FAIL ; }
microkernel ( 3 ); if   ( start   !=   end ){ //Finding the process with the smallest start j   =   ( start + 1 )% SLOT _ SIZE ; next   =   start ; while ( j != end ){ if   ( pool [ j ]. start   <   pool [ next ]. start ){ next   =   j ; } j   =   ( j + 1 )% SLOT_SIZE ; } //exchanging positions in the pool tempProc   =   pool [ next ]; pool [ next ]   =   pool [ start ]; pool [ start ]   =   tempProc ; while( pool [ start ]. start > 0 ){ } //great place to use low power mode if   (   (*( pool [ ini ]. function ))()   ==   REPEAT   ){ AddProc (&( vetProc [ ini ])); } ini   =   ( ini + 1 )% SLOT_SIZE ; }
//today topics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
“ Don't Reinvent The Wheel, Unless You Plan on Learning More About Wheels” Jeff Atwood Microkernel development: from project to implementation Rodrigo Maximiano Antunes de Almeida E-mail: rmaalmeida@gmail.com Twitter: @rmaalmeida Universidade Federal de Itajubá

Mais conteúdo relacionado

Mais procurados

LLVM Register Allocation
LLVM Register AllocationLLVM Register Allocation
LLVM Register AllocationWang Hsiangkai
 
Protocol handler in Gecko
Protocol handler in GeckoProtocol handler in Gecko
Protocol handler in GeckoChih-Hsuan Kuo
 
Operating Systems - Process Synchronization and Deadlocks
Operating Systems - Process Synchronization and DeadlocksOperating Systems - Process Synchronization and Deadlocks
Operating Systems - Process Synchronization and DeadlocksMukesh Chinta
 
Ownership System in Rust
Ownership System in RustOwnership System in Rust
Ownership System in RustChih-Hsuan Kuo
 
grsecurity and PaX
grsecurity and PaXgrsecurity and PaX
grsecurity and PaXKernel TLV
 
CSharp for Unity Day2
CSharp for Unity Day2CSharp for Unity Day2
CSharp for Unity Day2Duong Thanh
 
Contiki introduction I.
Contiki introduction I.Contiki introduction I.
Contiki introduction I.Dingxin Xu
 
Global Interpreter Lock: Episode I - Break the Seal
Global Interpreter Lock: Episode I - Break the SealGlobal Interpreter Lock: Episode I - Break the Seal
Global Interpreter Lock: Episode I - Break the SealTzung-Bi Shih
 
Java util concurrent
Java util concurrentJava util concurrent
Java util concurrentRoger Xia
 
Effective Modern C++ - Item 35 & 36
Effective Modern C++ - Item 35 & 36Effective Modern C++ - Item 35 & 36
Effective Modern C++ - Item 35 & 36Chih-Hsuan Kuo
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process Synchronizationvinay arora
 
Instruction Combine in LLVM
Instruction Combine in LLVMInstruction Combine in LLVM
Instruction Combine in LLVMWang Hsiangkai
 
Semaphores OS Basics
Semaphores OS BasicsSemaphores OS Basics
Semaphores OS BasicsShijin Raj P
 
The Ring programming language version 1.8 book - Part 88 of 202
The Ring programming language version 1.8 book - Part 88 of 202The Ring programming language version 1.8 book - Part 88 of 202
The Ring programming language version 1.8 book - Part 88 of 202Mahmoud Samir Fayed
 
Concurrency Concepts in Java
Concurrency Concepts in JavaConcurrency Concepts in Java
Concurrency Concepts in JavaDoug Hawkins
 
Exploiting the Linux Kernel via Intel's SYSRET Implementation
Exploiting the Linux Kernel via Intel's SYSRET ImplementationExploiting the Linux Kernel via Intel's SYSRET Implementation
Exploiting the Linux Kernel via Intel's SYSRET Implementationnkslides
 

Mais procurados (20)

LLVM Register Allocation
LLVM Register AllocationLLVM Register Allocation
LLVM Register Allocation
 
OSCh7
OSCh7OSCh7
OSCh7
 
Protocol handler in Gecko
Protocol handler in GeckoProtocol handler in Gecko
Protocol handler in Gecko
 
Machine Trace Metrics
Machine Trace MetricsMachine Trace Metrics
Machine Trace Metrics
 
6 Synchronisation
6 Synchronisation6 Synchronisation
6 Synchronisation
 
Operating Systems - Process Synchronization and Deadlocks
Operating Systems - Process Synchronization and DeadlocksOperating Systems - Process Synchronization and Deadlocks
Operating Systems - Process Synchronization and Deadlocks
 
Ownership System in Rust
Ownership System in RustOwnership System in Rust
Ownership System in Rust
 
grsecurity and PaX
grsecurity and PaXgrsecurity and PaX
grsecurity and PaX
 
CSharp for Unity Day2
CSharp for Unity Day2CSharp for Unity Day2
CSharp for Unity Day2
 
Contiki introduction I.
Contiki introduction I.Contiki introduction I.
Contiki introduction I.
 
Global Interpreter Lock: Episode I - Break the Seal
Global Interpreter Lock: Episode I - Break the SealGlobal Interpreter Lock: Episode I - Break the Seal
Global Interpreter Lock: Episode I - Break the Seal
 
Java util concurrent
Java util concurrentJava util concurrent
Java util concurrent
 
Effective Modern C++ - Item 35 & 36
Effective Modern C++ - Item 35 & 36Effective Modern C++ - Item 35 & 36
Effective Modern C++ - Item 35 & 36
 
Monitors
MonitorsMonitors
Monitors
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process Synchronization
 
Instruction Combine in LLVM
Instruction Combine in LLVMInstruction Combine in LLVM
Instruction Combine in LLVM
 
Semaphores OS Basics
Semaphores OS BasicsSemaphores OS Basics
Semaphores OS Basics
 
The Ring programming language version 1.8 book - Part 88 of 202
The Ring programming language version 1.8 book - Part 88 of 202The Ring programming language version 1.8 book - Part 88 of 202
The Ring programming language version 1.8 book - Part 88 of 202
 
Concurrency Concepts in Java
Concurrency Concepts in JavaConcurrency Concepts in Java
Concurrency Concepts in Java
 
Exploiting the Linux Kernel via Intel's SYSRET Implementation
Exploiting the Linux Kernel via Intel's SYSRET ImplementationExploiting the Linux Kernel via Intel's SYSRET Implementation
Exploiting the Linux Kernel via Intel's SYSRET Implementation
 

Semelhante a Microkernel Development

Contiki introduction II-from what to how
Contiki introduction II-from what to howContiki introduction II-from what to how
Contiki introduction II-from what to howDingxin Xu
 
Implementing of classical synchronization problem by using semaphores
Implementing of classical synchronization problem by using semaphoresImplementing of classical synchronization problem by using semaphores
Implementing of classical synchronization problem by using semaphoresGowtham Reddy
 
GPU Programming on CPU - Using C++AMP
GPU Programming on CPU - Using C++AMPGPU Programming on CPU - Using C++AMP
GPU Programming on CPU - Using C++AMPMiller Lee
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoinknight1128
 
finalprojtemplatev5finalprojtemplate.gitignore# Ignore the b
finalprojtemplatev5finalprojtemplate.gitignore# Ignore the bfinalprojtemplatev5finalprojtemplate.gitignore# Ignore the b
finalprojtemplatev5finalprojtemplate.gitignore# Ignore the bChereCheek752
 
Linux kernel debugging
Linux kernel debuggingLinux kernel debugging
Linux kernel debuggingJungMinSEO5
 
Linux Timer device driver
Linux Timer device driverLinux Timer device driver
Linux Timer device driver艾鍗科技
 
week3_srcDoWhileLoopFactorial.javaweek3_srcDoWhileLoopFactoria.docx
week3_srcDoWhileLoopFactorial.javaweek3_srcDoWhileLoopFactoria.docxweek3_srcDoWhileLoopFactorial.javaweek3_srcDoWhileLoopFactoria.docx
week3_srcDoWhileLoopFactorial.javaweek3_srcDoWhileLoopFactoria.docxalanfhall8953
 
Other Approaches (Concurrency)
Other Approaches (Concurrency)Other Approaches (Concurrency)
Other Approaches (Concurrency)Sri Prasanna
 
Embedded JavaScript
Embedded JavaScriptEmbedded JavaScript
Embedded JavaScriptJens Siebert
 
Parallel Programming With Dot Net
Parallel Programming With Dot NetParallel Programming With Dot Net
Parallel Programming With Dot NetNeeraj Kaushik
 
PQTimer.java A simple driver program to run timing t.docx
  PQTimer.java     A simple driver program to run timing t.docx  PQTimer.java     A simple driver program to run timing t.docx
PQTimer.java A simple driver program to run timing t.docxjoyjonna282
 
ISCA Final Presentaiton - Compilations
ISCA Final Presentaiton -  CompilationsISCA Final Presentaiton -  Compilations
ISCA Final Presentaiton - CompilationsHSA Foundation
 
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementationRajan Kumar
 
Unit 4
Unit 4Unit 4
Unit 4siddr
 
#include -stdio-h- #define NULL 0 #define NEW_JOB 1 #define UP.docx
#include -stdio-h- #define NULL 0  #define NEW_JOB        1 #define UP.docx#include -stdio-h- #define NULL 0  #define NEW_JOB        1 #define UP.docx
#include -stdio-h- #define NULL 0 #define NEW_JOB 1 #define UP.docxJakeAB0Hodgest
 
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...corehard_by
 

Semelhante a Microkernel Development (20)

Contiki introduction II-from what to how
Contiki introduction II-from what to howContiki introduction II-from what to how
Contiki introduction II-from what to how
 
Implementing of classical synchronization problem by using semaphores
Implementing of classical synchronization problem by using semaphoresImplementing of classical synchronization problem by using semaphores
Implementing of classical synchronization problem by using semaphores
 
GPU Programming on CPU - Using C++AMP
GPU Programming on CPU - Using C++AMPGPU Programming on CPU - Using C++AMP
GPU Programming on CPU - Using C++AMP
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoin
 
finalprojtemplatev5finalprojtemplate.gitignore# Ignore the b
finalprojtemplatev5finalprojtemplate.gitignore# Ignore the bfinalprojtemplatev5finalprojtemplate.gitignore# Ignore the b
finalprojtemplatev5finalprojtemplate.gitignore# Ignore the b
 
Linux kernel debugging
Linux kernel debuggingLinux kernel debugging
Linux kernel debugging
 
Linux Timer device driver
Linux Timer device driverLinux Timer device driver
Linux Timer device driver
 
week3_srcDoWhileLoopFactorial.javaweek3_srcDoWhileLoopFactoria.docx
week3_srcDoWhileLoopFactorial.javaweek3_srcDoWhileLoopFactoria.docxweek3_srcDoWhileLoopFactorial.javaweek3_srcDoWhileLoopFactoria.docx
week3_srcDoWhileLoopFactorial.javaweek3_srcDoWhileLoopFactoria.docx
 
Other Approaches (Concurrency)
Other Approaches (Concurrency)Other Approaches (Concurrency)
Other Approaches (Concurrency)
 
Embedded JavaScript
Embedded JavaScriptEmbedded JavaScript
Embedded JavaScript
 
Sycl 1.2 Reference Card
Sycl 1.2 Reference CardSycl 1.2 Reference Card
Sycl 1.2 Reference Card
 
Lec05 buffers basic_examples
Lec05 buffers basic_examplesLec05 buffers basic_examples
Lec05 buffers basic_examples
 
Parallel Programming With Dot Net
Parallel Programming With Dot NetParallel Programming With Dot Net
Parallel Programming With Dot Net
 
PQTimer.java A simple driver program to run timing t.docx
  PQTimer.java     A simple driver program to run timing t.docx  PQTimer.java     A simple driver program to run timing t.docx
PQTimer.java A simple driver program to run timing t.docx
 
ISCA Final Presentaiton - Compilations
ISCA Final Presentaiton -  CompilationsISCA Final Presentaiton -  Compilations
ISCA Final Presentaiton - Compilations
 
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementation
 
RxJava on Android
RxJava on AndroidRxJava on Android
RxJava on Android
 
Unit 4
Unit 4Unit 4
Unit 4
 
#include -stdio-h- #define NULL 0 #define NEW_JOB 1 #define UP.docx
#include -stdio-h- #define NULL 0  #define NEW_JOB        1 #define UP.docx#include -stdio-h- #define NULL 0  #define NEW_JOB        1 #define UP.docx
#include -stdio-h- #define NULL 0 #define NEW_JOB 1 #define UP.docx
 
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
 

Mais de Rodrigo Almeida

Embedded systems design @ defcon 2015
Embedded systems design @ defcon 2015Embedded systems design @ defcon 2015
Embedded systems design @ defcon 2015Rodrigo Almeida
 
Embedded systems development Defcon 19
Embedded systems development Defcon 19Embedded systems development Defcon 19
Embedded systems development Defcon 19Rodrigo Almeida
 
As diferentes engenharias
As diferentes engenhariasAs diferentes engenharias
As diferentes engenhariasRodrigo Almeida
 
Testing de software en instrumentos de pesar de funcionamiento no automatico ...
Testing de software en instrumentos de pesar de funcionamiento no automatico ...Testing de software en instrumentos de pesar de funcionamiento no automatico ...
Testing de software en instrumentos de pesar de funcionamiento no automatico ...Rodrigo Almeida
 
Seguridad de sistemas embebidos para el ámbito regulado - Alejandro Bertello ...
Seguridad de sistemas embebidos para el ámbito regulado - Alejandro Bertello ...Seguridad de sistemas embebidos para el ámbito regulado - Alejandro Bertello ...
Seguridad de sistemas embebidos para el ámbito regulado - Alejandro Bertello ...Rodrigo Almeida
 
Cryptology - Antônio Lacerda
Cryptology - Antônio LacerdaCryptology - Antônio Lacerda
Cryptology - Antônio LacerdaRodrigo Almeida
 
Troca de contexto segura em sistemas operacionais embarcados utilizando de té...
Troca de contexto segura em sistemas operacionais embarcados utilizando de té...Troca de contexto segura em sistemas operacionais embarcados utilizando de té...
Troca de contexto segura em sistemas operacionais embarcados utilizando de té...Rodrigo Almeida
 
Troca de contexto segura em sistemas operacionais embarcados utilizando técni...
Troca de contexto segura em sistemas operacionais embarcados utilizando técni...Troca de contexto segura em sistemas operacionais embarcados utilizando técni...
Troca de contexto segura em sistemas operacionais embarcados utilizando técni...Rodrigo Almeida
 
Troca de contexto segura em sistemas operacionais embarcados utilizando técni...
Troca de contexto segura em sistemas operacionais embarcados utilizando técni...Troca de contexto segura em sistemas operacionais embarcados utilizando técni...
Troca de contexto segura em sistemas operacionais embarcados utilizando técni...Rodrigo Almeida
 
Projeto de uma controladora de drivers
Projeto de uma controladora de driversProjeto de uma controladora de drivers
Projeto de uma controladora de driversRodrigo Almeida
 
Desenvolvimento de drivers para sistemas embarcados
Desenvolvimento de drivers para sistemas embarcadosDesenvolvimento de drivers para sistemas embarcados
Desenvolvimento de drivers para sistemas embarcadosRodrigo Almeida
 
Kernel com requisitos temporais
Kernel com requisitos temporaisKernel com requisitos temporais
Kernel com requisitos temporaisRodrigo Almeida
 
Definição de processos
Definição de processosDefinição de processos
Definição de processosRodrigo Almeida
 
Conceitos de ponteiros struct e buffers
Conceitos de ponteiros struct e buffersConceitos de ponteiros struct e buffers
Conceitos de ponteiros struct e buffersRodrigo Almeida
 
Introdução aos sistemas operacionais embarcados
Introdução aos sistemas operacionais embarcadosIntrodução aos sistemas operacionais embarcados
Introdução aos sistemas operacionais embarcadosRodrigo Almeida
 
Segurança de sistemas: invasões, engenharia reversa e análise de virus
Segurança de sistemas: invasões, engenharia reversa e análise de virusSegurança de sistemas: invasões, engenharia reversa e análise de virus
Segurança de sistemas: invasões, engenharia reversa e análise de virusRodrigo Almeida
 
Utilizando um Display de LCD
Utilizando um Display de LCDUtilizando um Display de LCD
Utilizando um Display de LCDRodrigo Almeida
 

Mais de Rodrigo Almeida (20)

Embedded systems design @ defcon 2015
Embedded systems design @ defcon 2015Embedded systems design @ defcon 2015
Embedded systems design @ defcon 2015
 
Embedded systems development Defcon 19
Embedded systems development Defcon 19Embedded systems development Defcon 19
Embedded systems development Defcon 19
 
As diferentes engenharias
As diferentes engenhariasAs diferentes engenharias
As diferentes engenharias
 
Testing de software en instrumentos de pesar de funcionamiento no automatico ...
Testing de software en instrumentos de pesar de funcionamiento no automatico ...Testing de software en instrumentos de pesar de funcionamiento no automatico ...
Testing de software en instrumentos de pesar de funcionamiento no automatico ...
 
Seguridad de sistemas embebidos para el ámbito regulado - Alejandro Bertello ...
Seguridad de sistemas embebidos para el ámbito regulado - Alejandro Bertello ...Seguridad de sistemas embebidos para el ámbito regulado - Alejandro Bertello ...
Seguridad de sistemas embebidos para el ámbito regulado - Alejandro Bertello ...
 
Cryptology - Antônio Lacerda
Cryptology - Antônio LacerdaCryptology - Antônio Lacerda
Cryptology - Antônio Lacerda
 
Troca de contexto segura em sistemas operacionais embarcados utilizando de té...
Troca de contexto segura em sistemas operacionais embarcados utilizando de té...Troca de contexto segura em sistemas operacionais embarcados utilizando de té...
Troca de contexto segura em sistemas operacionais embarcados utilizando de té...
 
Troca de contexto segura em sistemas operacionais embarcados utilizando técni...
Troca de contexto segura em sistemas operacionais embarcados utilizando técni...Troca de contexto segura em sistemas operacionais embarcados utilizando técni...
Troca de contexto segura em sistemas operacionais embarcados utilizando técni...
 
Troca de contexto segura em sistemas operacionais embarcados utilizando técni...
Troca de contexto segura em sistemas operacionais embarcados utilizando técni...Troca de contexto segura em sistemas operacionais embarcados utilizando técni...
Troca de contexto segura em sistemas operacionais embarcados utilizando técni...
 
Projeto de uma controladora de drivers
Projeto de uma controladora de driversProjeto de uma controladora de drivers
Projeto de uma controladora de drivers
 
Desenvolvimento de drivers para sistemas embarcados
Desenvolvimento de drivers para sistemas embarcadosDesenvolvimento de drivers para sistemas embarcados
Desenvolvimento de drivers para sistemas embarcados
 
Kernel com requisitos temporais
Kernel com requisitos temporaisKernel com requisitos temporais
Kernel com requisitos temporais
 
Kernel cooperativo
Kernel cooperativoKernel cooperativo
Kernel cooperativo
 
Definição de processos
Definição de processosDefinição de processos
Definição de processos
 
Ponteiros de Função
Ponteiros de FunçãoPonteiros de Função
Ponteiros de Função
 
Conceitos de ponteiros struct e buffers
Conceitos de ponteiros struct e buffersConceitos de ponteiros struct e buffers
Conceitos de ponteiros struct e buffers
 
Introdução aos sistemas operacionais embarcados
Introdução aos sistemas operacionais embarcadosIntrodução aos sistemas operacionais embarcados
Introdução aos sistemas operacionais embarcados
 
Segurança de sistemas: invasões, engenharia reversa e análise de virus
Segurança de sistemas: invasões, engenharia reversa e análise de virusSegurança de sistemas: invasões, engenharia reversa e análise de virus
Segurança de sistemas: invasões, engenharia reversa e análise de virus
 
Comunicação serial
Comunicação serialComunicação serial
Comunicação serial
 
Utilizando um Display de LCD
Utilizando um Display de LCDUtilizando um Display de LCD
Utilizando um Display de LCD
 

Último

KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 

Último (20)

20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 

Microkernel Development

  • 1. Microkernel development: from project to implementation Rodrigo Maximiano Antunes de Almeida E-mail: rmaalmeida@gmail.com Twitter: @rmaalmeida Universidade Federal de Itajubá
  • 2. Creative Commons License The work ” Microkernel development: from project to implementation ” of Rodrigo Maximiano Antunes de Almeida was licensed with Creative Commons 3.0 – Attribution – Non Commercial – Share Alike license . Additional permission can be given by the author through direct contact using the e-mail: rmaalmeida@gmail.com
  • 3.
  • 4.
  • 5.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. concepts ( 2 ); //defining the type pointerTest //it is a pointer to function that: // receives no parameter // returns no parameter typedef void (* pointerTest )(void); //Function to be called void nop (void){ __asm NOP __endasm } //creating an pointerTest variable; pointerTest foo ; foo = nop ; (* foo )(); //calling the function via pointer
  • 16. concepts ( 2 ); temporal_conditions ( 2.2 );
  • 17. concepts ( 2 ); In the majority part of embedded systems, we need to guarantee that a function will be executed in a certain frequency. Some systems may even fail if these deadlines are not met.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24. concepts ( 2 ); void_pointers ( 2.3 );
  • 25.
  • 26. concepts ( 2 ); char * name = &quot;Paulo&quot; ; double weight = 87.5 ; unsigned int children = 3 ; void main (void){ //its not printf, yet. print ( 0 , & name ); print ( 1 , & weight ); print ( 2 , & children ); }
  • 27. concepts ( 2 ); void print (int option ; void * parameter ){ switch( option ){ case 0 : printf ( &quot;%s&quot; ,(char*) parameter ); break; case 1 : printf ( &quot;%f&quot; ,*((double*) parameter )); break; case 2 : printf ( &quot;%d&quot; ,*((unsigned int*) parameter )); break; } }
  • 28.
  • 29. microkernel ( 3 ); init_kernel ( 3.0 );
  • 30.
  • 31. microkernel ( 3 ); //CONFIG.H code char at 0x300000 CONFIG1L = 0x01 ; // No prescaler used code char at 0x300001 CONFIG1H = 0x0C ; // HS: High Speed Cristal code char at 0x300003 CONFIG2H = 0x00 ; // Disabled-Controlled by SWDTEN bit code char at 0x300006 CONFIG4L = 0x00 ; // Disabled low voltage programming //INT.H void InicializaInterrupt (void); //TIMER.H char FimTimer (void); void AguardaTimer (void); void ResetaTimer (unsigned int tempo ); void InicializaTimer (void); //BASICO.H (only part of it) #define SUCCESS 0 #define FAIL 1 #define REPEAT 2 //bit functions #define BitFlp ( arg , bit ) (( arg ) ^= ( 1 << bit )) //special register information #define PORTD (*(volatile __near unsigned char*) 0xF83 ) #define TRISC (*(volatile __near unsigned char*) 0xF94 )
  • 32. microkernel ( 3 ); //first implementation kernel_example ( 3 + 1 / 10 );
  • 33.
  • 34.
  • 35.
  • 36. microkernel ( 3 ); //kernel function's implementation void kernelInit (void){ end = 0 ; } void kernelAddProc (ptrFunc newFunc ){ if ( end < 4 ){ pool [ end ] = newFunc ; end ++; } }
  • 37. microkernel ( 3 ); //kernel function's implementatio n void kernelLoop (void){ int i ; for(;;){ //cycle through the processes for( i = 0 ; i < end ; i ++){ (* pool [ i ])(); } } }
  • 38. microkernel ( 3 ); //main loop void main (void){ kernelInit (); kernelAddProc ( tst1 ); kernelAddProc ( tst2 ); kernelAddProc ( tst3 ); kernelLoop (); }
  • 39.
  • 40. microkernel ( 3 ); //second implementation //circular buffer and struct added kernel_example ( 3 + 2 / 10 );
  • 41.
  • 42. microkernel ( 3 ); //return code #define SUCCESS 0 #define FAIL 1 #define REPEAT 2 //function pointer declaration typedef char(* ptrFunc )(void); //process struct typedef struct { ptrFunc function ; } process ; process pool [ POOL_SIZE ];
  • 43. microkernel ( 3 ); char kernelInit (void){ start = 0 ; end = 0 ; return SUCCESS ; } char kernelAddProc (process newProc ){ //checking for free space if ( (( end + 1 )% POOL_SIZE ) != start ){ pool [ end ] = newProc ; end = ( end + 1 )% POOL_SIZE ; return SUCCESS ; } return FAIL ; }
  • 44. microkernel ( 3 ); void kernelLoop (void){ int i = 0 ; for(;;){ //Do we have any process to execute? if ( start != end ){ printf ( &quot;Ite. %d, Slot. %d: &quot; , i , start ); //check if there is need to reschedule if ((*( pool [ start ]. Func ))() == REPEAT ){ kernelAddProc ( pool [ start ]); } //prepare to get the next process; start = ( start + 1 )% POOL_SIZE ; i ++; // only for debug; } } }
  • 45. microkernel ( 3 ); //vector of structs process pool [ POOL_SIZE ]; // pool[i] // pool[i].func // *(pool[i].func) // (*(pool[i].func))() //vetor of pointers for struct process* pool [ POOL_SIZE ]; // pool[i] // pool[i].func // pool[i]->func // pool[i]->func()
  • 46. microkernel ( 3 ); void kernelLoop (void){ int i = 0 ; for(;;){ //Do we have any process to execute? if ( start != end ){ printf ( &quot;Ite. %d, Slot. %d: &quot; , i , start ); //check if there is need to reschedule if ( pool [ start ]-> Func () == REPEAT ){ kernelAddProc ( pool [ start ]); } //prepare to get the next process; start = ( start + 1 )% POOL_SIZE ; i ++; // only for debug; } } }
  • 47.
  • 48. microkernel ( 3 ); void main (void){ //declaring the processes process p1 = { tst1 }; process p2 = { tst2 }; process p3 = { tst3 }; kernelInit (); //Test if the process was added successfully if ( kernelAddProc ( p1 ) == SUCCESS ){ printf ( &quot;1st process added&quot; );} if ( kernelAddProc ( p2 ) == SUCCESS ){ printf ( &quot;2nd process added&quot; );} if ( kernelAddProc ( p3 ) == SUCCESS ){ printf ( &quot;3rd process added&quot; );} kernelLoop (); }
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54. microkernel ( 3 ); if ( start != end ){ //Finding the process with the smallest start j = ( start + 1 )% SLOT _ SIZE ; next = start ; while ( j != end ){ if ( pool [ j ]. start < pool [ next ]. start ){ next = j ; } j = ( j + 1 )% SLOT_SIZE ; } //exchanging positions in the pool tempProc = pool [ next ]; pool [ next ] = pool [ start ]; pool [ start ] = tempProc ; while( pool [ start ]. start > 0 ){ } //great place to use low power mode if ( (*( pool [ ini ]. function ))() == REPEAT ){ AddProc (&( vetProc [ ini ])); } ini = ( ini + 1 )% SLOT_SIZE ; }
  • 55.
  • 56. “ Don't Reinvent The Wheel, Unless You Plan on Learning More About Wheels” Jeff Atwood Microkernel development: from project to implementation Rodrigo Maximiano Antunes de Almeida E-mail: rmaalmeida@gmail.com Twitter: @rmaalmeida Universidade Federal de Itajubá