Embedded Systems for System Analysts (6)

Table of contents

1. Embedded system

1.1 Concept of real-time system

1.2 Basic Architecture of Embedded System

2. Embedded Operating System

2.1 Features of embedded operating system

2.2 Architecture of embedded operating system

2.3 Multi-task scheduling mechanism

2.4 Kernel Objects

2.5 Exceptions and Interrupts

2.6 Other functions

3. Embedded database

3.1 Reasons for introducing databases in embedded systems

3.2 Features of the embedded database environment

4. Embedded debugging method

5. Energy consumption of embedded systems

5.1 Dynamic Power Management


1. Embedded system

        Embedded system is a kind of application as the core, based on computer technology, which can meet the requirements of different applications for functions, reliability, cost, volume, power consumption, etc., and provides configurable and tailorable software and hardware systems. It has strong flexibility. It is mainly composed of embedded hardware platform, related embedded hardware, embedded operating system, supporting software and application software.

Embedded system features:

    • Strong system specificity
    • Strong dependence on software and hardware
    • Strong system implementation
    • Processor dedicated
    • Close integration of multiple technologies
    • system transparency
    • System resource limited

1.1 Concept of real-time system

        A system that responds in real time to external events. Real-time systems are time-constrained and dead-line driven.

        Deadline: Refers to the latest time limit that the system must deal with external events. Missing this limit may have serious consequences. Usually the calculation must be completed before reaching the dead line. Usually the dead line problem will evolve into a resource scheduling problem.

1.2 Basic Architecture of Embedded System

Embedded system software can be divided into three levels:

  • system software
  • Support software
  • application

Embedded processors can be divided into the following categories:

  • embedded microprocessor
  • Embedded Microcontroller
  • Embedded Digital Signal Processor
  • Embedded System on Chip

The support software in the embedded system is mainly composed of window system, network system, database management system, java virtual machine and other parts.

2. Embedded Operating System

2.1 Features of embedded operating system

Embedded operating system features:

  • Miniaturization: The software of an embedded system is generally solidified in a memory chip instead of being stored in a carrier such as a disk.
  • High code quality: because storage space is a precious resource
  • Specialization: good portability and reliability
  • Strong real-time performance: Widely used in process control, data acquisition, communication, multimedia information processing and other occasions that require real-time response.
  • Tailorable and configurable: in order to meet the requirements of miniaturization and specialization.

2.2 Architecture of embedded operating system

EOS is a basic software that schedules execution in a sequential manner, manages system resources and provides services for application code. Every EOS has a core.

The three objects contained in the kernel are:

  • Scheduler: the heart of EOS, providing a set of algorithms to decide when to execute which task
  • Kernel Objects: special kernel components that help create embedded applications.
  • Kernel services: are operations or generic operations performed by the kernel on objects.

2.3 Multi-task scheduling mechanism

Most of that and generally support two scheduling algorithms:

  • Priority-based preemptive scheduling
  • Time-based round-robin scheduling

2.4 Kernel Objects

Users of real-time operating systems can use kernel objects to solve real-time system design problems. Such as concurrency, mutual exclusion synchronization, and data communication issues.

That and objects include semaphores, message queues, pipes, events and signals, etc.

  • A message queue is an object similar to a buffer, through which tasks and ISRs can send and receive messages to realize data communication.
  • Pipeline: It is a kernel object that provides unstructured data exchange and realizes task synchronization. Each pipe has two ports, one for reading and one for writing. The general kernel supports two types of pipes: named pipes and unnamed pipes.
  • Condition variable: A kernel object associated with a shared resource. It allows a task to wait for conditions needed by other tasks to create shared resources.

2.5 Exceptions and Interrupts

An exception is any event that interrupts the normal operation of the processor, forcing the processor to enter a privileged execution mode. It is divided into synchronous exceptions and asynchronous exceptions, all handlers follow the defined order.

2.6 Other functions

Timer: An integral part of the real-time embedded operating system, the time round-robin scheduling algorithm, the timing refresh of the memory, the overtime retransmission of network data packets and the timing of the target machine monitoring system are all strictly dependent on the timer.

I/O management: The I/O subsystem defines a set of standard IO operation functions. In order to hide the characteristics of the system from the application.

3. Embedded database

Also known as mobile database or embedded mobile database. The purpose of its existence is to solve the data management problem in the mobile computing environment. A mobile database is a distributed database in a mobile computing environment.

3.1 Reasons for introducing databases in embedded systems

  • All applications require repeated data management
  • Data sharing performance between applications
  • Application software is independent, poor in portability and low in reusability.

3.2 Features of the embedded database environment

  • Equipment mobility at any time
  • Frequent network disconnection
  • Various network conditions
  • Asymmetry of communication ability
  • Embedded System Network
  • It is a network system used to connect various embedded systems so that they can transmit information to each other and share resources.
  • Embedded systems use different connection technologies on different occasions

4. Embedded debugging method

        The embedded system development method is different from the general development method, but adopts the cross-development method. That is, it is developed on a common platform and runs on another embedded target platform. This common platform for developing embedded software is called the host system. The embedded system being developed is called the target machine system.

        The development process when the software execution environment is consistent with the development environment is called local development. Due to the different operating and development environments of embedded software, the development work is carried out cross-wise, so each step must take this into consideration.

direct debugging method

It is to download the target code to the target machine, let it execute, and judge the running state of the program by observing the indicator light. This is the most primitive method of debugging.

debug monitoring method

Also called pile insertion method, the function of the pile is to monitor and control the program being debugged. It obviously improves the efficiency of development, reduces the difficulty of debugging, shortens the product development cycle, and effectively reduces the development cost.

ROM emulator method

An improved method to overcome the shortcomings of the pile insertion method. The ROM emulator can be considered as a hardware device used to replace the ROM chip on the target machine. One end of it is connected to the host machine, and the other end is connected to the target machine through the pin socket of the ROM chip.

online simulation method

ICE is a device used to replace the CPU on the target machine. For the target machine, ICE is equivalent to its CPU, and the in-circuit emulator itself is an embedded system with its own CPU memory and software.

on-chip debugging method

InCircuitDebugger is a function module inside the CPU chip to support debugging

simulator method

It is a pure software tool that runs on the host computer. It achieves the purpose of running and debugging embedded applications on the host computer by simulating the instruction system of the target computer or the system call of the target computer operating system.

5. Energy consumption of embedded systems

        In an embedded system, the energy consumption of the core processor occupies a considerable part. Dynamic voltage regulation is regarded as a key technology to reduce processor energy consumption. Its principle is to reduce useless energy consumption in the system by dynamically changing the voltage and frequency of the processor when the system is running, thereby improving the effective utilization of energy.

5.1 Dynamic Power Management

Basic idea: Because the load of the system changes, if we can predict its state, we can save energy in some ways.

Simply thinking that the device will go to sleep immediately when there is no task for the device will often bring new problems. If the device needs to be used again within a short period of time, it will take some time when waking from sleep,

And it takes more energy.

There are two mechanisms for reducing power consumption: utilization of sleep states, and dynamic speed scaling.

  • Dynamic Speed ​​Scaling: Some embedded systems can change their frequency and speed at runtime
  • Utilize sleep state: go to sleep when the device is low on energy

Guess you like

Origin blog.csdn.net/qq_42357877/article/details/129758680
Recommended