Real-Time Systems Development

Chapter 2: Implementing Simple Real-time Systems

2.1 Chapter overview

This chapter describes the use of serial tasking loops to demonstrate how simple real-time systems can be implemented using round robin, cooperative scheduling. This simple approach serves to eliminate the task swapping overhead associated with pre-emptive multi-tasking. By introducing the extra facility of interrupt service routines, a quite reasonable real-time embedded system can be achieved. The problem of resource sharing, or critical data, is also discussed within the context of cooperative scheduling. The chapter concludes with some practical examples using the standard printer port of a Linux-based PC for initial device control experiments.

2.2 Multi-tasking

When working with a single CPU, it is common to share this pivotal resource by rapidly switching between all the active tasks. Operating systems, such as Unix and Windows, select one task to run on the CPU for a 10 ms time slice, then select another. Multi-tasking or multi-threading programs are readily implemented using modern High-Level Languages (HLL), such as Java or C++, through the low-level facilities provided by the operating system. My Linux workstation is currently handling 66 tasks, of which only a dozen are directly attributable to my endeavours; the remainder are carrying out background jobs, such as handling the LAN connection, managing my desktop and various X sessions. In this way a multi-tasking operating system gives the impression of having multiple CPUs, when in fact it does not. The term concurrent processing is normally used to express how multi-tasking can be achieved by serially sharing a single CPU.

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Embedded Programming Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.