CpE   Battle of the Brains
Embedded operating systems
Definition <ul><li>Embedded System is a combination of computer hardware and software, and perhaps additional mechanical o...
Requirements and Constraints <ul><li>Small to large systems, implying very different cost constraints, thus different need...
MECHANICS <ul><li>Each correct answer is worth 3 points </li></ul><ul><li>Only the first contestant who raises his/her han...
Emmanuel John A. Pascual Maria Monereeza M. Floria – Our Lady of Fatima University Ma-an Andria R. Lacierda - WCC Francis ...
What are the Applications of Embedded OS?
Applications Market Embedded Device Automotive Ignition systems Engine control Brake system Consumer electronics Cameras T...
Applications Medical Infusion pumps Cardiac monitors Dialysis machines Office automation Fax machine  Printer Scanners
SCORE TABLE EZA MAAN ARGEL SUAISO 3 0 0 0
What are the CHARACTERISTICS of Embedded OS?
Characteristics of E.Os  <ul><li>Direct use of interrupts </li></ul><ul><li>There are three (3) reasons why it is possible...
Characteristics of E.Os  <ul><li>I/O  device flexibility </li></ul><ul><li>There is virtually no device that needs to be s...
SCORE TABLE EZA MAAN ARGEL SUAISO 6 0 0 0
What are the APPROACHES IN THE DEVELOPMENT OF Embedded OS?
Development Approaches Advantage Disadvantage Adapting an existing commercial OS The Embedded OS derived from a commercial...
SCORE TABLE EZA MAAN ARGEL SUAISO 9 0 0 0
What iS ECOs?
ECOs <ul><li>Embedded Configurable Operating System is an open source, royalty-free, real-time OS. Intended for embedded a...
SCORE TABLE EZA MAAN ARGEL SUAISO 9 3 0 0
HOW DOES CONFIGURABILITY MEAN IN TERMS OF EOS?
Configurability <ul><li>An embedded system OS that is flexible enough to be used in a wide variety of embedded application...
Configurability <ul><li>Loading an ECos Configuration </li></ul>GNU make utility Application Source Code GNU Cross Compile...
SCORE TABLE EZA MAAN ARGEL SUAISO 9 6 0 0
WHAT ARE THE ECOS COMPONENTS?
ECOS Components <ul><li>A key design requirement for the ECOS is portability to different architectures and platforms with...
ECOS Components User Application Code Standard C library I/O System (device drivers) Kernels Hardware abstraction layer
SCORE TABLE EZA MAAN ARGEL SUAISO 9 9 0 0
WHAT IS HAL?
Hardware Abstraction Layer <ul><li>The HAL is software that presents a consisted API to the upper layers and maps upper-la...
SCORE TABLE EZA MAAN ARGEL SUAISO 9 9 0 3
WHAT IS ECOS KERNEL?
ECOS kernel <ul><li>Kernels were designed to satisfy four (4) main objectives </li></ul><ul><li>Low interrupt latency: the...
ECOS kernel <ul><li>ECOS kernels also provide the core functionality needed for developing multi-threaded applications </l...
SCORE TABLE EZA MAAN ARGEL SUAISO 9 9 0 6
WHAT IS I/O SYSTEM?
I/O System <ul><li>The ECOS I/O system is a framework for supporting device drivers. A variety of drivers for a variety of...
I/O System <ul><li>Device drivers and other higher-layer software may be implemented directly on the HAL if this is approp...
SCORE TABLE EZA MAAN ARGEL SUAISO 9 9 0 9
WHAT ARE STANDARD C LIBRARIES?
Standard C Libraries <ul><li>A complete standard C run-time is provided. Also included is a complete math run time library...
SCORE TABLE EZA MAAN ARGEL SUAISO 9 9 3 9
WHAT IS AN ECOS SCHEDULER?
ECOS Scheduler <ul><li>Bitmap Scheduler </li></ul><ul><li>a bitmap scheduler supports multiple priority levels but only  1...
ECOS Scheduler <ul><li>Multi-queue scheduler </li></ul><ul><li>The multi-queue scheduler is appropriate if the number of t...
SCORE TABLE EZA MAAN ARGEL SUAISO 9 9 6 9
WHAT IS ECOS THREAD Synchronization?
ECOs Thread Synchronization <ul><li>Mutexes </li></ul><ul><li>the mutex (mutual exclusion lock) is used to enforce mutuall...
ECOs Thread Synchronization <ul><li>Semaphores </li></ul><ul><li>counting semaphores are suited to enabling threads to wai...
ECOs Thread Synchronization <ul><li>Conditional Codes </li></ul><ul><li>a conditional variable is used to block a thread u...
ECOs Thread Synchronization <ul><li>Mailboxes </li></ul><ul><li>also called message boxes are an ECOs synchronization mech...
SCORE TABLE EZA MAAN ARGEL SUAISO 9 9 9 9
Tiebreaker Question: 1 point  WHAT IS ECOS TINY OS?
TinyOS <ul><li>  </li></ul><ul><li>The ECOS system provides a more streamlined approach for an embedded OS than one based ...
SCORE TABLE CONGRATULATIONS TIPQC! EZA MAAN ARGEL SUAISO 9 9 10 9
Wireless Sensor Networks <ul><li>TINYOS was developed primarily for use with networks of small wireless sensor. A number o...
Tiny OS Goals <ul><li>Allow high concurrency </li></ul><ul><li>in a typical wireless sensor network application, the devic...
Tiny OS Goals <ul><li>Adapt to hardware evolution </li></ul><ul><li>should be possible  to upgrade the hardware with littl...
Tiny OS Goals <ul><li>Support a diverse set of platforms </li></ul><ul><li>as with preceding point, a general-purpose embe...
TINYOS Components <ul><li>An embedded software system built using TINYOS consists of a set of small modules called compone...
TINYOS Components <ul><li>The meet the demanding software requirement of this application, rigid, simplified software arch...
TINYOS Scheduler <ul><li>The TINYOS scheduler operates across all components. Virtually all embedded systems using TINYOS ...
TINYOS resource Interface <ul><li>Provides a simple but powerful set of conventions for dealing with resources. Three (3) ...
TINYOS resource Interface <ul><li>The shared resource configuration provides the following interfaces to a client: </li></...
TINYOS resource Interface <ul><li>Resources Configure: this interface allows a resource to be automatically configured jus...
THE END THANK YOU VERY MUCH!
Upcoming SlideShare
Loading in …5
×

Embedded os

1,996 views

Published on

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,996
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
65
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Embedded os

  1. 1. CpE Battle of the Brains
  2. 2. Embedded operating systems
  3. 3. Definition <ul><li>Embedded System is a combination of computer hardware and software, and perhaps additional mechanical or other parts, designed to perform a dedicated function. In many cases, embedded systems are part of a larger system or product, as in the case of an antilock braking system in a car. </li></ul>
  4. 4. Requirements and Constraints <ul><li>Small to large systems, implying very different cost constraints, thus different needs for optimization and reuse </li></ul><ul><li>Relaxed to very strict requirements and combinations of different quality requirements. </li></ul><ul><li>Short to long life times </li></ul><ul><li>Different environmental conditions. </li></ul><ul><li>Different application characteristics resulting in static dynamic loads, slow to fast speed, compute versus interface intensive tasks and/or combinations </li></ul><ul><li>Different models of computations ranging from discrete-event systems to those involving continuous time dynamics </li></ul>
  5. 5. MECHANICS <ul><li>Each correct answer is worth 3 points </li></ul><ul><li>Only the first contestant who raises his/her hands has the right to answer the question </li></ul><ul><li>Questions can be answered after the game master says “GO” </li></ul><ul><li>A tie breaker question worth 1 point is required if more than one contestant has the highest point total </li></ul><ul><li>The highest point total wins the game </li></ul>
  6. 6. Emmanuel John A. Pascual Maria Monereeza M. Floria – Our Lady of Fatima University Ma-an Andria R. Lacierda - WCC Francis Argel D. Gonzales - TIPQC Heherson Q. Suaiso - ACCESS GAME MASTER COntestants
  7. 7. What are the Applications of Embedded OS?
  8. 8. Applications Market Embedded Device Automotive Ignition systems Engine control Brake system Consumer electronics Cameras Toys/Games Telephones/Cell Phones/Pagers Industrial control Robotics Sensors
  9. 9. Applications Medical Infusion pumps Cardiac monitors Dialysis machines Office automation Fax machine Printer Scanners
  10. 10. SCORE TABLE EZA MAAN ARGEL SUAISO 3 0 0 0
  11. 11. What are the CHARACTERISTICS of Embedded OS?
  12. 12. Characteristics of E.Os <ul><li>Direct use of interrupts </li></ul><ul><li>There are three (3) reasons why it is possible to let interrupts directly start or stop tasks. </li></ul><ul><li>Embedded systems can be considered to be thoroughly tested. </li></ul><ul><li>Protection is not necessary </li></ul><ul><li>Efficient control over a variety of devices is required </li></ul>
  13. 13. Characteristics of E.Os <ul><li>I/O device flexibility </li></ul><ul><li>There is virtually no device that needs to be supported by all versions of the OS, and the range of I/O device in large. </li></ul><ul><li>Streamlined protection mechanisms </li></ul><ul><li>Embedded systems are typically designed for a limited, well-defined functionality. After the software has been configured and tested. It can be assumed to be reliable. Thus, apart from security measures, embedded systems have limited protection mechanisms. </li></ul>
  14. 14. SCORE TABLE EZA MAAN ARGEL SUAISO 6 0 0 0
  15. 15. What are the APPROACHES IN THE DEVELOPMENT OF Embedded OS?
  16. 16. Development Approaches Advantage Disadvantage Adapting an existing commercial OS The Embedded OS derived from a commercial general-purpose OS is based on a set of familiar interfaces. The OS is not optimized for real-time and embedded applications. Purpose-Built Embedded OS (Ecos and Tiny Os) Purposely designed for tasks requiring predictable operation over fast operations, necessitating different design decisions, particularly in the area of task scheduling. Must be designed from the ground up for embedded applications
  17. 17. SCORE TABLE EZA MAAN ARGEL SUAISO 9 0 0 0
  18. 18. What iS ECOs?
  19. 19. ECOs <ul><li>Embedded Configurable Operating System is an open source, royalty-free, real-time OS. Intended for embedded applications. </li></ul><ul><li>A system targeting at high performance small embedded systems. For such systems, an embedded form of Linux and other commercial Os would not provide the streamlined software required. </li></ul>
  20. 20. SCORE TABLE EZA MAAN ARGEL SUAISO 9 3 0 0
  21. 21. HOW DOES CONFIGURABILITY MEAN IN TERMS OF EOS?
  22. 22. Configurability <ul><li>An embedded system OS that is flexible enough to be used in a wide variety of embedded application and on a wide variety of embedded platforms must provide more functionality than will be needed for any particular application and platform. </li></ul><ul><li>Configuration tool </li></ul><ul><li>Is used to configure the ECos package to run on the target embedded system. (running on windows or Linux). </li></ul>
  23. 23. Configurability <ul><li>Loading an ECos Configuration </li></ul>GNU make utility Application Source Code GNU Cross Compiler GNU Linker Executable file <ul><li>ECOs kernel libraries </li></ul><ul><li>Target architecture libraries </li></ul>
  24. 24. SCORE TABLE EZA MAAN ARGEL SUAISO 9 6 0 0
  25. 25. WHAT ARE THE ECOS COMPONENTS?
  26. 26. ECOS Components <ul><li>A key design requirement for the ECOS is portability to different architectures and platforms with minimal effort. Main components are as follows: </li></ul><ul><li>User application code </li></ul><ul><li>Standard C library </li></ul><ul><li>I/O system (device drivers) </li></ul><ul><li>Kernels </li></ul><ul><li>Hardware abstraction layer </li></ul>
  27. 27. ECOS Components User Application Code Standard C library I/O System (device drivers) Kernels Hardware abstraction layer
  28. 28. SCORE TABLE EZA MAAN ARGEL SUAISO 9 9 0 0
  29. 29. WHAT IS HAL?
  30. 30. Hardware Abstraction Layer <ul><li>The HAL is software that presents a consisted API to the upper layers and maps upper-layer operations onto specific hardware platform. </li></ul><ul><li>The HAL is implemented as three (3) separate modules. </li></ul><ul><li>Architecture: defines the processor type. </li></ul><ul><li>Variant: supports the features of the specific processor in the family. </li></ul><ul><li>Platform: extends the HAL support to tightly coupled peripherals like interrupt controllers and time devices. </li></ul>
  31. 31. SCORE TABLE EZA MAAN ARGEL SUAISO 9 9 0 3
  32. 32. WHAT IS ECOS KERNEL?
  33. 33. ECOS kernel <ul><li>Kernels were designed to satisfy four (4) main objectives </li></ul><ul><li>Low interrupt latency: the time it takes to respond to an interrupt and begin execute an ISR </li></ul><ul><li>Low task switching latency: the time it takes from when a thread becomes available to when actual execution begins. </li></ul><ul><li>Small memory footprint memory resources for both program and data are kept to a minimum by allowing components to configure memory needed. </li></ul><ul><li>Deterministic behavior: throughout all the aspect of execution. The kernel performance must be predictable and bounded to meet real-time application requirements. </li></ul>
  34. 34. ECOS kernel <ul><li>ECOS kernels also provide the core functionality needed for developing multi-threaded applications </li></ul><ul><li>The ability to add/create new threads in the system </li></ul><ul><li>Control over various threads in the system </li></ul><ul><li>A choice of scheduler, determining which thread should currently be running </li></ul><ul><li>A range of synchronization primitives, allowing thread interaction </li></ul><ul><li>Integration with the system’s support for interrupts and exceptions </li></ul>
  35. 35. SCORE TABLE EZA MAAN ARGEL SUAISO 9 9 0 6
  36. 36. WHAT IS I/O SYSTEM?
  37. 37. I/O System <ul><li>The ECOS I/O system is a framework for supporting device drivers. A variety of drivers for a variety of platform are provided in the ECOS configuration package. These include drivers for serial devices, Ethernet, flash memory interfaces, and various I/O interconnects such as PCI (peripheral component interface) and USB (universal serial bus). </li></ul>
  38. 38. I/O System <ul><li>Device drivers and other higher-layer software may be implemented directly on the HAL if this is appropriate. If specialized kernel type functions are needed, then the device driver is implemented using kernel APIs. The kernel provides a three-level interrupt model. </li></ul><ul><li>Interrupt service routines (ISR): invoked response to a hardware interrupt. Hardware interrupts are delivered with minimal intervention to an ISR. </li></ul><ul><li>Deferred service routines (DSR): invoked in response to a request by an ISR. DSR will run when it is safe to do so without interfering with the scheduler. </li></ul><ul><li>Threads: the client to the driver. Threads are able to make all API (Application Programming Interface) calls and in particular are allowed to wait on mutexes and conditional variables. </li></ul>
  39. 39. SCORE TABLE EZA MAAN ARGEL SUAISO 9 9 0 9
  40. 40. WHAT ARE STANDARD C LIBRARIES?
  41. 41. Standard C Libraries <ul><li>A complete standard C run-time is provided. Also included is a complete math run time library for high-level mathematic functions, including a complete IEEE-754 floating-point library for those platforms without hardware floating points. </li></ul>
  42. 42. SCORE TABLE EZA MAAN ARGEL SUAISO 9 9 3 9
  43. 43. WHAT IS AN ECOS SCHEDULER?
  44. 44. ECOS Scheduler <ul><li>Bitmap Scheduler </li></ul><ul><li>a bitmap scheduler supports multiple priority levels but only 1 thread can exist at each priority level at a given time . </li></ul><ul><li>Description: </li></ul><ul><li>because there is only 1 thread, at most, at each priority level, the scheduler does not have to make a decision as to which thread at a given priority level should be dispatched next. </li></ul>
  45. 45. ECOS Scheduler <ul><li>Multi-queue scheduler </li></ul><ul><li>The multi-queue scheduler is appropriate if the number of threads is dynamic or if the desirable to have multiple threads at the same priority level. The multilevel scheduler is also needed if time slicing is needed. </li></ul>
  46. 46. SCORE TABLE EZA MAAN ARGEL SUAISO 9 9 6 9
  47. 47. WHAT IS ECOS THREAD Synchronization?
  48. 48. ECOs Thread Synchronization <ul><li>Mutexes </li></ul><ul><li>the mutex (mutual exclusion lock) is used to enforce mutually exclusive access to a resource. Allowing only 1 thread at a time to gain access. </li></ul><ul><li>Has 2 states: locked and unlocked. When a mutex is locked by 1 thread, any other thread attempting to lock the mutex is blocked; when the mutex is unlocked. Then one of the threads blocked on this mutex is unblocked and allowed to lock the mutex and gain access on the resource. </li></ul>
  49. 49. ECOs Thread Synchronization <ul><li>Semaphores </li></ul><ul><li>counting semaphores are suited to enabling threads to wait until an event has occurred. The event may be generated by a producer thread. Or by a DSR in response to a hardware interrupt. </li></ul><ul><li>Description </li></ul><ul><li>If counter is ZERO, an attempt by a consumer thread to wait on the semaphore will block until some other thread or a DSR post a new event to the semaphore </li></ul><ul><li>If counter is greater than ZERO then an attempt to wait on the semaphore will consume one event. </li></ul>
  50. 50. ECOs Thread Synchronization <ul><li>Conditional Codes </li></ul><ul><li>a conditional variable is used to block a thread until a particular condition is TRUE. Condition variables are used with mutexes to allow multiple thread to access shared data. They can be used to implement monitors of the type in ECOs. </li></ul><ul><li>Event Flags </li></ul><ul><li>is a 32-bit word used as a synchronization mechanism. Application code may associate a different event with each bit on the flag. A thread can wait for either a single event or a combination of events by checking 1 or multiple bits in a corresponding flag. </li></ul>
  51. 51. ECOs Thread Synchronization <ul><li>Mailboxes </li></ul><ul><li>also called message boxes are an ECOs synchronization mechanism that provides a means for 2 threads to exchange information. Can be configured for blocking/non-blocking on both the send and receive side. </li></ul><ul><li>Spinlocks </li></ul><ul><li>A spinlock is a flag that a thread can check before executing a particular piece of code. Basically, only 1 thread at a time can acquire a spinlock. Any other thread attempting to acquire the same lock will keep trying (spinning) until it can acquire a lock. </li></ul>
  52. 52. SCORE TABLE EZA MAAN ARGEL SUAISO 9 9 9 9
  53. 53. Tiebreaker Question: 1 point WHAT IS ECOS TINY OS?
  54. 54. TinyOS <ul><li>  </li></ul><ul><li>The ECOS system provides a more streamlined approach for an embedded OS than one based on a commercial general-purpose OS. Such as an embedded version of the LINUX, thus ECOS and similar system are better suited for small embedded system with tight requirement on memory, processing -time, real-time response, power consumption, and so on. TINYOS takes the process of streamlining in much a further point, resulting in a very minimal OS for embedded systems. </li></ul>
  55. 55. SCORE TABLE CONGRATULATIONS TIPQC! EZA MAAN ARGEL SUAISO 9 9 10 9
  56. 56. Wireless Sensor Networks <ul><li>TINYOS was developed primarily for use with networks of small wireless sensor. A number of treads have enabled the development of extremely compact, low-power sensors. The well-known Moore’s law continuous to drive down the size of memory and processing logic elements. Smaller size in turn reduces power consumption. Low power and small size treads are also evident in wireless communication hardware, micro-electrical sensors (MEMS) and transducers. </li></ul>
  57. 57. Tiny OS Goals <ul><li>Allow high concurrency </li></ul><ul><li>in a typical wireless sensor network application, the devices are concurrency intensive. Several different flow of data must be kept moving simultaneously. </li></ul><ul><li>Operate with limited resources </li></ul><ul><li>the target platform for Tiny OS will have limited memory and computational resources and run on batteries or solar power. </li></ul>
  58. 58. Tiny OS Goals <ul><li>Adapt to hardware evolution </li></ul><ul><li>should be possible to upgrade the hardware with little or no software change, if the functionality is the same. </li></ul><ul><li>Support a wide range of applications </li></ul><ul><li>applications exhibit a wide range of requirements in terms of lifetimes, communication, sensing and so on. </li></ul>
  59. 59. Tiny OS Goals <ul><li>Support a diverse set of platforms </li></ul><ul><li>as with preceding point, a general-purpose embedded OS is desirable. </li></ul><ul><li>Be robust </li></ul><ul><li>once deployed, a sensor network must run unattended for months or years. Ideally, there should be redundancy both within a single system and across the network of sensors. </li></ul>
  60. 60. TINYOS Components <ul><li>An embedded software system built using TINYOS consists of a set of small modules called components, each of which performs a simple task or set of tasks and which interface with each other and with hardware is limited and well-defined ways. The other software module is the scheduler. And because the TINYOS doesn’t utilize kernels, there is no actual OS. But we can take the following view. The application area of interest is the wireless sensor network (WSN). </li></ul>
  61. 61. TINYOS Components <ul><li>The meet the demanding software requirement of this application, rigid, simplified software architecture is dedicated, consisting of components. The TINYOS development community has implemented a number of open-source components that provide the basic functions needed for the WSN application. </li></ul>
  62. 62. TINYOS Scheduler <ul><li>The TINYOS scheduler operates across all components. Virtually all embedded systems using TINYOS will be uni-processor systems, so that only one task among all the tasks in all the components may execute at a time. The scheduler is a separate component. It is the only portion of TINYOS that must be present in any system. </li></ul>
  63. 63. TINYOS resource Interface <ul><li>Provides a simple but powerful set of conventions for dealing with resources. Three (3) abstractions for resources are used in TINYOS. </li></ul><ul><li>Dedicated: a resource that a subsystem needs exclusive access at all times </li></ul><ul><li>Virtualized: the virtualized abstraction may be used when the underlying resource need not be protected by mutual exclusion. </li></ul><ul><li>Shared: the shared resource abstraction provides access to a dedicated resource through an arbiter component. The arbiter enforces mutual conclusion allowing only the user at a time to have access to a resource and enabling the client to lock the resource. </li></ul>
  64. 64. TINYOS resource Interface <ul><li>The shared resource configuration provides the following interfaces to a client: </li></ul><ul><li>Resource: the client issues a request at this interface requesting access to the resource. </li></ul><ul><li>Resource Requested: this is similar to the resource interface. In this case, the client is able to hold onto a resource until the client is notified that someone else needs the resource. </li></ul>
  65. 65. TINYOS resource Interface <ul><li>Resources Configure: this interface allows a resource to be automatically configured just before a client is granted access to it. </li></ul><ul><li>Resource-Specific interfaces: once a client has access to resource, it uses resource-specific interfaces to exchange data and control information with the resource. </li></ul>
  66. 66. THE END THANK YOU VERY MUCH!

×