Course detail

Real Time Operating Systems

FEKT-NRTSAcad. year: 2011/2012

Basic concepts in the area of control systems, real-time operating systems and process control. HW architectures and multitasking. Operation principles of real-time control systems (RTOS) and inner structure of the RTOS. Scheduling algorithms for single processor systems. Basic entities in real-time systems: process, thread, semaphor, mutexe, critical section, event. Other aspects of RTOS: shared resources, IPC, process synchronization, process monitor, deadlock and priority inversion, starvation, race condition, memory and other sources management. Real-time control of peripheries in the I/O space, memory and PCI bus. Interrupts in RTOS. Reliably and safety real-time control systems. Real-time control system based on Windows - RTX.

Language of instruction

English

Number of ECTS credits

5

Mode of study

Not applicable.

Offered to foreign students

Of all faculties

Learning outcomes of the course unit

Knowledges in the area of implementation of control systems in modern 32-bit real-time operating system by using procedures ensuring high reliability and safety of the final control system.

Prerequisites

The subject knowledge on the Bachelor´s degree level is requested, namely of programming language C/C++.

Co-requisites

Not applicable.

Planned learning activities and teaching methods

Teaching methods depend on the type of course unit as specified in the article 7 of BUT Rules for Studies and Examinations.

Assesment methods and criteria linked to learning outcomes

Specification of the module's evaluation is announced by a regulation issued by the lecturer responsible for the course and updated for every academic year.

Course curriculum

Introduction into control systems. Multitasking & Operating Systems, processes and threads. Real-time operating systems. Determinism. Scheduling algorithms. Architecture x86. Events, mutex, semaphores, critical sections. Race condition, livelock, starvation, priority inversion. Memory management in RTOS. Communication bus PCI. Fault-Tolerant systems.

Work placements

Not applicable.

Aims

Goal of this module is to familiarize students with the implementation of control algorithms in 32-bits real-time operating systems (RTOS). Students will be introduced into the area of RTOS on practical examples requiring multithread applications and synchronization between them using standard functions of RTOS (semaphores, critical sections, mutex, events …). Students will learn how to implement time-critical algorithms reacting with external events and control algorithms with isochronous timing – regulators and samplers. Students will be familiarized with basic principles of data and HW sharing between real-time and non real-time processes (GUI). Practical skills will be acquired by programming RTOS RTX on the architecture IBM PC and PCI bus.

Specification of controlled education, way of implementation and compensation for absences

Specification of the controlled tuition is announced by a regulation issued by the lecturer responsible for the course and updated for every academic year.

Recommended optional programme components

Not applicable.

Prerequisites and corequisites

Not applicable.

Basic literature

Douglas, B., P. Doing Hard Time, Reading, Mass.:Addison-Wesley, 2000 (EN)

Recommended reading

Not applicable.

Classification of course in study plans

  • Programme EECC-MN Master's

    branch MN-KAM , 1 year of study, winter semester, elective specialised

Type of course unit

 

Lecture

26 hod., optionally

Teacher / Lecturer

Syllabus

1. Introduction into control systems, real-time control systems (RTOS) and technological systems.
2. Loop control, control with operating system and control with RTOS. Multitasking systems. Preemptive and non-preemptive multitasking.
3. Operating system Windows as HMI. Operation principle of Windows. Messages, fronts, events. Process scheduler in Windows. Windows GDI and Windows API. User input/output. File system. WDM, privilege rings.
4. Principle and description of RTOS. Structure and classification of RTOS. Planning algorithms. Core structure of the RTOS, context switching. Process, Thread, Process Synchronization. Semaphores, deadlock, mutex, critical sections. Shared sources exclusive access. Inversion priority. Process monitor.
5. Principle and description of RTOS Windows RTX. Core structure of RTX. RTX and windows. RTX API interface. Basic functions in Windows RTX.
6. Expanded function of Windows RTX.
7. Communication buses and their implementation in RTOS. Industrial buses in control applications. Master/slave architecture. Arbiter, Tokens, Nondeterministic access.
8. Highly Reliable systems. Fault-Tolernat RTOS, Safety-Critical systems. Fail-safe state.
9. Formal methods in design of Fault-Tolerant control systems. Reliability and Reliability indicators. Back-up systems, TMR and NMR systems.
10. Finite Automaton. Timed Automaton. Moore and Mealy implementation in RTOS. Asynchronous and synchronous communication between automaton.
11. Safety programming. Danger SW constructions. WatchDog. Exceptions. Object oriented programming concept and its contribution into Fault-Tolerant.
12. Comparison of RT systems based on PC and PLC. Requirements in technological control. Control system development schedule.

Laboratory exercise

26 hod., optionally

Teacher / Lecturer

Syllabus

1. RTX introduction. Architecture of RTX. RTX API. Configuration RTX Runtime environment. Manual and automatic run of the RTX process. Stopping RTX process.
2. Setting HAL timer. Starvation time settings. Time quantum. Conversion of PCI device from Windows into RTX. Parameters of RTX PCI device. Conversion of PCI device back into Windows. ISA device conversion into RTX and back. Parameters of RTX ISA device.
3. Basic utilities (RTX Properties Control Panel, RTSSrun, RTSSkill, RTSSview, RtxServer). Process and thread in RTX. Memory management. Basic memory functions: RtAllocateLockedMemory a RtFreeLockedMemory.
4. Process management. Functions RtLockProcess a RtUnlockProces. Timer parameters in RTX: RtGetClockTime, RtSetClockTime, RtGetClockResolution a RtGetClockTimerPeriod.
5. Timer functions in RTX: RtCreateTimer, RtDeletTImer, RtCancelTimer, RtSetTimer, RtSetTimerRelative.
6. Shared memory in RTX: RtCreateSharedMemory, RtOpenSharedMemory.
7. Semaphores in RTX: RtCreateSemaphore a RtOpenSemaphore. Events in RTX: RtCreteEvent, RtOpenEvent, RtPulseEvent.
8. RTX and Mutex functions: RtCreateMutex, RtReleaseMutex, RtOpenMutex.
9. RTX and interrupt functions: RtAttachInterruptVector, RtReleaseInterruptVector, RtEnableInterrupts, RtDisableInterrupts.
10. RTX and I/O port functions: RtEnablePortIo, RtDisablePortIo, RtReadPortUchar, RtWritePortUchar.
11. RTX and memoty management functions: RtMapMemory, RtUnamMemory.
12. RTX bus management functions: RtGetBusDataByOffset, RtTransalateBusAddress, RtSetBusDataByOffset. RTX a dll access.