CS 452 Real-Time Programming

Watch a video introduction to the course on YouTube.


To give students experience with the tools and techniques available for writing real-time programs to run on embedded systems. A major part of the course involves hands-on experience programming a microcomputer for an application involving process control, data acquisition, and communication.

Intended Audience

CS 452 is a course for CS major students, and is normally taken in fourth year. It will be of special value to students interested in applied computer science, operating systems, or the use of message passing and multiple-process programs.

Related Courses

Prerequisites: CS 350 or SE 350; Computer Science students only.


Course notes, hardware and software manuals, and on-line documentation.


3 hours of lectures per week. A lab is available almost 24 hours per day, but is not scheduled. Normally available in Winter and Spring.


  1. Because laboratory facilities are required for this course, enrolment during any given term is limited.
  2. Students develop programs to run on an Intel microcomputer system. A host computer running UNIX is used for program development. Programs are written and cross-compiled on the host and downloaded for execution on the microcomputer system. Students are expected to have knowledge of writing programs in C. No prior knowledge of the Intel architecture is assumed; documentation is provided.


Real-time Systems (2 hours)

Introduction to real-time systems. Definition of the concept of a process.

Concurrency and CPU Multiplexing (3 hours)

Review of concurrency and CPU multiplexing. Implementation of a simple application using the concept of cyclic execution to provide concurrency.

A Real-time Operating System (12 hours)

Implementation of a simple but powerful real-time operating system kernel providing support for multiple processes, inter-process communication and synchronization via message passing, and interrupts.

Process Structuring Techniques (9 hours)

Design of those parts of the operating system that provide services to application programs. Stereotypical task capabilities: servers, clients, workers. Task structuring for application programs. Pathologies: deadlock, performance problems. Debugging.

An Application (2 hours)

Implementation of a challenging application using the operating system: the control of an electric model railroad, or an industrial strength robot arm. The power of process-structuring techniques and the use of state machines within certain processes.

Other Topics (10 hours)

Other approaches to the design of real-time systems. Language support for real-time concurrent systems: Modula-3, Ada, Occam. Type-safe communication. Multiprocessors, scheduling. Analog/digital interfaces and elementary control theory.