Skip to content

This project is part of the "Concurrent and Real-Time Programming" course at the University of Padua.

Notifications You must be signed in to change notification settings

ilGobbo00/PeriodicTasksSimulator

Repository files navigation

Response Time Analysis for Concurrent Threads

This project is part of the "Concurrent and Real-Time Programming" course at the University of Padua.

The main goal of the assignment is to:

Simulate dynamic periodic task execution. A pre-defined set of routines (each with a unique 
assigned name) shall be defined in advance with given processor usage, period, and deadline. 
Each routine shall be composed of a program loop followed by a nanosleep() call. The exact 
amount of CPU time and, consequently, the processor utilization can be determined in advance 
using the time Linux command. The execution supervisor shall listen in TCP/IP for requests 
for task activation/deactivation. The received message shall specify the name of the task to 
be activated. A given task can be activated multiple times, starting a new thread 
running the selected routine. Before accepting a request for a new task, a response time 
analysis shall be carried out to assess the schedulability of the system.

Threads

The following threads have been created and analyzed:

Thread Name Period [ms] Computation Time [ms] Priority (1 = highest)
READ 500 10 1
STORE 300 6 2
SEND 200 10 3

Time Analyses

For the time analyses, the time command (Linux) has been used, and to obtain a mean value, the Python script has been executed once for each task.

To check the correctness of the main program, some manual checks have been performed and are documented in the info file.

Usage

Compile the project using make and execute the following commands on two different terminals:

  • ./orchestrator <port>
  • ./client <port>

Once the connection is established, launch or stop the threads with the command <thread> <'start'/'end'> <id>.

About

This project is part of the "Concurrent and Real-Time Programming" course at the University of Padua.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published