K-INFO
HU
EN
Login

Parallel and Event Driven Programming in Embedded Systems

Párhuzamos és eseményvezérelt programozás beágyazott rendszereken
A tantárgyleírás hatályossága
Hatályosság kezdete:
2026. March 21.
Hatályosság vége:
Subject name (Hungarian, English)
Párhuzamos és eseményvezérelt programozás beágyazott rendszereken
Parallel and Event Driven Programming in Embedded Systems
Subject code BMEVIMIAC08
Subject type
Training Level
Course types and hours (weekly/semester)
Course type lecture tutorial laboratory
hours (weekly) 2 1 0
type (linked/independent) derived course
Assessment type vizsga
Credits 4
Subject coordinator
DR. Kovácsházy Tamás
position: egyetemi docens
Responsible department
Mesterséges Intelligencia és Rendszertervezés Tanszék
Faculty Villamosmérnöki és Informatikai Kar
Subject website http://www.mit.bme.hu/eng/oktatas/targyak/vimiac08
Primary curriculum type
Direct prerequisites – Strong prerequisite none
Direct prerequisites – Weak prerequisite none
Direct prerequisites – Parallel prerequisite none
Direct prerequisites – Milestone prerequisite none
Direct prerequisites – Exclusion none

Objectives

Programme

1. Architectural background of parallel and event-driven programming, processor and memory virtualization, protection/privilege levels and the MMU, cache coherency, multiprocessor, distributed and heterogeneous systems.

2. Operating systems architectures, operating system types, internal operation, relationship to the applications. Concurrent and cooperative scheduling, priority, scheduling and the HW. System call and its implementations. Real-time operation and safety-critical operation in operating systems.   

Practice: Test system installation into a virtual machine, introduction to the development system, make utility, Eclipse IDE, etc.

3. Implementation of tasks and subtasks, processes and threads, comparison and properties, their implementation. Co-routine and fiber, as implementations of cooperative tasks, details of implementation. Design patterns for using processes and threads in cooperative scheduling.

4. Processes and threads in embedded environments, practical implementations, analyses and comparison from this aspect using design patterns. Monitoring the running and inter-operation of processes and threads using software solutions.

Practice: Creating and using processes and threads on Linux, monitoring their operation. FreeRTOS threads in practice and monitoring their operations.

5. Mutual exclusion, synchronization, and communication in systems having shared memory. Sufficient condition to run task in parallel (Bernstein's condition). Lock-bit, semaphore, mutex, multiple readers single writer mutex, etc. and their operation and usage demonstrated using design patterns. Spinlocks and sleeplocks, their operation, and their effect on the performance of the embedded system including real-time properties and energy use.
6. Analyses of practical solutions for mutual exclusion, synchronization, and communication as a case study.

Practice: Mutual exclusion, synchronization, and communication 1.

7. Continued analyses of mutual exclusion, synchronization, and communication. Comparing the kernel and user space solutions.


8. Handling time in embedded systems, time as a physical unit and its representation in computers in embedded systems. The architecture of clocks, real-time clocks, system clocks, delaying execution and suspension of tasks based on time.

Practice: Mutual exclusion, synchronization, and communication 2.

9. Mutual exclusion, synchronization, and communication in massage passing systems. Properties of message passing, comparison of message passing to shared memory. Mailbox, message queue, pipelines and named pipelines, TCP/IP, remote procedure/method call. Design patterns for message based communications.


10. Mutual exclusion, synchronization, and communication in Linux. Posix and System V solutions. TCP/IP and Unix domain sockets.


Practice: Mutual exclusion, synchronization, and communication using message passing in between processes in Linux.

11. Typical programming errors in the application of mutual exclusion, synchronization, and communication, and common solutions to avoid them. Deadlock, livelocks, priority inversion, other errors. The concept of monitors and its application.

12. Handling of memory. The memory modell of FreeRTOS, reserving and freeing memory, consequences, the role of the heap and the stack. Memory handling in Linux, using virtual memory and its consequences.


Practice: Suspending a task for specified time and running tasks at given time. The application of spinlocks, HW timers and OS virtual timers. Using timeouts for reliability and error handling embedded systems.

13. Tools used during the development of parallel and event-driven system, their operation, and practical application. Tracing with software and hardware tools. Profiling. Tracking memory use and detecting memory leaks with tools. Fault detection, performance analyses and optimization tools for embedded systems.


14. Alternative software and/or hardware solutions. Hardware semaphores, multiport memory, software or hardware transactional memory, lockless programming. Hypervisors and platform virtualization in embedded systems. Peripheral virtualization including sensor virtualization.    

Practices are scheduled for even weeks, but due to some scheduling issues they can be organized on even weeks.

The primary aim of the subject is to introduce students to the fundamentals and practice of parallel and event-driven programming because due to the growing complexity of embedded software and the emergence of many processor, distributed, heterogeneous system architectures this programming model is in the center of interest. To reach its aim the subject introduces the fundamental architecture and internal operation of embedded operating systems, the provided services to implement applications, both on the kernel and application programming interface level. The subject uses the FreeRTOS () and UNIX/Linux embedded operating systems to demonstrate the introduced topics, detailing the fulfillment of real-time requirements, memory handling, reliability, and resource virtualization related aspects also.

Learning outcomes

Ez a tantárgy a KKK rendeletben meghatározott, következő kompetenciák fejlesztését szolgálja:

Knowledge

No learning outcomes recorded.

Skills

No learning outcomes recorded.

Attitudes

No learning outcomes recorded.

Autonomy and responsibility

No learning outcomes recorded.

Oktatási módszertan

Lecture and practice

Tanulástámogató anyagok

Online források
Bruce Powel Douglass, „Real-Time Design Patterns: Robust Scalable; Architecture for Real-Time Systems”, Addison-Wesley Professional; Computing Series, 2002.; Bruce Powel Douglass, „Design Patterns for Embedded Systems in C: An Embedded Software Engineering Toolkit”, Newnes, 2010.; Richard Barry, „Using the FreeRTOS Real Time Kernel - Standard Edition”, 2010.; Richard Barry, „Using the FreeRTOS Real Time Kernel - a Practical Guide - Cortex M3 Edition”, 2010.; W.; Richard Stevens (Author), Stephen A. Rago, „Advanced Programming in the; UNIX Environment (3rd Edition) (Addison-Wesley Professional Computing; Series, 2013.

Recommended preliminary knowledge for completing the subject

Knowledge type competencies
(azon előzetes ismeretek összessége, amelyek megléte nem kötelező, de a tantárgy eredményes teljesítését nagyban elősegíti)
Fundamentals of microcontrollers, Computer architectures, Operating systems fundamentals, C/C++ programming, Fundamentals of embedded systems
Skill type competencies
(azon előzetes képességek és készségek összessége, amelyek megléte nem kötelező, de a tantárgy eredményes teljesítését nagyban elősegíti)
nincs
Recommended (non-compulsory) preliminary competencies
(azon ajánlott (nem kötelező) előzetesen megszerzendő kompetenciák összessége, amelyek jelentősen hozzájárulnak a tantárgy eredményes teljesítéséhez)
Fundamentals of microcontrollers, Computer architectures, Operating systems fundamentals, C/C++ programming, Fundamentals of embedded systems
General rules
Requirements: During the semester: 1. Participation on the practices. There will be 6 practices organized during the semester (2 hours in every two week taking into account state holidays, etc.). Participation is checked on these occasions. It is mandatory to take part at least on 4 practices, otherwise no signature will be granted. No practices can be repeated. 2. Satisfactory preparation of a home work assignment is also mandatory for the signature. The homework is a complex system, running on both FreeRTOS based (running on a microcontroller development board) and Linux based (running on a virtualized PC) components. Oral exam during the examination period. No advanced exam will be organized. Additional possibilities: The homework can be finished during the repetition period according the Rules of Lectures and Examination (Tanulmányi és Vizsga Szabályzat, TVSZ). The homework and the practices cannot be substituted with an examination.
Assessment methods
In-term assessments

No detailed assessments provided.

Weight of in-term assessments

No weights provided.

Exam-period assessments

No detailed assessments provided.

Weight of exam elements

No weights provided.

Grade calculation

No grade thresholds provided.

Attendance requirements

No attendance requirements provided.

Rules for retake and resubmission

Not provided.

Short description

Not provided.

Detailed description

Not provided.

Recommended courses
Informatics 1 (Operating systems and Computer architectures), Informatics 2 (Computer networks), Fundamentals of programming 1 (C programming), Fundamentals of programming (C++ programming)
Workload to complete the subject

No workload breakdown provided.

Validity of subject requirements
Requirements valid from:
Requirements valid until:
Curriculum placement

No curriculum placements recorded for this subject version.