SlideShare ist ein Scribd-Unternehmen logo
1 von 78
Process Control Daemon For Embedded Linux Platforms Technical Training Presentation Hai Shalom March 2010 (v.9)
Licensing ,[object Object],[object Object],[object Object],[object Object],[object Object]
Licensing ,[object Object],[object Object]
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What is PCD? ,[object Object],[object Object],[object Object]
Why do we need PCD? What is missing in our system?
In a system without PCD: ,[object Object],[object Object],[object Object],[object Object],[object Object]
In a system without PCD: ,[object Object],[object Object],[object Object],[object Object]
In a system without PCD: ,[object Object],[object Object],[object Object],[object Object]
How can PCD contribute? What are the advantages of products with PCD?
Enhanced system startup ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Reduced boot up time ,[object Object],[object Object],[object Object],[object Object],[object Object]
Enhanced stability and robustness ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Enhanced field debugging capabilities ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Standard API for PCD services ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Dependency graph generation ,[object Object],[object Object],[object Object]
Dependency graph generation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PCD Software modules
PCD Software modules ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PCD functional blocks * Refer to PCD Design document for more details. PARSER MAIN RULES DB Textual configuration file with rules Activate Rules Parse Rules File Add Rule Rule Info Activate / Stop TIMER FAILURE ACTION PROCESS COND CHECK Activate failure action Activate Rule Tick Check Condition OK / NOK Enqueue Process Enqueue Rule Iterate OK/Fail OK/Fail Process Spawn / Signal / Monitor Stopped / Signaled / Exited PCD API IPC Check Messages Enqueue / Dequeue Rule Application EXCEPT Crashed Activate failure action
PCD Configuration file Structure and syntax
PCD Configuration file ,[object Object],[object Object],[object Object],[object Object]
PCD Configuration file Rule Rule Rule Process Process Process Associated Associated Associated Rules Database Depends Depends Process Control Module Started, Stopped, Monitored Started, Stopped, Monitored Started, Stopped, Monitored PCD Script Rule Rule Rule … Rule Parser Module Read Add Rule
PCD Rule block ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PCD Rule block – Rule name ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PCD Rule block – Rule name: Indexed rules ,[object Object],[object Object],[object Object],[object Object],[object Object]
PCD Rule block – Process and parameters ,[object Object],[object Object]
PCD Rule block – Process and parameters ,[object Object],[object Object],[object Object],[object Object]
PCD Rule block – Start condition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PCD Rule block – End condition w/ timeout ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PCD Rule block – End condition w/ timeout ,[object Object],[object Object],[object Object],[object Object]
PCD Rule block - Process priority ,[object Object],[object Object],[object Object],[object Object]
PCD Rule block – Daemon flag ,[object Object],[object Object]
PCD Rule block – Failure action ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PCD Rule block – Active flag ,[object Object],[object Object],[object Object]
PCD Rule block - Example ,[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],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PCD Parser utility Features and parameters
PCD Configuration file syntax checking ,[object Object],[object Object],[object Object],[object Object],[object Object],# ./pcdparser [-f filename] -v
Automatic PCD header generation ,[object Object],[object Object],[object Object]
Automatic PCD header generation /**************************************************************************/ /*  FILE:  system_pcd.h /*  PURPOSE: PCD definitions file (auto generated). /**************************************************************************/ #ifndef _SYSTEM_PCD_H_ #define _SYSTEM_PCD_H_ #include "pcdapi.h" /*! ef PCD_GROUP_NAME_SYSTEM *  rief Define group ID string for SYSTEM */ #define PCD_GROUP_NAME_SYSTEM  "SYSTEM" #define PCD_RULE_SYSTEM_APPRUN  "APPRUN" #define PCD_RULE_SYSTEM_GBETH  “GBETH" #define PCD_RULE_SYSTEM_INITONCE  "INITONCE" #define PCD_RULE_SYSTEM_LED  "LED" #define PCD_RULE_SYSTEM_LASTRULE  "LASTRULE" /*! ef SYSTEM_DECLARE_PCD_RULEID() *  rief Define a ruleId easily when calling PCD API */ #define DECLARE_PCD_SYSTEM_RULEID( ruleId, RULE_NAME ) PCD_DECLARE_RULEID( ruleId, PCD_GROUP_NAME_SYSTEM, RULE_NAME ) #endif
Automatic dependency graph generation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Automatic dependency graph generation ,[object Object],[object Object],[object Object],[object Object],[object Object]
Automatic dependency graph generation
PCD API API which is exported to the software
PCD API ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PCD API – Starting a process ,[object Object],[object Object],[object Object],STATUS  PCD_api_start_process ( const struct ruleId_t  *ruleId, const Char *optionalParams );
PCD API – Signaling a process ,[object Object],[object Object],[object Object],STATUS  PCD_api_signal_process ( const struct ruleId_t  *ruleId, Int32 sig );
PCD API – Terminating a process ,[object Object],[object Object],STATUS  PCD_api_terminate_process ( const struct ruleId_t  *ruleId );
PCD API – Killing a process ,[object Object],[object Object],STATUS  PCD_api_kill_process ( const struct ruleId_t  *ruleId );
PCD API – Get rule state ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],STATUS  PCD_api_get_rule_state ( const struct ruleId_t  *ruleId, pcdApiRuleState_e *ruleState );
PCD API – Send process ready event ,[object Object],[object Object],[object Object],STATUS  PCD_api_send_process_ready ( void );
PCD API - Default exception handlers ,[object Object],[object Object],[object Object],STATUS  PCD_api_register_exception_handlers ( Char *name,  Cleanup_func cleanup ); PCD_API_REGISTER_EXCEPTION_HANDLERS();
PCD API – Exception example ,[object Object],Uint8 *killme = (Uint8 *)0xdeadbeef; *killme = (Uint8)0xbd;
PCD API – Exception example
PCD API – Exception example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PCD API – Find process ID ,[object Object],[object Object],pid_t  PCD_api_find_process_id ( Char *name ); PCD_API_FIND_PROCESS_ID();
PCD API - Reboot ,[object Object],[object Object],[object Object],void  PCD_api_reboot ( const Char *reason, Bool force );   PCD_API_REBOOT()  ;
PCD options The daemon’s parameters and options
PCD Non-Volatile error logger (postmortem analysis) ,[object Object],[object Object],[object Object],[object Object]
PCD Debug mode ,[object Object],[object Object],[object Object],[object Object],[object Object]
PCD Timer tick ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PCD Verbose mode ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PCD Daemon Command line parameters summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Information messages Normal operation messages, error messages, warning messages
PCD Startup messages ,[object Object],[object Object],[object Object],[object Object],TI Process Control Daemon v1.0.1 Copyright (C) 2010 Texas Instruments Incorporated pcd: Loaded  XX  rules. pcd: Initialization complete.
PCD Startup messages (Errors) ,[object Object],[object Object],pcd: Error: Missing input: expected "COMMAND" but found "END_COND" at line# 19. pcd: Error: Unable to parse PROCESS_READY. pcd: Error: Handling the keyword END_COND. pcd: Error: Input file did not have complete information, premature termination. pcd: Error: Reading the input configuration. pcd: Error: Error in generating configuration.
PCD Startup messages (Errors) ,[object Object],[object Object],[object Object],pcd: Another copy of PCD is already running, aborting.
PCD Daemon messages ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],pcd: Terminating PCD, rebooting system...
PCD Daemon messages ,[object Object],[object Object],[object Object],[object Object],pcd: Caught fault signal. pcd: Wrote exception information in NVRAM. pcd: Reboot disabled in debug mode, exiting.
Process cycle message ,[object Object],[object Object],[object Object],pcd: Starting process  proc_name  (Rule  GROUP_RULENAME). ... ... pcd: Rule  GROUP_RULENAME  : Success.
Process cycle message ,[object Object],pcd: Terminating process  proc_name   (pid)  (Rule  GROUP _ RULENAME )  pcd: Killing process  proc_name   (pid)  (Rule  GROUP _ RULENAME )
Process cycle message (Errors) ,[object Object],[object Object],pcd: Error: Rule  GROUP_RULENAME   : Timeout.
Process cycle message (Errors) ,[object Object],[object Object],[object Object],[object Object],pcd: Error: process  proc_name  exited unexpectedly (pid) (Rule  GROUP _ RULENAME ). pcd: Error: process  proc_name (pid)exited with result code  X  ( Rule  GROUP _ RULENAME ). pcd: Error: Exception  X  (ex_code)  caused process  proc_name   (pid)  to  stop  ( Rule  GROUP _ RULENAME ). pcd: Error: Unhandled exception  X  (ex_code)  in process  proc_name   (pid)   ( Rule  GROUP _ RULENAME ).
Warnings ,[object Object],[object Object],[object Object],pcd: Warning: Cannot signal process, process  proc_name  is not  running (Rule  GROUP _ RULENAME )  pcd: Warning : Cannot start process, process  proc_name   (pid)   already running (Rule  GROUP _ RULENAME )  pcd: Warning : Cannot stop process, process  proc_name  is not  running  ( Rule  GROUP _ RULENAME )
PCD memory requirements RAM/Flash footprint
Memory requirements ,[object Object],[object Object],[object Object],[object Object]
PCD Resources ,[object Object],[object Object],[object Object]
Thank you! Written by Hai Shalom:  mailto:hai@rt-embedded.com

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
An Overview of [Linux] Kernel Lock Improvements -- Linuxcon NA 2014
An Overview of [Linux] Kernel Lock Improvements -- Linuxcon NA 2014An Overview of [Linux] Kernel Lock Improvements -- Linuxcon NA 2014
An Overview of [Linux] Kernel Lock Improvements -- Linuxcon NA 2014
 
Iperf Tutorial
Iperf Tutorial Iperf Tutorial
Iperf Tutorial
 
XDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @CloudflareXDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @Cloudflare
 
Linux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionLinux MMAP & Ioremap introduction
Linux MMAP & Ioremap introduction
 
Linux Ethernet device driver
Linux Ethernet device driverLinux Ethernet device driver
Linux Ethernet device driver
 
JANOG43 Forefront of SRv6, Open Source Implementations
JANOG43 Forefront of SRv6, Open Source ImplementationsJANOG43 Forefront of SRv6, Open Source Implementations
JANOG43 Forefront of SRv6, Open Source Implementations
 
あるキャッシュメモリの話
あるキャッシュメモリの話あるキャッシュメモリの話
あるキャッシュメモリの話
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 
Nmap Basics
Nmap BasicsNmap Basics
Nmap Basics
 
BGP Techniques for Network Operators
BGP Techniques for Network OperatorsBGP Techniques for Network Operators
BGP Techniques for Network Operators
 
alphorm.com - Formation Cisco ICND1-CCENT (100-101)
alphorm.com - Formation Cisco ICND1-CCENT (100-101)alphorm.com - Formation Cisco ICND1-CCENT (100-101)
alphorm.com - Formation Cisco ICND1-CCENT (100-101)
 
Packet Tracer: WAN, point to point links.
Packet Tracer: WAN, point to point links.Packet Tracer: WAN, point to point links.
Packet Tracer: WAN, point to point links.
 
Tutorial: Cross-compiling Linux Kernels on x86_64
Tutorial: Cross-compiling Linux Kernels on x86_64Tutorial: Cross-compiling Linux Kernels on x86_64
Tutorial: Cross-compiling Linux Kernels on x86_64
 
Service Function Chaining with SRv6
Service Function Chaining with SRv6Service Function Chaining with SRv6
Service Function Chaining with SRv6
 
RISC-V Boot Process: One Step at a Time
RISC-V Boot Process: One Step at a TimeRISC-V Boot Process: One Step at a Time
RISC-V Boot Process: One Step at a Time
 
Linux networking
Linux networkingLinux networking
Linux networking
 
Introduction to Modern U-Boot
Introduction to Modern U-BootIntroduction to Modern U-Boot
Introduction to Modern U-Boot
 
Browsing Linux Kernel Source
Browsing Linux Kernel SourceBrowsing Linux Kernel Source
Browsing Linux Kernel Source
 
CE-4028, Miracast with AMD Wireless Display technology – Kickass gaming and o...
CE-4028, Miracast with AMD Wireless Display technology – Kickass gaming and o...CE-4028, Miracast with AMD Wireless Display technology – Kickass gaming and o...
CE-4028, Miracast with AMD Wireless Display technology – Kickass gaming and o...
 

Andere mochten auch

Process control daemon
Process control daemonProcess control daemon
Process control daemon
haish
 
Water jet machining
Water jet machiningWater jet machining
Water jet machining
Varun Garg
 

Andere mochten auch (7)

PCD - Process control daemon - Presentation
PCD - Process control daemon - PresentationPCD - Process control daemon - Presentation
PCD - Process control daemon - Presentation
 
Studies on jet penetration and kerf width at various operating pressure in ma...
Studies on jet penetration and kerf width at various operating pressure in ma...Studies on jet penetration and kerf width at various operating pressure in ma...
Studies on jet penetration and kerf width at various operating pressure in ma...
 
Process control daemon
Process control daemonProcess control daemon
Process control daemon
 
Abrasive water jet machining
Abrasive water jet machining Abrasive water jet machining
Abrasive water jet machining
 
Abrasive jet machining.51 ppt
Abrasive jet machining.51 pptAbrasive jet machining.51 ppt
Abrasive jet machining.51 ppt
 
Water jet machining
Water jet machiningWater jet machining
Water jet machining
 
Abrasive water jet machining
Abrasive water jet machiningAbrasive water jet machining
Abrasive water jet machining
 

Ähnlich wie PCD - Process control daemon

Operating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - EngineeringOperating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - Engineering
Yogesh Santhan
 

Ähnlich wie PCD - Process control daemon (20)

Chapter two process.pptx
Chapter two process.pptxChapter two process.pptx
Chapter two process.pptx
 
Ch24 system administration
Ch24 system administration Ch24 system administration
Ch24 system administration
 
Ch24
Ch24Ch24
Ch24
 
Ch03- PROCESSES.ppt
Ch03- PROCESSES.pptCh03- PROCESSES.ppt
Ch03- PROCESSES.ppt
 
Computers in management
Computers in managementComputers in management
Computers in management
 
Operating system
Operating systemOperating system
Operating system
 
Platform Independent Functional Specifications
Platform Independent Functional SpecificationsPlatform Independent Functional Specifications
Platform Independent Functional Specifications
 
Play framework : A Walkthrough
Play framework : A WalkthroughPlay framework : A Walkthrough
Play framework : A Walkthrough
 
Cs8493 unit 2
Cs8493 unit 2Cs8493 unit 2
Cs8493 unit 2
 
Tarea - 3 Actividad intermedia trabajo colaborativo 2
Tarea - 3 Actividad intermedia trabajo colaborativo 2Tarea - 3 Actividad intermedia trabajo colaborativo 2
Tarea - 3 Actividad intermedia trabajo colaborativo 2
 
Chapter 3.pdf
Chapter 3.pdfChapter 3.pdf
Chapter 3.pdf
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
 
Os
OsOs
Os
 
Os
OsOs
Os
 
OperatingSystem02..(B.SC Part 2)
OperatingSystem02..(B.SC Part 2)OperatingSystem02..(B.SC Part 2)
OperatingSystem02..(B.SC Part 2)
 
UNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdfUNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdf
 
My ppt @ bec doms on process management
My ppt @ bec doms on process managementMy ppt @ bec doms on process management
My ppt @ bec doms on process management
 
My ppt @ bec doms on process management
My ppt @ bec doms on process managementMy ppt @ bec doms on process management
My ppt @ bec doms on process management
 
Operating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - EngineeringOperating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - Engineering
 
Automated Regression Testing for Embedded Systems in Action
Automated Regression Testing for Embedded Systems in ActionAutomated Regression Testing for Embedded Systems in Action
Automated Regression Testing for Embedded Systems in Action
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 

PCD - Process control daemon

  • 1. Process Control Daemon For Embedded Linux Platforms Technical Training Presentation Hai Shalom March 2010 (v.9)
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. Why do we need PCD? What is missing in our system?
  • 7.
  • 8.
  • 9.
  • 10. How can PCD contribute? What are the advantages of products with PCD?
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 19.
  • 20. PCD functional blocks * Refer to PCD Design document for more details. PARSER MAIN RULES DB Textual configuration file with rules Activate Rules Parse Rules File Add Rule Rule Info Activate / Stop TIMER FAILURE ACTION PROCESS COND CHECK Activate failure action Activate Rule Tick Check Condition OK / NOK Enqueue Process Enqueue Rule Iterate OK/Fail OK/Fail Process Spawn / Signal / Monitor Stopped / Signaled / Exited PCD API IPC Check Messages Enqueue / Dequeue Rule Application EXCEPT Crashed Activate failure action
  • 21. PCD Configuration file Structure and syntax
  • 22.
  • 23. PCD Configuration file Rule Rule Rule Process Process Process Associated Associated Associated Rules Database Depends Depends Process Control Module Started, Stopped, Monitored Started, Stopped, Monitored Started, Stopped, Monitored PCD Script Rule Rule Rule … Rule Parser Module Read Add Rule
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37. PCD Parser utility Features and parameters
  • 38.
  • 39.
  • 40. Automatic PCD header generation /**************************************************************************/ /* FILE: system_pcd.h /* PURPOSE: PCD definitions file (auto generated). /**************************************************************************/ #ifndef _SYSTEM_PCD_H_ #define _SYSTEM_PCD_H_ #include "pcdapi.h" /*! ef PCD_GROUP_NAME_SYSTEM * rief Define group ID string for SYSTEM */ #define PCD_GROUP_NAME_SYSTEM "SYSTEM" #define PCD_RULE_SYSTEM_APPRUN "APPRUN" #define PCD_RULE_SYSTEM_GBETH “GBETH" #define PCD_RULE_SYSTEM_INITONCE "INITONCE" #define PCD_RULE_SYSTEM_LED "LED" #define PCD_RULE_SYSTEM_LASTRULE "LASTRULE" /*! ef SYSTEM_DECLARE_PCD_RULEID() * rief Define a ruleId easily when calling PCD API */ #define DECLARE_PCD_SYSTEM_RULEID( ruleId, RULE_NAME ) PCD_DECLARE_RULEID( ruleId, PCD_GROUP_NAME_SYSTEM, RULE_NAME ) #endif
  • 41.
  • 42.
  • 44. PCD API API which is exported to the software
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54. PCD API – Exception example
  • 55.
  • 56.
  • 57.
  • 58. PCD options The daemon’s parameters and options
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64. Information messages Normal operation messages, error messages, warning messages
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75. PCD memory requirements RAM/Flash footprint
  • 76.
  • 77.
  • 78. Thank you! Written by Hai Shalom: mailto:hai@rt-embedded.com