SlideShare a Scribd company logo
Process Control DaemonFor Embedded Linux Platforms Speaker: Hai Shalom rt-embedded.com/pcd
Background review: What were the reasons that led to the development of PCD. PCD project review: Features and high level overview of the project. Live demonstration. Q & A. Agenda
Does your product have a process controller? Does your product automatically recover after a crash? Do you think your product’s boot time is fast enough? Are you using methods other than printf  to debug a crashed application? Are you familiar with all the processes which are running in your product and their dependencies? Some questions
Most of you probably answered “No” to at least one question. People who answered “Yes” to all questions are probably using PCD already! Let’s review some facts about Embedded Linux based products… What were your answers?
Done by scripts (rcS, rc.*). These are great, but might be: ,[object Object]
Limited ways to synchronize depended processes(delay).
Limited ways to verify successful start of a process
No error checking (usually).
No formal way to define dependencies.
Difficult to start processes in parallel.
Not trivial to understand, maintain and extend:
Require additional shell scripting expertise.
Tend to be long and unreadable.
Plenty of commented code, old remarks, different code styles.System start up
Done by scripts (rcS, rc.*). These are great, but might be: ,[object Object]
Limited ways to synchronize depended processes (delay).
Limited ways to verify successful start of a process
No error checking (usually).
No formal way to define dependencies.
Difficult to start processes in parallel.
Not trivial to understand, maintain and extend:
Require additional shell scripting expertise.
Tend to be long and unreadable.
Plenty of commented code, old remarks, different code styles.System start up Looks familiar?
A crashed program just terminates, usually after printing “Segmentation Fault”. ,[object Object]
Where is the debug information?
Kernel crashes are assumed to be handled by the system’s watchdog.Signal Handlers not always implemented correctly. ,[object Object],The system remains unstable and unusable.  ,[object Object],Crash handling and recovery
A crashed program just terminates, usually after printing “Segmentation Fault”. ,[object Object]
Where is the debug information?
Kernel crashes are assumed to be handled by the system’s watchdog.Signal Handlers not always implemented correctly. ,[object Object],The system remains unstable and unusable.  ,[object Object],Crash handling and recovery
No central management entity. ,[object Object],Must know process’ pid in order to signal or kill. Each process must manage his own children. ,[object Object]
Parents must retrieve child’sexit status, or else we end upwith Zombies…Process management
A customer reports a crash in the field or in his lab tests: ,[object Object]
When a process abnormally terminates, all its information goes away and no log is saved.
You might be on the next flight to the customer’s lab.Field/Remote debugging
A great (and free) solution: PCD What is PCD?
What is PCD? PCD – Process Control Daemon, is an open source, light-weight system level process manager for Embedded-Linux based products (consumer electronics, network devices, etc). The PCD provides a complementary service for any Embedded Linux driven product.  Designed and implemented by Hai Shalom during employment at Texas Instruments for Next-Gen Puma5 Cable chipset. Released to open source as part of his M.Sc. Degree research. PCD is a proven solution that already drives millions of devices in the world.
System startup: PCD starts up the system in an efficient, synchronized and deterministic manner. Process management: a centralized entity that controls and monitors all processes, and provides API to manage them.  System recovery: Configurable per process recovery action is taken in case of a crash. Debug information: PCD provides a detailed crash log in case of a program error. PCD Features in high-level
How does it work? What are the advantages of products with PCD?
Rule blocks replace/extend traditional shell scripts. Each rule defines a single process. Rule inter-dependency is well defined. PCD Scripts: Rule blocks Process 1 Rule 1 PCDScriptFile Process 2 Rule 2 Process 3 Rule 3
Very simple and readable syntax. Easy to extend and maintain. Each Rule block is based on the same template and contains the following details: ,[object Object]
When to start it (depends on event…)?
What is the required priority?
What is the completion event?
How much time to wait for it to complete?
What to do in case of a crash?PCD Scripts: Rule blocks
Very simple and readable syntax. Easy to extend and maintain. Each Rule block is based on the same template and contains the following details: ,[object Object]
When to start it (depends on event…)?
What is the required priority?

More Related Content

What's hot

Galvin-operating System(Ch3)
Galvin-operating System(Ch3)Galvin-operating System(Ch3)
Galvin-operating System(Ch3)
dsuyal1
 
Process threads operating system.
Process threads operating system.Process threads operating system.
Process threads operating system.
Reham Maher El-Safarini
 
Introduction to Real-Time Operating Systems
Introduction to Real-Time Operating SystemsIntroduction to Real-Time Operating Systems
Introduction to Real-Time Operating Systems
coolmirza143
 
Operating System - Unit I - Introduction
Operating System - Unit I - IntroductionOperating System - Unit I - Introduction
Operating System - Unit I - Introduction
cscarcas
 
Unix Process management
Unix Process managementUnix Process management
Unix Process management
Wave Digitech
 
Components in real time systems
Components in real time systemsComponents in real time systems
Components in real time systems
Saransh Garg
 
Real Time Operating system (RTOS) - Embedded systems
Real Time Operating system (RTOS) - Embedded systemsReal Time Operating system (RTOS) - Embedded systems
Real Time Operating system (RTOS) - Embedded systems
Hariharan Ganesan
 
Operating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Operating Systems Part II-Process Scheduling, Synchronisation & DeadlockOperating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Operating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Ajit Nayak
 
3 processes
3 processes3 processes
3 processes
BaliThorat1
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
Murtadha Alsabbagh
 
REAL TIME OPERATING SYSTEM PART 1
REAL TIME OPERATING SYSTEM PART 1REAL TIME OPERATING SYSTEM PART 1
REAL TIME OPERATING SYSTEM PART 1
Embeddedcraft Craft
 
RTOS
RTOSRTOS
Ch2
Ch2Ch2
Ch2
nubinny
 
RTAI - Earliest Deadline First
RTAI - Earliest Deadline FirstRTAI - Earliest Deadline First
RTAI - Earliest Deadline First
Stefano Bragaglia
 
2 os structure
2 os structure2 os structure
2 os structure
BaliThorat1
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
Rohit Joshi
 
Operating system - Process and its concepts
Operating system - Process and its conceptsOperating system - Process and its concepts
Operating system - Process and its concepts
Karan Thakkar
 
Fault tolerant presentation
Fault tolerant presentationFault tolerant presentation
Fault tolerant presentation
skadyan1
 
Chapter 3: Processes
Chapter 3: ProcessesChapter 3: Processes
Chapter 3: Processes
Shafaan Khaliq Bhatti
 
Fault tolerance and computing
Fault tolerance  and computingFault tolerance  and computing
Fault tolerance and computing
Palani murugan
 

What's hot (20)

Galvin-operating System(Ch3)
Galvin-operating System(Ch3)Galvin-operating System(Ch3)
Galvin-operating System(Ch3)
 
Process threads operating system.
Process threads operating system.Process threads operating system.
Process threads operating system.
 
Introduction to Real-Time Operating Systems
Introduction to Real-Time Operating SystemsIntroduction to Real-Time Operating Systems
Introduction to Real-Time Operating Systems
 
Operating System - Unit I - Introduction
Operating System - Unit I - IntroductionOperating System - Unit I - Introduction
Operating System - Unit I - Introduction
 
Unix Process management
Unix Process managementUnix Process management
Unix Process management
 
Components in real time systems
Components in real time systemsComponents in real time systems
Components in real time systems
 
Real Time Operating system (RTOS) - Embedded systems
Real Time Operating system (RTOS) - Embedded systemsReal Time Operating system (RTOS) - Embedded systems
Real Time Operating system (RTOS) - Embedded systems
 
Operating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Operating Systems Part II-Process Scheduling, Synchronisation & DeadlockOperating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Operating Systems Part II-Process Scheduling, Synchronisation & Deadlock
 
3 processes
3 processes3 processes
3 processes
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 
REAL TIME OPERATING SYSTEM PART 1
REAL TIME OPERATING SYSTEM PART 1REAL TIME OPERATING SYSTEM PART 1
REAL TIME OPERATING SYSTEM PART 1
 
RTOS
RTOSRTOS
RTOS
 
Ch2
Ch2Ch2
Ch2
 
RTAI - Earliest Deadline First
RTAI - Earliest Deadline FirstRTAI - Earliest Deadline First
RTAI - Earliest Deadline First
 
2 os structure
2 os structure2 os structure
2 os structure
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 
Operating system - Process and its concepts
Operating system - Process and its conceptsOperating system - Process and its concepts
Operating system - Process and its concepts
 
Fault tolerant presentation
Fault tolerant presentationFault tolerant presentation
Fault tolerant presentation
 
Chapter 3: Processes
Chapter 3: ProcessesChapter 3: Processes
Chapter 3: Processes
 
Fault tolerance and computing
Fault tolerance  and computingFault tolerance  and computing
Fault tolerance and computing
 

Viewers also liked

Poster_Jan
Poster_JanPoster_Jan
Poster_Jan
Jan Salomon
 
Александр Терещук - Memory Analyzer Tool and memory optimization tips in Android
Александр Терещук - Memory Analyzer Tool and memory optimization tips in AndroidАлександр Терещук - Memory Analyzer Tool and memory optimization tips in Android
Александр Терещук - Memory Analyzer Tool and memory optimization tips in Android
UA Mobile
 
Linux memory consumption
Linux memory consumptionLinux memory consumption
Linux memory consumption
haish
 
Tuning Android for low RAM
Tuning Android for low RAMTuning Android for low RAM
Tuning Android for low RAM
Chris Simmonds
 
Tuning android for low ram devices
Tuning android for low ram devicesTuning android for low ram devices
Tuning android for low ram devices
Droidcon Berlin
 
Stan winston & animatronics
Stan winston & animatronicsStan winston & animatronics
Stan winston & animatronics
Jason Seon-gyu Park
 
Android Rooting and Flashing
Android Rooting and FlashingAndroid Rooting and Flashing
Android Rooting and Flashing
Muhammad Ehsan
 
Crash_Report_Mechanism_In_Tizen
Crash_Report_Mechanism_In_TizenCrash_Report_Mechanism_In_Tizen
Crash_Report_Mechanism_In_Tizen
Lex Yu
 
Devel::NYTProf v5 at YAPC::NA 201406
Devel::NYTProf v5 at YAPC::NA 201406Devel::NYTProf v5 at YAPC::NA 201406
Devel::NYTProf v5 at YAPC::NA 201406
Tim Bunce
 
animatronics pdf
animatronics pdfanimatronics pdf
animatronics pdf
Prasanna Reddy
 
Android introduction and rooting technology
Android introduction and rooting technologyAndroid introduction and rooting technology
Android introduction and rooting technology
Gagandeep Nanda
 
Android rooting
Android rootingAndroid rooting
Android rooting
Vikalp Sajwan
 
Android Memory , Where is all My RAM
Android Memory , Where is all My RAM Android Memory , Where is all My RAM
Android Memory , Where is all My RAM
Yossi Elkrief
 
Perl Memory Use 201209
Perl Memory Use 201209Perl Memory Use 201209
Perl Memory Use 201209
Tim Bunce
 
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
peknap
 
Workshop - Linux Memory Analysis with Volatility
Workshop - Linux Memory Analysis with VolatilityWorkshop - Linux Memory Analysis with Volatility
Workshop - Linux Memory Analysis with Volatility
Andrew Case
 
Rooting an Android phone
Rooting an Android phoneRooting an Android phone
Rooting an Android phone
Arnav Gupta
 
Perl Memory Use - LPW2013
Perl Memory Use - LPW2013Perl Memory Use - LPW2013
Perl Memory Use - LPW2013
Tim Bunce
 
Memory in Android
Memory in AndroidMemory in Android
Memory in Android
Sergey Bandysik
 
Linux memory-management-kamal
Linux memory-management-kamalLinux memory-management-kamal
Linux memory-management-kamal
Kamal Maiti
 

Viewers also liked (20)

Poster_Jan
Poster_JanPoster_Jan
Poster_Jan
 
Александр Терещук - Memory Analyzer Tool and memory optimization tips in Android
Александр Терещук - Memory Analyzer Tool and memory optimization tips in AndroidАлександр Терещук - Memory Analyzer Tool and memory optimization tips in Android
Александр Терещук - Memory Analyzer Tool and memory optimization tips in Android
 
Linux memory consumption
Linux memory consumptionLinux memory consumption
Linux memory consumption
 
Tuning Android for low RAM
Tuning Android for low RAMTuning Android for low RAM
Tuning Android for low RAM
 
Tuning android for low ram devices
Tuning android for low ram devicesTuning android for low ram devices
Tuning android for low ram devices
 
Stan winston & animatronics
Stan winston & animatronicsStan winston & animatronics
Stan winston & animatronics
 
Android Rooting and Flashing
Android Rooting and FlashingAndroid Rooting and Flashing
Android Rooting and Flashing
 
Crash_Report_Mechanism_In_Tizen
Crash_Report_Mechanism_In_TizenCrash_Report_Mechanism_In_Tizen
Crash_Report_Mechanism_In_Tizen
 
Devel::NYTProf v5 at YAPC::NA 201406
Devel::NYTProf v5 at YAPC::NA 201406Devel::NYTProf v5 at YAPC::NA 201406
Devel::NYTProf v5 at YAPC::NA 201406
 
animatronics pdf
animatronics pdfanimatronics pdf
animatronics pdf
 
Android introduction and rooting technology
Android introduction and rooting technologyAndroid introduction and rooting technology
Android introduction and rooting technology
 
Android rooting
Android rootingAndroid rooting
Android rooting
 
Android Memory , Where is all My RAM
Android Memory , Where is all My RAM Android Memory , Where is all My RAM
Android Memory , Where is all My RAM
 
Perl Memory Use 201209
Perl Memory Use 201209Perl Memory Use 201209
Perl Memory Use 201209
 
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
 
Workshop - Linux Memory Analysis with Volatility
Workshop - Linux Memory Analysis with VolatilityWorkshop - Linux Memory Analysis with Volatility
Workshop - Linux Memory Analysis with Volatility
 
Rooting an Android phone
Rooting an Android phoneRooting an Android phone
Rooting an Android phone
 
Perl Memory Use - LPW2013
Perl Memory Use - LPW2013Perl Memory Use - LPW2013
Perl Memory Use - LPW2013
 
Memory in Android
Memory in AndroidMemory in Android
Memory in Android
 
Linux memory-management-kamal
Linux memory-management-kamalLinux memory-management-kamal
Linux memory-management-kamal
 

Similar to Process control daemon

Computers in management
Computers in managementComputers in management
Computers in management
Kinshook Chaturvedi
 
Creating an Embedded System Lab
Creating an Embedded System LabCreating an Embedded System Lab
Creating an Embedded System Lab
Nonamepro
 
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
CODE BLUE
 
Ppt on embedded system
Ppt on embedded systemPpt on embedded system
Ppt on embedded system
Pankaj joshi
 
how-to-bypass-AM-PPL
how-to-bypass-AM-PPLhow-to-bypass-AM-PPL
how-to-bypass-AM-PPL
nitinscribd
 
UNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdfUNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdf
aakritii765
 
Joomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingJoomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation Testing
Shyam Sunder Verma
 
Embedded system
Embedded systemEmbedded system
Embedded system
Vinod Srivastava
 
Computer
ComputerComputer
Computer
CAFE91
 
Embedded Systems
Embedded SystemsEmbedded Systems
Embedded Systems
Benjim Thomas Mathew
 
Spug pt session2 - debuggingl
Spug pt session2 - debugginglSpug pt session2 - debuggingl
Spug pt session2 - debuggingl
Comunidade Portuguesa de SharePoiint
 
2e062d07-4a72-4792-af77-5e53147d4c81.pdf
2e062d07-4a72-4792-af77-5e53147d4c81.pdf2e062d07-4a72-4792-af77-5e53147d4c81.pdf
2e062d07-4a72-4792-af77-5e53147d4c81.pdf
kimavathmukeshnaik
 
2e062d07-4a72-4792-af77-5e53147d4c81.pdf
2e062d07-4a72-4792-af77-5e53147d4c81.pdf2e062d07-4a72-4792-af77-5e53147d4c81.pdf
2e062d07-4a72-4792-af77-5e53147d4c81.pdf
kimavathmukeshnaik
 
embededsystemfinal1-170130182030 (1).ppt
embededsystemfinal1-170130182030 (1).pptembededsystemfinal1-170130182030 (1).ppt
embededsystemfinal1-170130182030 (1).ppt
kimavathmukeshnaik
 
UNiT 5.pdf
UNiT 5.pdfUNiT 5.pdf
UNiT 5.pdf
SAQUEBAMAHIR
 
System administration with automation
System administration with automationSystem administration with automation
System administration with automation
Shivam Srivastava
 
Documentation
DocumentationDocumentation
Documentation
Rajesh Seendripu
 
Successful Software Projects - What you need to consider
Successful Software Projects - What you need to considerSuccessful Software Projects - What you need to consider
Successful Software Projects - What you need to consider
LloydMoore
 
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as CodeDevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
Matt Ray
 
Real Time Network Monitoring System
Real  Time  Network  Monitoring  SystemReal  Time  Network  Monitoring  System
Real Time Network Monitoring System
Girish Naik
 

Similar to Process control daemon (20)

Computers in management
Computers in managementComputers in management
Computers in management
 
Creating an Embedded System Lab
Creating an Embedded System LabCreating an Embedded System Lab
Creating an Embedded System Lab
 
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
 
Ppt on embedded system
Ppt on embedded systemPpt on embedded system
Ppt on embedded system
 
how-to-bypass-AM-PPL
how-to-bypass-AM-PPLhow-to-bypass-AM-PPL
how-to-bypass-AM-PPL
 
UNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdfUNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdf
 
Joomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingJoomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation Testing
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Computer
ComputerComputer
Computer
 
Embedded Systems
Embedded SystemsEmbedded Systems
Embedded Systems
 
Spug pt session2 - debuggingl
Spug pt session2 - debugginglSpug pt session2 - debuggingl
Spug pt session2 - debuggingl
 
2e062d07-4a72-4792-af77-5e53147d4c81.pdf
2e062d07-4a72-4792-af77-5e53147d4c81.pdf2e062d07-4a72-4792-af77-5e53147d4c81.pdf
2e062d07-4a72-4792-af77-5e53147d4c81.pdf
 
2e062d07-4a72-4792-af77-5e53147d4c81.pdf
2e062d07-4a72-4792-af77-5e53147d4c81.pdf2e062d07-4a72-4792-af77-5e53147d4c81.pdf
2e062d07-4a72-4792-af77-5e53147d4c81.pdf
 
embededsystemfinal1-170130182030 (1).ppt
embededsystemfinal1-170130182030 (1).pptembededsystemfinal1-170130182030 (1).ppt
embededsystemfinal1-170130182030 (1).ppt
 
UNiT 5.pdf
UNiT 5.pdfUNiT 5.pdf
UNiT 5.pdf
 
System administration with automation
System administration with automationSystem administration with automation
System administration with automation
 
Documentation
DocumentationDocumentation
Documentation
 
Successful Software Projects - What you need to consider
Successful Software Projects - What you need to considerSuccessful Software Projects - What you need to consider
Successful Software Projects - What you need to consider
 
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as CodeDevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
 
Real Time Network Monitoring System
Real  Time  Network  Monitoring  SystemReal  Time  Network  Monitoring  System
Real Time Network Monitoring System
 

Process control daemon

  • 1. Process Control DaemonFor Embedded Linux Platforms Speaker: Hai Shalom rt-embedded.com/pcd
  • 2. Background review: What were the reasons that led to the development of PCD. PCD project review: Features and high level overview of the project. Live demonstration. Q & A. Agenda
  • 3. Does your product have a process controller? Does your product automatically recover after a crash? Do you think your product’s boot time is fast enough? Are you using methods other than printf to debug a crashed application? Are you familiar with all the processes which are running in your product and their dependencies? Some questions
  • 4. Most of you probably answered “No” to at least one question. People who answered “Yes” to all questions are probably using PCD already! Let’s review some facts about Embedded Linux based products… What were your answers?
  • 5.
  • 6. Limited ways to synchronize depended processes(delay).
  • 7. Limited ways to verify successful start of a process
  • 8. No error checking (usually).
  • 9. No formal way to define dependencies.
  • 10. Difficult to start processes in parallel.
  • 11. Not trivial to understand, maintain and extend:
  • 12. Require additional shell scripting expertise.
  • 13. Tend to be long and unreadable.
  • 14. Plenty of commented code, old remarks, different code styles.System start up
  • 15.
  • 16. Limited ways to synchronize depended processes (delay).
  • 17. Limited ways to verify successful start of a process
  • 18. No error checking (usually).
  • 19. No formal way to define dependencies.
  • 20. Difficult to start processes in parallel.
  • 21. Not trivial to understand, maintain and extend:
  • 22. Require additional shell scripting expertise.
  • 23. Tend to be long and unreadable.
  • 24. Plenty of commented code, old remarks, different code styles.System start up Looks familiar?
  • 25.
  • 26. Where is the debug information?
  • 27.
  • 28.
  • 29. Where is the debug information?
  • 30.
  • 31.
  • 32. Parents must retrieve child’sexit status, or else we end upwith Zombies…Process management
  • 33.
  • 34. When a process abnormally terminates, all its information goes away and no log is saved.
  • 35. You might be on the next flight to the customer’s lab.Field/Remote debugging
  • 36. A great (and free) solution: PCD What is PCD?
  • 37. What is PCD? PCD – Process Control Daemon, is an open source, light-weight system level process manager for Embedded-Linux based products (consumer electronics, network devices, etc). The PCD provides a complementary service for any Embedded Linux driven product. Designed and implemented by Hai Shalom during employment at Texas Instruments for Next-Gen Puma5 Cable chipset. Released to open source as part of his M.Sc. Degree research. PCD is a proven solution that already drives millions of devices in the world.
  • 38. System startup: PCD starts up the system in an efficient, synchronized and deterministic manner. Process management: a centralized entity that controls and monitors all processes, and provides API to manage them. System recovery: Configurable per process recovery action is taken in case of a crash. Debug information: PCD provides a detailed crash log in case of a program error. PCD Features in high-level
  • 39. How does it work? What are the advantages of products with PCD?
  • 40. Rule blocks replace/extend traditional shell scripts. Each rule defines a single process. Rule inter-dependency is well defined. PCD Scripts: Rule blocks Process 1 Rule 1 PCDScriptFile Process 2 Rule 2 Process 3 Rule 3
  • 41.
  • 42. When to start it (depends on event…)?
  • 43. What is the required priority?
  • 44. What is the completion event?
  • 45. How much time to wait for it to complete?
  • 46. What to do in case of a crash?PCD Scripts: Rule blocks
  • 47.
  • 48. When to start it (depends on event…)?
  • 49. What is the required priority?
  • 50. What is the completion event?
  • 51. How much time to wait for it to complete?
  • 52. What to do in case of a crash?PCD Scripts: Rule blocks
  • 53. Event Driven System Startup Once all rules are parsed, the PCD builds a dependency graph database. PCD starts each rule in the “right” time. PCD continuously monitors the system. PCD Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Last
  • 54.
  • 55.
  • 56. Sent a “Process ready” event to the PCD, or;
  • 58. Was running for a specified amount of time, or;
  • 60. A Completion event of one rule could be the Start event of another rule.Event Driven System Startup
  • 61. Dependencies between processes are well defined. Rules are started as soon as their start event comes. No need for non-deterministic delays between starting processes. Rules without inter-dependency are started in parallel. Improve user experience and product reputation (Fast product!) Reduced startup time
  • 62. Enhanced stability and robustness Crash Process Signal PCD Rule Restart Recover Rule Ignore Reboot
  • 63.
  • 64. Reboot the system: In case of a fatal, non-recoverable error.
  • 66.
  • 67.
  • 68.
  • 71. Registers pc and lr/ra can be used to trace the bug using addr2line or objdump.Crash log with PCD
  • 72. Process management New Configuration Request to restart Process 2 Process 1 Process 2 Process 2 Restart Process 2 Rule 1 Rule 2 PCD Rule 4 Rule 3 User input: Disable something Process 3 Process 4 Request to terminateProcess 4 TerminateProcess 4
  • 73.
  • 74. Send a “process ready” event.
  • 77. Reboot the system (with logged a reason).The PCD API is available by linking with the PCD library. Process management
  • 78. What is the order that the processes are started? What is each process dependency? PCDcan generate dependency graphs for visual representation of all the rules and their dependencies. Visibility provides an excellent means to examine and understand the dependencies between each rule in the system, and fix them in case of mistakes. Dependency graph generation
  • 79.
  • 81. x86
  • 82. x64
  • 83. For other platforms, the crash log will not include register details.
  • 84. Last two architectures allow running a PCD driven system in any development PC running Linux.Supported architectures
  • 85.
  • 88. PCD Stack (Watermark): 84KB (Typical).Memory Requirements
  • 89. The PCD Project is an Open-Source project. The PCD project is licensed under the GNU Lesser General Public License version 2.1, as published by the Free Software Foundation. Its license allows linking proprietary software without any license contamination. To view a copy of this license, visithttp://www.gnu.org/licenses/lgpl-2.1.html#SEC1 Licensing
  • 90.
  • 91. Robustness, availability: Due to the recovery actions, the system is more available and user experience is better.
  • 92. Quality: Detailed crash logs pointed out bugs, reduced fix time, enabled remote and offline analysis.
  • 93. Customers found it very useful:
  • 94.
  • 95. Questions and Answers Hai, fixing a bug
  • 97. System startup: PCD starts up the system in an efficient, synchronized and deterministic manner. Process management: a centralized entity that controls and monitors all processes, and provides API to manage them. System recovery: Configurable per process recovery action is taken in case of a crash. Debug information: PCD provides a detailed crash log in case of a program error. PCD can make your product a better product! PCD Features in high-level
  • 98. Thank you! Hai Shalom
  • 100. PCD High level technical info
  • 101. The PCD API provides an easy interface to request various services from the PCD: Start or terminate a process. Send a “process ready” event. Signal a process. Register to PCD default exception handlers. Reboot the system (with logged a reason). The PCD API is available by linking with the PCD library. Standard API for PCD services
  • 102. PCD Exception handler Every program can register to PCD’s exception handlers. The PCD performs as a “crash daemon” which listens on a dedicated socket. The exception handler collects debug information and sends it to the PCD using only “Safe functions”. The PCD formats the data, displays it on the console and logs it in the non-volatile storage.
  • 103. The PCD design features various loosely coupled software modules: Main: Performs the initializations and the main loop. Rule Parser: Reads and parses the textual rules. Rules DB: Stores all the rules as binary records. Process: Starts, stops and monitors the processes Timer: Provides the ticks for the pcd. Condition check: Checks if a condition is satisfied. Failure action: Performs failure/recovery actions. Exception: Implements the detailed exception handlers. API: The PCD API interface (As a separate library). PCD Software modules
  • 104. PCD Software modules block diagram PARSER RULES DB Textual configuration file with rules Add Rule Rule Info OK/Fail Parse Rules File OK/Fail Activate Rules MAIN PCDAPI Check Messages Application Activate / Stop IPC Enqueue / Dequeue Rule Tick Crashed Iterate Check Condition Enqueue Rule TIMER PROCESS CONTRL CONDITIONCHECK EXCEPTION HANDLER OK / NOK Enqueue Process Spawn / Signal /Monitor Stopped / Signaled / Exited Activate failure action Activate Rule FAILUREACTION Process Activate failure action
  • 105. A textual file, similar to shell script syntax. Contains a list of “Rule Blocks”. A Rule block is defined per process. Scripts can be extended by including other scripts. dividing dedicated scripts per each logical or functional sub-system in the system. PCD Rules Script
  • 106. Rules and Processes block diagram PROCESS CONTROL PARSER RULESDB Started, Stopped, Monitored Add Rule Read Rule Process Associated PCD Script Rule Rule Rule … Rule Depends Rule Process Associated Started, Stopped, Monitored Depends Rule Process Associated Started, Stopped, Monitored
  • 107. PCD Rules Script Syntax
  • 108. The PCD provides a parser which provides an easy way to verify that your PCD scripts do not contain syntax errors, similarly to compilation process. The parser allows to fix the configuration files on the host, without the need to run them on the target, and rebuilding an image in case of an error. Syntax Checking
  • 109. No purchase costs or royalty fees. Source code is fully available. High quality code due to extensive exposure. LGPL allows linking proprietary code with PCD. Continuous development and bug fixes. Need a new feature? Either request it in the project tracker system Or join the PCD community and develop it, so other could also enjoy your productivity. PCD - Open Source Benefits
  • 110. Support more platforms. Watchdog/Keep alive mechanism. Kernel monitoring agent/module. Rule enhancements: Affinity Resource limitation (CPU, Heap, Stack, Fork Bombs..) Current working directory Others… PCD – Wish list (Future Features)