Name at least 4(four) different type of processors that can be used as the core of an embedded system.

  • General Purpose Processor (GPP)
    • Microprocessor
    • Microcontroller
    • Embedded Processor
    • Digital Signal Processor
    • Media Processor
  • Application Specific System Processor(ASSP)
  • Multiprocessor system using GPP and ASSPs
  • GPP Core or ASIP core integrated into Application specific Integrated Circuit ASIC orVLSI integrated with processor units on ASIC VLSI Chip.

What is a charge pump? Give at least one example where charge pump is used.

An Internal power source is required for a system. But when a system does not have a power source of its own, they connect to either an external power source or a charge pump.

A charge pump uses arrays of capacitors to increase voltage in a circuit. In this way, you can drive higher voltage loads from logic voltages of 3 – 5 volts. A charge pump consists of a diode in the series followed by a charging capacitor. The diode gets forward bias input from an external signal; for example, from an RTS signal.

A common application for charge pump circuits is in RS-232 level shifters where they are used to derive positive and negative voltages (often +10 V and -10 V) from a single 5 V or 3 V power supply rail.

What is index register and segment register?

Index registers are used to provide more flexibility in addressing modes, allowing the programmer to create a memory address by combining the contents of an address register with the contents of an index register (with displacements, increments, decrements, and other options). In some processors, there are specific index registers (or just one index register) that can only be used only for that purpose. In some processors, any data register, address register, or general register (or some combination of the three) can be used as an index register. Intel 80×86: 7 of the 8 general purpose registers may be used as an index register.

Base registers or segment registers are used to segment memory. Effective addresses are computed by adding the contents of the base or segment register to the rest of the effective address computation. In some processors, any register can serve as a base register. In some processors, there are specific base or segment registers (one or more) that can only be used for that purpose. In some processors with multiple base or segment registers, each base or segment register is used for different kinds of memory accesses (such as a segment register for data accesses and a different segment register for program accesses). These registers are a part of the x86 “Segmentation Memory Model” and are rarely used due to the advent of “flat” memory space. Despite their depreciation during the evolution of the x86 architecture, these registers are still required to have a valid values during normal CPU operation.

What are Virtual Devices? Give two examples of virtual devices.

A virtual device in Unix is a file such as /dev/null or /dev/urandom, that is treated as a device, as far as user level software is concerned, but is generated by the kernel without reference to hardware.

For instance when /dev/null is written to, the kernel tells the program it wrote everything to it (without actually writing it anywhere), and when read from, the reading program is told that it has reached the end of the file. It is a device file (it can be made with mknod for instance), but does not reference any hardware.

File and Pipe are the examples of Virtual devices.

What are the advantages of re-entrant functions in embedded system software?

A reentrant function is one that can be used by more than one task concurrently without fear of data corruption. Conversely, a non-reentrant function is one that cannot be shared by more than one task unless mutual exclusion to the function is ensured either by using a semaphore or by disabling interrupts during critical sections of code. A reentrant function can be interrupted at any time and resumed at a later time without loss of data. Reentrant functions either use local variables or protect their data when global variables are used.

A reentrant function:

  • Does not hold static data over successive calls
  • Does not return a pointer to static data; all data is provided by the caller of the function
  • Uses local data or ensures protection of global data by making a local copy of it
  • Must not call any non-reentrant functions

Advantages :-

  • Embedded systems have space constraints. Reentrant functions reduce space requirements.
  • Maintenance of a single source
  • Proper handling of software interrupts.
  • Avoiding data corruption.