0% found this document useful (0 votes)
12 views

CH#1 - Introduction to RealTime and Embedded System

Chapter One introduces Real-Time Systems (RTS) and Embedded Systems (ES), defining RTS as systems that must respond within specific time frames and emphasizing their importance in critical applications. It outlines the characteristics, types, advantages, and disadvantages of both RTS and ES, highlighting their specialized functionalities and constraints. The chapter also discusses the basic structure of embedded systems, including processors and their types, while comparing microprocessors and microcontrollers.

Uploaded by

G/her
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

CH#1 - Introduction to RealTime and Embedded System

Chapter One introduces Real-Time Systems (RTS) and Embedded Systems (ES), defining RTS as systems that must respond within specific time frames and emphasizing their importance in critical applications. It outlines the characteristics, types, advantages, and disadvantages of both RTS and ES, highlighting their specialized functionalities and constraints. The chapter also discusses the basic structure of embedded systems, including processors and their types, while comparing microprocessors and microcontrollers.

Uploaded by

G/her
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Real Time and Embedded System CH#1 – Introduction to RT & ES By: Lecturer Abebe A.

(MSC in Computer Science)

CHAPTER ONE
Introduction to Real Time and Embedded System
Overview of System

A system is an arrangement in which all its unit assemble work together according to a set of
rules. It can also be defined as a way of working, organizing or doing one or many tasks
according to a fixed plan. For example, a watch is a time displaying system. Its components
follow a set of rules to show time. If one of its parts fails, the watch will stop working. So we can
say, in a system, all its subcomponents depend on each other.
Real-Time Systems and Embedded Systems are crucial concepts in computer science and
engineering, often used in applications where specific performance characteristics are
essential. Let’s break down each term:
Real-Time Systems
Definition: A Real-Time System is a computing system that must respond to inputs or events
within a specific time frame. The correctness of the system depends not only on the logical
correctness of the computations but also on the time at which the results are produced.

Key Characteristics:
1. Timeliness: The system must meet deadlines for processing and responding to events.
Missing a deadline can lead to failure or suboptimal performance.
2. Predictability: The system's behavior must be predictable and consistent. This is
often achieved through specialized scheduling algorithms.
3. Determinism: The system should provide consistent performance in terms of
response time and throughput under given conditions.

Types of Real-Time Systems:


 Hard Real-Time Systems: Missing deadlines can result in catastrophic
consequences. Examples include aircraft control systems and medical devices (e.g.,
pacemakers).
 Soft Real-Time Systems: Missing deadlines is undesirable but does not lead to
system failure. Examples include video streaming and online gaming.
 Firm Real-Time Systems: Missing deadlines may degrade quality but doesn’t cause
failure. Examples include multimedia systems where late data may reduce quality but
still function.

Embedded Systems
 As its name suggests, Embedded means something that is attached to another thing.
 An embedded system can be thought of as a computer hardware system having software
embedded in it.

1 Department of Computer Science | Gambella University


Real Time and Embedded System CH#1 – Introduction to RT & ES By: Lecturer Abebe A. (MSC in Computer Science)

 An embedded system can be an independent system or it can be a part of a large system.


An embedded system is a microcontroller or microprocessor based system which is
designed to perform a specific task.
 An Embedded System is a specialized computing system that is part of a larger device
and designed to perform specific functions or tasks. Unlike general-purpose computers,
embedded systems are dedicated to specific control functions and are often built into the
devices they control.

Applications:
 Consumer Electronics: Smartphones, smart TVs, home appliances.
 Automotive Systems: Engine control units, airbag systems, ABS braking systems.
 Medical Devices: Pacemakers, infusion pumps, diagnostic equipment.
 Industrial Control: PLCs (Programmable Logic Controllers), SCADA systems.

Embedded Components
An embedded system has three components: -
 It has hardware.
 It has application software.
 It has Real Time Operating system (RTOS) that supervises the application software and
provide mechanism to let the processor run a process as per scheduling by following a
plan to control the latencies. RTOS defines the way the system works. It sets the rules
during the execution of application program. A small scale embedded system may not
have RTOS.
So we can define an embedded system as a Microcontroller based, software driven, reliable,
real-time control system.

Key characteristics of an Embedded System


 Single-functioned − An embedded system usually performs a specialized operation and
does the same repeatedly. For example: A pager always functions as a pager.
 Tightly constrained − All computing systems have constraints on design metrics, but
those on an embedded system can be especially tight. Design metrics is a measure of an
implementation's features such as its cost, size, power, and performance. It must be of a
size to fit on a single chip, must perform fast enough to process data in real time and
consume minimum power to extend battery life.
 Reactive and Real time − Many embedded systems must continually react to changes in
the system's environment and must compute certain results in real time without any delay.
Consider an example of a car cruise controller; it continually monitors and reacts to speed
and brake sensors. It must compute acceleration or de-accelerations repeatedly within a
limited time; a delayed computation can result in failure to control of the car.
 Microprocessors based − It must be microprocessor or microcontroller based.
 Memory − It must have a memory, as its software usually embeds in ROM. It does not
need any secondary memories in the computer.
 Connected − It must have connected peripherals to connect input and output devices.
 HW-SW systems − Software is used for more features and flexibility. Hardware is used
for performance and security.

2 Department of Computer Science | Gambella University


Real Time and Embedded System CH#1 – Introduction to RT & ES By: Lecturer Abebe A. (MSC in Computer Science)

Advantages of Real Time and Embedded Systems


Advantages of Real-Time Systems
 Predictability and Reliability: Real-time systems ensure that tasks are completed within
strict time constraints, making them highly predictable and reliable. This is crucial in
applications where timing is critical, such as aerospace and medical devices.
 Meeting Deadlines: By adhering to scheduling algorithms like Rate Monotonic
Scheduling (RMS) and Earliest Deadline First (EDF), real-time systems can guarantee
that tasks meet their deadlines, preventing potential system failures or degraded
performance.
 Deterministic Behavior: These systems provide consistent performance under specified
conditions, which is important for systems that require exact timing, such as industrial
control systems and robotics.
 Enhanced Performance in Critical Applications: Real-time systems are designed to
handle tasks with high priority and provide immediate responses, which is essential for
applications like autonomous vehicles and emergency systems where delay could be
disastrous.
 Increased Safety: In critical applications like medical devices or automotive safety
systems, real-time systems can help ensure that safety-critical tasks are performed within
the required time constraints, thereby enhancing overall safety.
 Support for Complex Systems: Real-time systems can manage complex and concurrent
tasks efficiently through sophisticated scheduling and task management strategies, which
is essential in modern computing environments.

Advantages of Embedded Systems


 Specialized Functionality: Embedded systems are designed for specific tasks or
applications, making them highly efficient and optimized for their intended purpose. This
specialization leads to better performance for those tasks compared to general-purpose
computers.
 Cost-Effective: They are typically less expensive than general-purpose computers
because they are designed with only the necessary components and functionality. This
makes them cost-effective for mass-produced consumer electronics and industrial
applications.

3 Department of Computer Science | Gambella University


Real Time and Embedded System CH#1 – Introduction to RT & ES By: Lecturer Abebe A. (MSC in Computer Science)

 Compact and Integrated Design: Embedded systems often integrate hardware and
software into a single chip or compact module, which reduces size, weight, and power
consumption. This is ideal for devices with space constraints like wearable technology or
compact appliances.
 Low Power Consumption: Designed to be power-efficient, embedded systems often
consume less power than general-purpose systems, making them suitable for battery-
operated devices and energy-sensitive applications.
 High Reliability and Stability: By focusing on specific functions, embedded systems
can be made highly reliable and stable, which is crucial in applications where failure is
not an option, such as in medical or industrial control systems.
 Real-Time Operation: Many embedded systems support real-time operations, enabling
them to handle time-sensitive tasks effectively, which is essential in applications like
automotive control systems and real-time data acquisition.
 Long Lifecycle and Durability: Embedded systems are often built for long-term use and
can operate reliably in harsh environments. This is beneficial for applications in industrial
machinery, aerospace, and remote sensing.
 Enhanced Security: Custom-designed embedded systems can be tailored with specific
security features and minimal exposure to potential vulnerabilities, making them more
secure against attacks compared to general-purpose systems.
Summary:
 Real-Time Systems offer advantages in terms of predictability, reliability, and
meeting deadlines, making them essential for applications where timing is critical and
performance must be guaranteed.
 Embedded Systems provide specialized functionality, cost-effectiveness, and
compact design, making them ideal for dedicated tasks in consumer electronics,
industrial applications, and various other fields. Their low power consumption and
high reliability also contribute to their effectiveness in a wide range of applications.

Disadvantages of Real-Time Systems and Embedded Systems


Disadvantages of Real-Time Systems
 Complexity of Design: Designing real-time systems can be complex due to the need for
precise scheduling and timing analysis. Ensuring that all tasks meet their deadlines under
varying conditions can complicate both hardware and software design.
 Higher Costs: Real-time systems often require specialized hardware and software, which
can increase development and maintenance costs. Additionally, achieving high reliability
and performance may necessitate more expensive components or development tools.
 Limited Flexibility: Real-time systems are often optimized for specific tasks or
applications, which can limit their flexibility. Adapting or reconfiguring the system for
new tasks or requirements may require significant redesign.
 Overhead and Performance Trade-offs: To ensure real-time performance, systems may
introduce additional overhead in terms of context switching, scheduling, and managing
priorities. This can sometimes impact overall system performance and efficiency.
 Difficulty in Testing: Testing real-time systems can be challenging because it requires
verifying that all tasks meet their deadlines under all possible conditions. This can involve
extensive testing and simulation to ensure reliability and predictability.

4 Department of Computer Science | Gambella University


Real Time and Embedded System CH#1 – Introduction to RT & ES By: Lecturer Abebe A. (MSC in Computer Science)

 Scalability Issues: Real-time systems may face scalability issues when dealing with an
increasing number of tasks or more complex scheduling requirements. Ensuring that the
system remains responsive as it scales can be difficult.

Disadvantages of Embedded Systems


 Limited Resources: Embedded systems typically have constrained resources such as
memory, processing power, and storage. This limitation can restrict the complexity of the
tasks they can perform and the types of applications they can support.
 Hard to Upgrade: Once embedded systems are deployed, upgrading or modifying them
can be challenging. Unlike general-purpose computers, embedded systems are often
integrated into other devices, making hardware or software upgrades more difficult.
 Specialized Knowledge Required: developing and maintaining embedded systems
requires specialized knowledge in hardware-software integration, real-time constraints,
and low-level programming. This can make finding qualified personnel or training
existing staff more challenging.
 Limited User Interface: Many embedded systems operate without a user interface or
with very minimal interaction options, which can make them less user-friendly or more
difficult to interact with, especially for troubleshooting or updates.
 Potential for Obsolescence: Embedded systems can become obsolete if the technology
they are based on becomes outdated. This can pose challenges for maintenance and
support, especially in long-life products like industrial machinery.
 Integration Challenges: Integrating embedded systems with other components or
systems can be complex, particularly when dealing with different standards,
communication protocols, or legacy systems. This can increase development time and
costs.
 Security Risks: Embedded systems can be vulnerable to security threats, especially if
they are connected to networks. Limited processing power and memory may restrict the
implementation of robust security measures.
 Debugging Difficulties: Debugging embedded systems can be more difficult compared
to general-purpose computers, due to their specialized hardware, limited visibility into
system states, and lack of advanced debugging tools.

Summary:
 Real-Time Systems face challenges including complexity in design, higher costs, limited
flexibility, and difficulties in testing. These systems must ensure that all tasks meet
deadlines, which can introduce additional overhead and make scaling challenging.
 Embedded Systems are constrained by limited resources, difficulties in upgrading, and
specialized knowledge requirements. They also face challenges related to user interface
limitations, potential obsolescence, and integration issues. Security and debugging can
also be more challenging in embedded environments.

Basic Structure of an Embedded System


The following illustration shows the basic structure of an embedded system −

5 Department of Computer Science | Gambella University


Real Time and Embedded System CH#1 – Introduction to RT & ES By: Lecturer Abebe A. (MSC in Computer Science)

 Sensor − It measures the physical quantity and converts it to an electrical signal which
can be read by an observer or by any electronic instrument like an A2D converter. A
sensor stores the measured quantity to the memory.

 A-D Converter − An analog-to-digital converter converts the analog signal sent by the
sensor into a digital signal.
 Processor & ASICs − Processors process the data to measure the output and store it to
the memory.
 D-A Converter − A digital-to-analog converter converts the digital data fed by the
processor to analog data
 Actuator − An actuator compares the output given by the D-A Converter to the actual
(expected) output stored in it and stores the approved output.

Embedded Systems - Processors


Processor is the heart of an embedded system. It is the basic unit that takes inputs and
produces an output after processing the data. For an embedded system designer, it is
necessary to have the knowledge of both microprocessors and microcontrollers.

Processors in a System
A processor has two essential units −
 Program Flow Control Unit (CU)
 Execution Unit (EU)
The CU includes a fetch unit for fetching instructions from the memory. The EU has circuits
that implement the instructions pertaining to data transfer operation and data conversion from
one form to another.
The EU includes the Arithmetic and Logical Unit (ALU) and also the circuits that execute
instructions for a program control task such as interrupt, or jump to another set of
instructions.
A processor runs the cycles of fetch and executes the instructions in the same sequence as
they are fetched from memory.

Types of Processors
Processors can be of the following categories: -
 General Purpose Processor (GPP)
o Microprocessor
o Microcontroller
o Embedded Processor
o Digital Signal Processor

6 Department of Computer Science | Gambella University


Real Time and Embedded System CH#1 – Introduction to RT & ES By: Lecturer Abebe A. (MSC in Computer Science)

o Media Processor
 Application Specific System Processor (ASSP)
 Application Specific Instruction Processors (ASIPs)
 GPP core(s) or ASIP core(s) on either an Application Specific Integrated Circuit
(ASIC) or a Very Large Scale Integration (VLSI) circuit.

Microprocessor
A microprocessor is a single VLSI chip having a CPU. In addition, it may also have other units
such as coaches, floating point processing arithmetic unit, and pipelining units that help in faster
processing of instructions.
Earlier generation microprocessors’ fetch-and-execute cycle was guided by a clock frequency of
order of ~1 MHz. Processors now operate at a clock frequency of 2GHz

Microcontroller
A microcontroller is a single-chip VLSI unit (also called microcomputer) which, although
having limited computational capabilities, possesses enhanced input/output capability and a
number of on-chip functional units.
CPU RAM ROM

I/O Port Timer Serial COM Port


Microcontrollers are particularly used in embedded systems for real-time control applications
with on-chip program memory and devices.

Microprocessor vs Microcontroller
Let us now take look at the most notable differences between a microprocessor and a
microcontroller.
Microprocessor Microcontroller

Microprocessors are multitasking in nature. Can


perform multiple tasks at a time. For example, Single task oriented. For example, a washing
on computer we can play music while writing machine is designed for washing clothes only.
text in text editor.

RAM, ROM, I/O Ports, and Timers can be RAM, ROM, I/O Ports, and Timers cannot be

7 Department of Computer Science | Gambella University


Real Time and Embedded System CH#1 – Introduction to RT & ES By: Lecturer Abebe A. (MSC in Computer Science)

added externally and can vary in numbers. added externally. These components are to be
embedded together on a chip and are fixed in
numbers.

Fixed number for memory or I/O makes a


Designers can decide the number of memory or
microcontroller ideal for a limited but specific
I/O ports needed.
task.

External support of external memory and I/O


Microcontrollers are lightweight and cheaper
ports makes a microprocessor-based system
than a microprocessor.
heavier and costlier.

External devices require more space and their A microcontroller-based system consumes less
power consumption is higher. power and takes less space.

Embedded Systems - Architecture Types


The 8051 microcontrollers work with 8-bit data bus. So they can support external data
memory up to 64K and external program memory of 64k at best. Collectively, 8051
microcontrollers can address 128k of external memory.
When data and code lie in different memory blocks, then the architecture is referred
as Harvard architecture. In case data and code lie in the same memory block, then the
architecture is referred as Von Neumann architecture.

Von Neumann Architecture


The Von Neumann architecture was first proposed by a computer scientist John von
Neumann. In this architecture, one data path or bus exists for both instruction and data. As a
result, the CPU does one operation at a time. It either fetches an instruction from memory, or
performs read/write operation on data. So an instruction fetch and a data operation cannot
occur simultaneously, sharing a common bus.
Von-Neumann architecture supports simple hardware. It allows the use of a single, sequential

8 Department of Computer Science | Gambella University


Real Time and Embedded System CH#1 – Introduction to RT & ES By: Lecturer Abebe A. (MSC in Computer Science)

memory. Today's processing speeds vastly outpace memory access times, and we employ a very
fast but small amount of memory (cache) local to the processor.

Harvard Architecture
The Harvard architecture offers separate storage and signal buses for instructions and data. This
architecture has data storage entirely contained within the CPU, and there is no access to the
instruction storage as data. Computers have separate memory areas for program instructions and
data using internal data buses, allowing simultaneous access to both instructions and data.
Programs needed to be loaded by an operator; the processor could not boot itself. In a Harvard
architecture, there is no need to make the two memories share properties.

Von-Neumann Architecture vs Harvard Architecture


The following points distinguish the Von Neumann Architecture from the Harvard
Architecture.
Von-Neumann Architecture Harvard Architecture

Single memory to be shared by both code and data. Separate memories for code and data.

Processor needs to fetch code in a separate clock


Single clock cycle is sufficient, as separate
cycle and data in another clock cycle. So it
buses are used to access code and data.
requires two clock cycles.

Slower in speed, thus more time-


Higher speed, thus less time consuming.
consuming.

Simple in design. Complex in design.

CISC and RISC


CISC is a Complex Instruction Set Computer. It is a computer that can address a large number of
instructions.

9 Department of Computer Science | Gambella University


Real Time and Embedded System CH#1 – Introduction to RT & ES By: Lecturer Abebe A. (MSC in Computer Science)

In the early 1980s, computer designers recommended that computers should use fewer
instructions with simple constructs so that they can be executed much faster within the CPU
without having to use memory. Such computers are classified as Reduced Instruction Set
Computer or RISC.

CISC vs RISC
The following points differentiate a CISC from a RISC −
CISC RISC

Larger set of instructions. Easy to program Smaller set of Instructions. Difficult to program.

Simpler design of compiler, considering larger


Complex design of compiler.
set of instructions.

Many addressing modes causing complex


Few addressing modes, fix instruction format.
instruction formats.

Instruction length is variable. Instruction length varies.

Higher clock cycles per second. Low clock cycle per second.

Emphasis is on hardware. Emphasis is on software.

Control unit implements large instruction set


Each instruction is to be executed by hardware.
using micro-program unit.

Slower execution, as instructions are to be read Faster execution, as each instruction is to be


from memory and decoded by the decoder unit. executed by hardware.

Pipelining of instructions is possible, considering


Pipelining is not possible.
single clock cycle.

10 Department of Computer Science | Gambella University

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy