Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

OS Session 4 Embedded OS Slides

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 45

Emebedded Operating systems

Session 5 Slides
Learning Objectives
By the end of this session, you should be able to
▪ Understand the embedded operating systems.
Embedded Operating Systems
🠶 An embedded operating system (OS) is a specialized operating system designed to perform a
specific task for a device that is not a computer. 
🠶 As the name suggests Embedded Operating System is an Embedded System’s Operating
System.
🠶 It has limited features. It is usually designed for some particular operations to control an
electronic device. For instance, all mobile phones essentially consist of an operating system that
always boots up when the mobile phone is in running condition.
🠶 It controls all the features and basic interface of the mobile phone
🠶 An embedded operating system’s main job is to run the code that allows the device to do its job. 
🠶 The embedded OS also makes the device’s hardware accessible to the software that is running
on top of the OS.
🠶 An embedded system is a computer that supports a machine.
🠶 Examples include computers in cars, traffic lights, digital televisions, ATMs, airplane controls,
point of sale terminals, digital cameras, GPS navigation systems, elevators, digital media
receivers and among many other possibilities.
Embedded Operating Systems
🠶 There are two different kinds of operating system, either general purpose
operating system that is modified in such a way that it runs on top of a device
or the operating system can be custom written.
🠶 The approaches for the design of operating system include that either we take
embedded Operating System that is existing and adapt it to our embedded
application or we can design and use a new operating system that is
particularly for our Embedded System.
🠶 We can adapt the existing Operating System to our embedded application by
streamline operation, real-time capability and be adding other necessary
functions.
🠶 The advantage of this approach that it has a familiar interface and its
disadvantage is that it is not optimized for real-time
Embedded Operating Systems
🠶 An embedded system is a combination of hardware and software with some
attached peripherals to perform a specific task or a narrow range of tasks with
restricted resources. It is an electronic system that is not directly programmed
by the user, unlike a personal computer.
🠶 An embedded system is a device that incorporates a computer within its
implementation, primarily as a means to simplify the system design, and to
provide flexibility; and the user of the device is not even aware that a
computer is present. It is a microcontroller-based, softwaredriven, reliable,
real time control system,.
🠶 Autonomous or human or network interactive, operating on diverse physical
variables and in diverse environments, and sold in a competitive and cost
conscious market.
🠶 Generally, an embedded system is a subsystem in ~ larger system and it is
application specific
Embedded Operating Systems
🠶 Every embedded system consists of certain input devices such as: key boards,
switches, sensors, actuators; output devices such as: displays, buzzers, sensors;
processor along with a control program embedded in the off-chip or on-chip
memory, and a real time operating system (RTOS).
Embedded Operating Systems
🠶 A specialized computer system. That is part of a larger system or machine.
🠶 Typically, an embedded system is housed on a single microprocessor board
with the programs stored in ROM.
🠶 Virtually all appliances that have a digital Interface -- watches, microwaves,
VCRs, cars -- utilize embedded systems.
🠶 Some embedded systems include an operating system, but many are so
specialized that the entire logic can be implemented as a single program.
🠶 Embedded systems programming is the development of programs intended to
be part of a larger operating system or, in a somewhat different usage, to be
incorporated on a microprocessor that can then be included as part of a variety
of hardware devices. S.
Characteristics of an Embedded System
🠶 The important characteristics of an embedded system are
🠶 Speed (bytes/sec) : Should be high speed
🠶 Power (watts) :Low power dissipation
🠶 Size and weight : As far as possible small in size and low weight
🠶 Accuracy (% error) : Must be very accurate
🠶 Adaptability: High adaptability and accessibility.
🠶 Reliability: Must be reliable over a long period of time.
🠶 So, an embedded system must perform the operations at a high speed so that it
can be readily used for real time applications and its power consumption must
be very low and the size of the system should be as for as possible small and
the readings must be accurate with minimum error.
🠶 The system must be easily adaptable for different situations.
Categories of Embedded systems:
🠶 Embedded systems can be classified into the following 4 categories based on
their functional and performance requirements.
Classification based on performance and
their functional requirements.
🠶 Stand-alone Embedded systems:
🠶 A stand-alone embedded system works by itself.
🠶 It is a self-contained device which does not require any host system like a
computer.
🠶 It takes either digital or analog inputs from its input ports, calibrates, converts,
and processes the data, and outputs the resulting data to its attached output
device, which either displays data, or controls and drives the attached devices.
🠶 EX: Temperature measurement systems, Video game consoles, MP3 players,
digital cameras, and microwave ovens are the examples for this category.
Categories of Embedded systems:
🠶 Real-time embedded systems:
🠶 An embedded system which gives the required output in a specified time or
which strictly follows the time deadlines for completion of a task is known as
a Real time system i.e. a Real Time system, in addition to functional
correctness, also satisfies the time constraints .
🠶 There are two types of Real time systems. (i) Soft real time system and (ii)
Hard real time system.
🠶 Soft Real-Time system: A Real time system in which, the violation of time
constraints will cause only the degraded quality, but the system can continue
to operate is known as a Soft real time system.
🠶 In soft real-time systems, the design focus is to offer a guaranteed bandwidth
to each real-time task and to distribute the resources to the tasks.
🠶 Ex: A Microwave Oven, washing machine, TV remote etc.
Categories of Embedded systems:
🠶 Hard Real-Time system:
🠶 A Real time system in which, the violation of time constraints will cause
critical failure and loss of life or property damage or catastrophe is known as a
Hard Real time system.
🠶 These systems usually interact directly with physical hardware instead of
through a human being .
🠶 The hardware and software of hard real-time systems must allow a worst case
execution (WCET) analysis that guarantees the execution be completed within
a strict deadline.
🠶 The chip selection and RTOS selection become important factors for hard real-
time system design
🠶 Ex: Deadline in a missile control embedded system , Delayed alarm during a
Gas leakage , car airbag control system
Categories of Embedded systems:
🠶 Networked embedded systems:
🠶 The networked embedded systems are related to a network with network
interfaces to access the resources. The connected network can be a Local Area
Network (LAN) or a Wide Area Network (WAN), or the Internet.
🠶 The connection can be either wired or wireless. The networked embedded
system is the fastest growing area in embedded systems applications.
🠶 The embedded web server is such a system where all embedded devices are
connected to a web server and can be accessed and controlled by any web
browser.
🠶 Ex: A home security system is an example of a LAN networked embedded
system where all sensors (e.g. motion detectors, light sensors, or smoke
sensors) are wired and running on the TCP/IP protocol.
Categories of Embedded systems:
🠶 Mobile Embedded systems:
🠶 The portable embedded devices like mobile and cellular phones, digital
cameras, MP3 players, PDA (Personal Digital Assistants) are the example for
mobile embedded systems.
🠶 The basic limitation of these devices is the limitation of memory and other
resources
Classifications of Embedded systems
🠶 Based on the performance of the Microcontroller they are also classified into
(i) Small scaled embedded system (ii) Medium scaled embedded system and
(iii) Large scaled embedded system.
🠶 Microcontrollers They run one specific program and are dedicated to a single
task.
🠶 They are low power devices with dedicated input devices and small LED or
LCD display outputs. 
🠶 Microcontrollers can take inputs from the device they controlling and retain
control by sending the device signals to different parts of the device
Small Scale Embedded Systems:
🠶 These systems are designed with a single 8- or 16- bit microcontroller; they
have little hardware and software complexities and involve board- level
design. They may even be battery operated.
🠶 When developing embedded software for these, an editor, assembler and cross
assembler, specific to the microcontroller or processor used, are the main
programming tools.
🠶 Usually, C used for developing these systems. C program compilation is done
into the assembly, and executable codes are then appropriately located in the
system memory.
🠶 The software has to fit within the memory available and keep in view the
need to limit power dissipation when system is running continuously
🠶 Examples: the digital wristwatch, mp3 player, Automatic Door Lock
🠶 , calculator
Medium Scale Embedded Systems
🠶 Systems that are designed using 16-bit to 32-bit microcontrollers fall under
this category.
🠶 They may also have multiple such microcontrollers.
🠶 The hardware as well as software complexity of such systems is very high.
They mostly have an operating system besides the applications required.
🠶 The RTOS (Real Time Operating System) is used in such systems. These
systems may also employ some ASSP processors to implement: special task if
any.
🠶 Various examples of medium scale embedded systems are routers for
networking, ATM (is. Automated Teller Machine for bank transactional
machines etc.
Sophisticated Embedded Systems:
🠶 Sophisticated embedded systems have enormous hardware and software
complexities and may need scalable processors or configurable processors and
programmable logic arrays.
🠶 They are used for cutting edge applications that need hardware and software
co-design and integration in the final system; however, they are constrained
by the processing speeds available in their hardware units
🠶 These systems are used for cutting edge applications like smart phones,
multimedia systems etc.
Host and Target machine
🠶 An embedded system is a special-purpose system in which the computer is
completely encapsulated by the device it controls.
🠶 Each embedded system has unique characteristics.
🠶 The components and functions of hardware and software can be different for each
system.
🠶 Nowadays, embedded software is used in all the electronic devices such as
watches, cellular phones etc.
🠶 This embedded software is similar to general programming. But the embedded
hardware is unique.
🠶 The method of communication between interfaces can vary from processor to
processor. It leads to more complexity of software.
🠶 Engineers need to be aware of the software developing process and tools. There are
a lot of things that software development tools can do automatically when the
target platform is well defined
Host and Target machine
🠶 Embedded software development tools can rarely make assumptions
about the target platform.
🠶 Hence the user has to provide some explicit instructions of the system to
the tools.
🠶 The following diagram shows how an embedded system is developed using a
host and a target machine.
Host and Target machine
Embedded Applications
🠶 Embedded systems used in various applications are listed in Table.
🠶 It shows that embedded systems have rapidly emerged as important computing
discipline because of the technology convergence in computers, consumer
electronics, communications, entertainment etc.
🠶 Further, new applications in medical electronics, mobile communications etc.,
are being continuously evolving and are being added to fulfil the ever growing
requirements of the users.
Embedded Applications
Embedded Applications
Hardware features of standalone embedded
systems
🠶 Standalone embedded system includes different types of processors, power
supply unit, clock, reset circuit, memories which are considered to be most
essential hardware components of standalone embedded systems.
🠶 A brief discussion on important features of these components are given below
Different types of processors used
🠶 Processor: A processor is the heart of the embedded system.
🠶 It is responsible for execution of instruction and controlling flow of data to
and from processor.
🠶 Designer should have proper knowledge regarding efficiency of different
types of processor and based on which one should select the appropriate
processor as per requirement.
🠶 Different types of processors available can be categorized into four broad
categories (l) General purpose processor (GPP) (2) Application specific
System processor (ASSP) (3) Multiprocessor system and (4) GPP core or ASIP
core.
Different types of processors used
🠶 General Purpose Processor (GPP) may be any one of Microprocessor,
Microcontroller, Embedded processor, Digital Signal Processor (DSP) and
Media processor.
🠶 Microprocessor is a single VLSI (Very large-scale integration) chip that has a
CPU with caches, floating point processing arithmetic unit , pipelining (is the
process of accumulating instruction from the processor through a pipeline.
🠶 It allows storing and executing instructions in an orderly process.
🠶 It is also known as pipeline processing and super scaling)
Different types of processors used
🠶 General Purpose Processor (GPP)
🠶 Microcontroller is also a single chip VLSI unit with limited computational
capability keeping all functional units /components inside the chip.
🠶 Embedded processor may be microprocessor or microcontroller when design
specially to achieve capabilities of fast context switching resulting lower
latency, atomic ALU operation with no shared data problem RISC core for fast
and precise calculations
🠶 DSP as a GPP is a single chip VLSI having computational capabilities of a
microprocessor and a multiply and Accumulate (MAC) unit(s).
🠶 DSP is an essential units of an embedded system with very large instruction
word (VLWI) processing capabilities
Different types of processors used
🠶 Application Specific System Processor (ASSP):
🠶 ASSP is dedicated for faster processing and useful for applications like real
time video processing which incorporates lots of processing before
transmitting.
🠶 It may also include some features of RTOS.
🠶 ASSP provides hardwired solution for most of its time consuming tasks
Different types of processors used
🠶 Multiprocessor System:
🠶 As embedded algorithm has to work within strict deadline, sometimes it
may not be possible to carry out the same with a single processor.
🠶 In a real time video processing number of MAC operations required may be
more than possible from one DSP unit.
🠶 In such a case an embedded system may go for two or more processors.
🠶 Similar requirement may be needed in modem cell phones which has to
perform number of tasks.
🠶 Multiprocessors are different tasks that have to be performed concurrently
Different types of processors used
🠶 Power supply unit
🠶 Generally embedded system has its own Power supply unit.
🠶 Supply should separately power the (a) External I/O driving port (b) timers
and (c) clock and reset circuits.
🠶 Clock and reset circuit should be specially designed to be free from radio
frequency inference
🠶 Embedded systems which do not have their own power supply are either
connected to an external power supply or use charge pump for necessary
power supply.
🠶 Example of first type may be Network Interface Card (NIC) and Graphics
accelerator which do not have their own power supply are connected to PC
power-supply line.
Clock Oscillator
🠶 The function of this oscillator circuit is to provide an accurate and stable
periodic clock signal to a processor.
🠶 The processor needs a clock oscillator as clock controls the various clocking
requirements of CPU.
🠶 The clocking requirements are the system timers and CPU machine cycles.
🠶 The machine cycle includes (i) Fetching code and data from memory and
Decoding and execution and (ii) Transferring results to memory.
🠶 The clock controls the time for executing an instruction.
Interrupt Handlers
🠶 A system possesses a number of devices and the system processor has to
control and handle the requirements of devices by running appropriate
Interrupt Service Routine (ISR) for each.
🠶 An interrupt handling mechanism must exist in each system to handle interrupt
from various processes in the system.
🠶 An interrupt is an event that suspends regular program operation while
the event is serviced by another program.
🠶 Interrupts increase the response speed to external events.
🠶 Different microcontrollers have different interrupt sources which can include
external, timer and serial port interrupts.
🠶 When an interrupt is received the current operation is suspended, the
interrupt is identified and the controller jumps (vectors) to an interrupt
service routine
Interrupt Handlers
🠶 There are two sources of interrupt: hardware and software.
🠶 A hardware interrupt is an electronic alerting signal sent to the processor
from an external device, like a disk controller or an external peripheral. For
example, when we press a key on the keyboard or move the mouse, they
trigger hardware interrupts which cause the processor to read the keystroke or
mouse position
🠶 Software interrupts are commands given by the programmer.
🠶 There are two different interrupt types: maskable and non-maskable.
🠶 A maskable interrupt can be disabled and enabled while non-maskable
interrupts cannot be disabled and are therefore always enabled.
🠶 Maskable interrupt is a hardware Interrupt that can be disabled or ignored by
the instructions of CPU.
🠶 Maskable interrupts help to handle lower priority tasks
Interrupt Handlers
🠶 Non-maskable interrupt (NMI) is a hardware interrupt that lacks an
associated bit-mask, therefore it can never be ignored.
🠶 It typically occurs to signal attention for non-recoverable hardware errors.
🠶 A Non-maskable interrupt is often used when response time is critical or when
an interrupt should never be disable during normal system operation.
🠶 Such uses include reporting non-recoverable hardware errors, system
debugging and profiling and handling of species cases like system resets.
Embedded Processor Architecture
🠶 Reduced Instruction Set Computer (RISC) is a type or category of the
processor,
🠶 An instruction is a command given to the processor to perform an action.
🠶 An instruction set is the entire collection of instructions for a given processor,
and the term architecture implies a particular way of building the system that
makes the processor.
🠶 RISC is perceived by many as an improvement over CISC. There is no best
architecture since different architectures can simply be better in some
scenarios but less ideal in others.  
🠶 RISC-based machines execute one instruction per clock cycle. CISC machines
can have special instructions as well as instructions that take more than one
cycle to execute
Features of Complex Instruction Set Computer (CISC):
Features of Reduced Instruction Set Computer (RISC):
Embedded System Design and Co-Design Issues in System
Development Process:

🠶 Choosing Correct OS for your Embedded Platform


🠶 Embedded system is application-oriented special computer system which is scalable on
both software and hardware.
🠶 Lots of consumer electronics have embedded CPU and thus became embedded systems.
🠶 For example, PDAs, cell phones, point-of-sale devices, VCRs, industrial robot control, or
even your toasters can be embedded system.
🠶 It can satisfy the requirement of functionality, reliability, cost, volume, and power
consumption of the particular application.
🠶 When starting a new Embedded Systems Project, the most critical move is selecting of the
Operating System (OS)
What Parameters to be considered before finalizing the OS

🠶 Responsiveness
🠶 Is your application real time? ‘Real time’ does not necessarily mean fast – it means
predictable or deterministic.
🠶 These are not absolute terms. It is a question of how predictably you need your system to
respond to events.
🠶 How critical is the timing?

🠶 Cost
🠶 A proprietary OS would increase the cost of the product.
🠶 For example, Windows Embedded compact OS require license to be paid for every product
whereas Linux is open source and free.
What Parameters to be considered before finalizing the OS

🠶 Time to Market
🠶 The time-to-market constraint in an embedded system has become especially demanding in
recent years. Introducing an embedded product to the market place at early can make a big
difference in the system's profitability.
🠶 The main contributors which affect the time-to-market constraint are design time,
product development time and testing time.
🠶 Choosing the right OS for an embedded product can greatly reduce development time and
testing time which helps launch the product in market at time and ensures quality of the
product. 
What Parameters to be considered before finalizing the OS

🠶 Networking and Connectivity


🠶 Most of the embedded products are nowadays requires a greater networking performance.
🠶 This is indeed becoming essential as connectivity is a crucial requirement almost in all the
embedded products due to Internet of Things (IoT) or machine to machine (M2M)
communication trend.
🠶 So it is very important to consider the OS that is promising most effective networking
performance.
🠶 For instance, Linux provides better performance than Windows Embedded Compact
when considering networking performance
What Parameters to be considered before finalizing the OS

🠶 Power Management
🠶 Power management is a metrics to measuring performance of an embedded system products
especially for battery operated devices.
🠶 The OS should render support for power management and could supply with various power
management techniques at different levels, say from complete system active state to suspend
state.
Homework:

🠶 Question 1
🠶 Examine the design process in embedded systems [25 marks]

🠶 Question 2
🠶 Research on any two embedded operating systems and explain how they handle the
following.
🠶 How do they manage resource sharing?
🠶 How do they manage concurrency?
🠶 How do they manage limited resources? [25 marks]
End of Session 5

You might also like