Real-time And Embedded
Systems
UESTC Embedded Software
Engineering Center
Chapter 4
Embedded Systems Design Issues
UESTC Embedded Software
Engineering Center
Contents
4.1 Memory management
4.2 Hardware development
4.3 Software development
UESTC Embedded Software
Engineering Center
Memory Management
•The CPU fetches instructions and data of a program from
memory; therefore, both the program and its data must
reside in the main (RAM and ROM) memory.
•Modern multiprogramming systems are capable of storing
more than one program, together with the data they access,
in the main memory.
•A fundamental task of the memory management
component of an operating system is to ensure safe execution
of programs by providing:
–Sharing of memory
–Memory protection
UESTC Embedded Software
Engineering Center
Issues in sharing memory
• Transparency
•Several processes may co-exist, unaware of each other,
in the main memory and run regardless of the number
and location of processes.
• Safety (or protection)
Processes must not corrupt each other (nor the OS!)
• Efficiency
•CPU utilization must be preserved and memory
must be fairly allocated.
• Relocation
Ability of a program to run in different memory
locations.
UESTC Embedded Software
Engineering Center
Storage allocation
Information stored in main memory can be classified in a
variety of ways:
– Program (code) and data (variables, constants)
– Read-only (code, constants) and read-write (variables)
Address (e.g., pointers) or data (other variables);
binding (when memory is allocated for the object):
static or dynamic
The compiler, linker, loader and run-time libraries all
cooperate to manage this information.
UESTC Embedded Software
Engineering Center
Creating an executable code
•Before a program can be executed by the CPU, it must
go through several steps:
• Compiling (translating)—generates the object code.
• Linking—combines the object code into a single self-
sufficient executable code.
• Loading—copies the executable code into memory.
• Execution—dynamic memory allocation.
UESTC Embedded Software
Engineering Center
From source to executable
code
UESTC Embedded Software
Engineering Center
Address binding (relocation)
The process of associating program instructions and data
to physical memory addresses is called address binding,
or relocation.
• Static—new locations are determined before execution.
• Dynamic—new locations are determined
during execution.
UESTC Embedded Software
Engineering Center
Functions of a loader
A loader places the executable code in main memory starting
at a pre-determined location (base or start address). This can be
done in several ways, depending on hardware architecture:
• Absolute loading: always loads programs into a designated
memory location.
• Relocatable loading: allows loading programs in different
memory locations.
• Dynamic (run-time) loading: loads functions when first
called (if ever).
UESTC Embedded Software
Engineering Center
Simple management schemes
An important task of a memory management system is to
bring (load) programs into main memory for execution.
The following contiguous memory allocation techniques
were commonly employed by earlier operating systems*:
• Direct placement
• Overlays
• Partitioning
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
UESTC Embedded Software
Engineering Center
Hardware and Software development
The major elements of the development life cycle.
Determine the requirements
Specification
Design the system architecture
Hardware and software design
Hardware and software implantation
Hardware and software tasting
System integration
System testing and validation
Operation and Maintenance
UESTC Embedded Software
Engineering Center
Determine the requirements
Complete clarity of
Required purpose,
Inputs,
Outputs,
Functioning,
Design metrics and
Validation requirements for finally developed systems
specifications.
UESTC Embedded Software
Engineering Center
Specification
•Clear specifications of Customer expectations from the product.
•Needs specifications for
• Hardware, for example, peripherals, devices processor and
memory specifications, Memory types to be used , ports,
Operating voltages and powering options , Microcontroller
specifications to be used. The cost of the embedded system.
Data types and processing specifications
UESTC Embedded Software
Engineering Center
Design the system architecture
Software architectural layers
How the different elements – data structures, databases,
algorithms, control functions, state transition functions,
process, data and program flow are to be organized.
What shall be design of data structures and databases that
would be most appropriate for the given problem? Whether
data organized as a tree- like structure will be appropriate?
What will be the design of the components in the data?
UESTC Embedded Software
Engineering Center
Design the system architecture
Hardware Components
Processor
Memory RAM, ROM or internal and external flash or
secondary memory in the system
Peripherals and devices internal and external to the
system
Ports and buses in the system
Power source or battery in the system
UESTC Embedded Software
Engineering Center
Testing, Verification and
Validation
Testing – to find errors
Verification – refers to an activity to ensure that specific
functions are correctly implemented.
Validation – refers to an activity to ensure that the system
that has been created is as per requirements agreed upon at
the analysis phase, and to ensure its quality
UESTC Embedded Software
Engineering Center
Operation and Maintenance
• When a product with embedded systems is finally released to
the market, user feedback should be monitored and all
necessary product maintenance should be provided to end
users, if required.
UESTC Embedded Software
Engineering Center