SlideShare ist ein Scribd-Unternehmen logo
1 von 22
RTDroid
Real-Time Android
Aswin, Jerry, Mohit, Pranav
A system is said to be real-time if the total
correctness of an operation depends not
only upon its logical correctness, but also
upon the time in which it is performed.
What is a Real-Time System?
Hard – missing a deadline is a total system
failure.
Types of Real-Time Systems
Soft – the usefulness of a result degrades
after its deadline, thereby degrading the
system's quality of service.
How to make Android
Real-Time?
Proposed Architectures
Proposed Architectures
RTDroid Architecture
How to make Linux
kernel Hard Real-Time?
PREEMPT_RT patch
●Implementation of Concurrent Worker Queues.
●spinlock_t and rwlock_t : In RT linux, they are preemptible.
Therefore ensuring that critical sections are preemptible. It’s also
possible to create non-preemptible versions using
raw_spinlock_t
●Converting interrupt handlers into preemptible kernel threads.
●Implement priority-inheritance for in-kernel spinlocks and
semaphores to avoid priority inversion. Default linux doesn’t
support it.
DragonBoard:
-Qualcomm Snapdragon 800 (APQ8074 based) board
Challenges
RT Patch that we used
was generated on
mainline linux codebase
(Codebase1)
Patch to be applied on
Dragonboard kernel with SoC
specific changes
(Codebase2)
Plus the codebase2 has
Android modifications on
linux kernel
Plus the codebase2
backported some changes
from linux 3.6 to linux 3.4
Merge Conflict
Challenges post solving merge conflicts
Adding changes introduced by RT patch to SoC specific drivers.
For example: GPU driver (msm_kgsl)
Fixing any build errors for various Preemption models.
Preemption Models
No Forced Preemption
CONFIG_PREEMPT_NONE:
This is the traditional Linux preemption model, geared towards
throughput. It will still provide good latencies most of the time, but
there are no guarantees and occasional longer delays are possible.
Voluntary Kernel Preemption
CONFIG_PREEMPT_VOLUNTARY:
This option reduces the latency of the kernel by adding more
"explicit preemption points" to the kernel code. These new
preemption points have been selected to reduce the maximum
latency of rescheduling, providing faster application reactions,
at the cost of slightly lower throughput.
Preemptible Kernel (Low latency)
CONFIG_PREEMPT__LL:
This option reduces the latency of the kernel by making all kernel
code (that is not executing in a critical section) preemptible.
Preemptible Kernel (Basic RT)
CONFIG_PREEMPT_RTB:
This option is basically the same as (Low-Latency Desktop) but
enables changes which are preliminary for the full preemptiple RT
kernel.
Fully Preemptible Kernel (RT)
CONFIG_PREEMPT_RT_FULL:
All and everything is preemptible
Performance Results on
various Preemption
models
RTDroid_Presentation
RTDroid_Presentation
RTDroid_Presentation

Weitere ähnliche Inhalte

Was ist angesagt?

The Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on LinuxThe Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on LinuxPicker Weng
 
Kernel Recipes 2016 - kernelci.org: 1.5 million kernel boots (and counting)
Kernel Recipes 2016 - kernelci.org: 1.5 million kernel boots (and counting)Kernel Recipes 2016 - kernelci.org: 1.5 million kernel boots (and counting)
Kernel Recipes 2016 - kernelci.org: 1.5 million kernel boots (and counting)Anne Nicolas
 
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementationRajan Kumar
 
SFO15-302: Energy Aware Scheduling: Progress Update
SFO15-302: Energy Aware Scheduling: Progress UpdateSFO15-302: Energy Aware Scheduling: Progress Update
SFO15-302: Energy Aware Scheduling: Progress UpdateLinaro
 
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 systemsHariharan Ganesan
 
Comparision of scheduling algorithms
Comparision of scheduling algorithmsComparision of scheduling algorithms
Comparision of scheduling algorithmsTanya Makkar
 
Let’s Fix Logging Once and for All
Let’s Fix Logging Once and for AllLet’s Fix Logging Once and for All
Let’s Fix Logging Once and for AllScyllaDB
 
gcma: guaranteed contiguous memory allocator
gcma:  guaranteed contiguous memory allocatorgcma:  guaranteed contiguous memory allocator
gcma: guaranteed contiguous memory allocatorSeongJae Park
 
Real time operating system
Real time operating systemReal time operating system
Real time operating systemBharti Goyal
 
Os rtos.ppt
Os rtos.pptOs rtos.ppt
Os rtos.pptrahul km
 
The survey on real time operating systems (1)
The survey on real time operating systems (1)The survey on real time operating systems (1)
The survey on real time operating systems (1)manojkumarsmks
 
BeRTOS: Free Embedded RTOS
BeRTOS: Free Embedded RTOSBeRTOS: Free Embedded RTOS
BeRTOS: Free Embedded RTOSDeveler S.r.l.
 

Was ist angesagt? (20)

The Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on LinuxThe Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on Linux
 
Real time Linux
Real time LinuxReal time Linux
Real time Linux
 
Kernel Recipes 2016 - kernelci.org: 1.5 million kernel boots (and counting)
Kernel Recipes 2016 - kernelci.org: 1.5 million kernel boots (and counting)Kernel Recipes 2016 - kernelci.org: 1.5 million kernel boots (and counting)
Kernel Recipes 2016 - kernelci.org: 1.5 million kernel boots (and counting)
 
Rt linux-lab1
Rt linux-lab1Rt linux-lab1
Rt linux-lab1
 
Operating System
Operating SystemOperating System
Operating System
 
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementation
 
RT linux
RT linuxRT linux
RT linux
 
SFO15-302: Energy Aware Scheduling: Progress Update
SFO15-302: Energy Aware Scheduling: Progress UpdateSFO15-302: Energy Aware Scheduling: Progress Update
SFO15-302: Energy Aware Scheduling: Progress Update
 
Ch4 threads
Ch4 threadsCh4 threads
Ch4 threads
 
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
 
RTOS - Real Time Operating Systems
RTOS - Real Time Operating SystemsRTOS - Real Time Operating Systems
RTOS - Real Time Operating Systems
 
Comparision of scheduling algorithms
Comparision of scheduling algorithmsComparision of scheduling algorithms
Comparision of scheduling algorithms
 
Let’s Fix Logging Once and for All
Let’s Fix Logging Once and for AllLet’s Fix Logging Once and for All
Let’s Fix Logging Once and for All
 
gcma: guaranteed contiguous memory allocator
gcma:  guaranteed contiguous memory allocatorgcma:  guaranteed contiguous memory allocator
gcma: guaranteed contiguous memory allocator
 
QEMU-SystemC (FDL)
QEMU-SystemC (FDL)QEMU-SystemC (FDL)
QEMU-SystemC (FDL)
 
Real time operating system
Real time operating systemReal time operating system
Real time operating system
 
Os rtos.ppt
Os rtos.pptOs rtos.ppt
Os rtos.ppt
 
Rtos presentation
Rtos presentationRtos presentation
Rtos presentation
 
The survey on real time operating systems (1)
The survey on real time operating systems (1)The survey on real time operating systems (1)
The survey on real time operating systems (1)
 
BeRTOS: Free Embedded RTOS
BeRTOS: Free Embedded RTOSBeRTOS: Free Embedded RTOS
BeRTOS: Free Embedded RTOS
 

Ähnlich wie RTDroid_Presentation

Testing real-time Linux. What to test and how
Testing real-time Linux. What to test and how Testing real-time Linux. What to test and how
Testing real-time Linux. What to test and how Chirag Jog
 
Four Ways to Improve Linux Performance IEEE Webinar, R2.0
Four Ways to Improve Linux Performance IEEE Webinar, R2.0Four Ways to Improve Linux Performance IEEE Webinar, R2.0
Four Ways to Improve Linux Performance IEEE Webinar, R2.0Michael Christofferson
 
淺談 Live patching technology
淺談 Live patching technology淺談 Live patching technology
淺談 Live patching technologySZ Lin
 
Introduction to Real-Time Operating Systems
Introduction to Real-Time Operating SystemsIntroduction to Real-Time Operating Systems
Introduction to Real-Time Operating Systemscoolmirza143
 
Chapter 19 - Real Time Systems
Chapter 19 - Real Time SystemsChapter 19 - Real Time Systems
Chapter 19 - Real Time SystemsWayne Jones Jnr
 
Fast boot
Fast bootFast boot
Fast bootSZ Lin
 
Your Linux AMI: Optimization and Performance (CPN302) | AWS re:Invent 2013
Your Linux AMI: Optimization and Performance (CPN302) | AWS re:Invent 2013Your Linux AMI: Optimization and Performance (CPN302) | AWS re:Invent 2013
Your Linux AMI: Optimization and Performance (CPN302) | AWS re:Invent 2013Amazon Web Services
 
Tuning systemd for embedded
Tuning systemd for embeddedTuning systemd for embedded
Tuning systemd for embeddedAlison Chaiken
 
Embedded Intro India05
Embedded Intro India05Embedded Intro India05
Embedded Intro India05Rajesh Gupta
 
An Essential Relationship between Real-time and Resource Partitioning
An Essential Relationship between Real-time and Resource PartitioningAn Essential Relationship between Real-time and Resource Partitioning
An Essential Relationship between Real-time and Resource PartitioningYoshitake Kobayashi
 
Systemd for developers
Systemd for developersSystemd for developers
Systemd for developersAlison Chaiken
 

Ähnlich wie RTDroid_Presentation (20)

Testing real-time Linux. What to test and how
Testing real-time Linux. What to test and how Testing real-time Linux. What to test and how
Testing real-time Linux. What to test and how
 
Four Ways to Improve Linux Performance IEEE Webinar, R2.0
Four Ways to Improve Linux Performance IEEE Webinar, R2.0Four Ways to Improve Linux Performance IEEE Webinar, R2.0
Four Ways to Improve Linux Performance IEEE Webinar, R2.0
 
Cat @ scale
Cat @ scaleCat @ scale
Cat @ scale
 
Linux scheduler
Linux schedulerLinux scheduler
Linux scheduler
 
淺談 Live patching technology
淺談 Live patching technology淺談 Live patching technology
淺談 Live patching technology
 
FreeRTOS introduction
FreeRTOS introductionFreeRTOS introduction
FreeRTOS introduction
 
Introduction to Real-Time Operating Systems
Introduction to Real-Time Operating SystemsIntroduction to Real-Time Operating Systems
Introduction to Real-Time Operating Systems
 
Chapter 19 - Real Time Systems
Chapter 19 - Real Time SystemsChapter 19 - Real Time Systems
Chapter 19 - Real Time Systems
 
Rtos 2
Rtos 2Rtos 2
Rtos 2
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systems
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Fast boot
Fast bootFast boot
Fast boot
 
Your Linux AMI: Optimization and Performance (CPN302) | AWS re:Invent 2013
Your Linux AMI: Optimization and Performance (CPN302) | AWS re:Invent 2013Your Linux AMI: Optimization and Performance (CPN302) | AWS re:Invent 2013
Your Linux AMI: Optimization and Performance (CPN302) | AWS re:Invent 2013
 
2337610
23376102337610
2337610
 
Tuning systemd for embedded
Tuning systemd for embeddedTuning systemd for embedded
Tuning systemd for embedded
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Embedded Intro India05
Embedded Intro India05Embedded Intro India05
Embedded Intro India05
 
An Essential Relationship between Real-time and Resource Partitioning
An Essential Relationship between Real-time and Resource PartitioningAn Essential Relationship between Real-time and Resource Partitioning
An Essential Relationship between Real-time and Resource Partitioning
 
Rtos 8051
Rtos 8051Rtos 8051
Rtos 8051
 
Systemd for developers
Systemd for developersSystemd for developers
Systemd for developers
 

RTDroid_Presentation

  • 2. A system is said to be real-time if the total correctness of an operation depends not only upon its logical correctness, but also upon the time in which it is performed. What is a Real-Time System?
  • 3. Hard – missing a deadline is a total system failure. Types of Real-Time Systems Soft – the usefulness of a result degrades after its deadline, thereby degrading the system's quality of service.
  • 4. How to make Android Real-Time?
  • 8. How to make Linux kernel Hard Real-Time?
  • 9. PREEMPT_RT patch ●Implementation of Concurrent Worker Queues. ●spinlock_t and rwlock_t : In RT linux, they are preemptible. Therefore ensuring that critical sections are preemptible. It’s also possible to create non-preemptible versions using raw_spinlock_t ●Converting interrupt handlers into preemptible kernel threads. ●Implement priority-inheritance for in-kernel spinlocks and semaphores to avoid priority inversion. Default linux doesn’t support it.
  • 10. DragonBoard: -Qualcomm Snapdragon 800 (APQ8074 based) board
  • 11. Challenges RT Patch that we used was generated on mainline linux codebase (Codebase1) Patch to be applied on Dragonboard kernel with SoC specific changes (Codebase2) Plus the codebase2 has Android modifications on linux kernel Plus the codebase2 backported some changes from linux 3.6 to linux 3.4 Merge Conflict
  • 12. Challenges post solving merge conflicts Adding changes introduced by RT patch to SoC specific drivers. For example: GPU driver (msm_kgsl) Fixing any build errors for various Preemption models.
  • 14. No Forced Preemption CONFIG_PREEMPT_NONE: This is the traditional Linux preemption model, geared towards throughput. It will still provide good latencies most of the time, but there are no guarantees and occasional longer delays are possible.
  • 15. Voluntary Kernel Preemption CONFIG_PREEMPT_VOLUNTARY: This option reduces the latency of the kernel by adding more "explicit preemption points" to the kernel code. These new preemption points have been selected to reduce the maximum latency of rescheduling, providing faster application reactions, at the cost of slightly lower throughput.
  • 16. Preemptible Kernel (Low latency) CONFIG_PREEMPT__LL: This option reduces the latency of the kernel by making all kernel code (that is not executing in a critical section) preemptible.
  • 17. Preemptible Kernel (Basic RT) CONFIG_PREEMPT_RTB: This option is basically the same as (Low-Latency Desktop) but enables changes which are preliminary for the full preemptiple RT kernel.
  • 18. Fully Preemptible Kernel (RT) CONFIG_PREEMPT_RT_FULL: All and everything is preemptible
  • 19. Performance Results on various Preemption models