25-01-2026-Industrial Automation - Scheduling Algorithms [EN]-[IT]

~~~ La versione in italiano inizia subito dopo la versione in inglese ~~~
ENGLISH

25-01-2026-Industrial Automation - Scheduling Algorithms [EN]-[IT]
With this post, I would like to provide a brief explanation of the topic in question.
(lesson/article code: EX_LS_14)

Image created with artificial intelligence, the software used is ChatGPT
What are scheduling algorithms

Image created with artificial intelligence, the software used is Notebooklm
A scheduling algorithm is a solution to a concurrent programming problem within of an automation system
The concurrent scheduling problem is a common problem in production processes.
In a factory, there are countless tasks that want to start at the same time (concurrency), but often there's only one "brain" (the computer or processor) that has to manage them all, or only one machine that can do one thing at a time. The problem is: who goes first? If two tasks try to use the same resource together, the system crashes and creates rather serious slowdowns.
Essentially, this is where the scheduling algorithm comes to the rescue.
The scheduling algorithm is like a traffic policeman or the system organizer. It's a sequence of instructions that decides the exact order in which tasks must be executed.
What are scheduling algorithms used for

Scheduling algorithms are fundamental tools in industrial automation for managing and coordinating different activities within a system.
The primary purpose of scheduling algorithms is to coordinate different tasks to optimize the use of available computing units and resources.
Below is a list of the specific purposes of scheduling algorithms:
- Manage concurrency. That is, resolve conflicts when multiple tasks require the same limited resource or the same computing unit.
- Ensure compliance with constraints. This means they ensure that tasks are executed according to their priorities.
- Manage periodic work cycles
- Perform dispatching. Scheduling algorithms decide the exact sequence in which tasks are sent to the processing unit.
- Admission control. This is used to preemptively verify whether a task (an activity) can be completed by its deadline; otherwise, the task is discarded to avoid compromising the rest of the system.

Image created with artificial intelligence, software used is Notebooklm
Exercise
I'll try to show an exercise specifically about scheduling. I'll keep it simple so it's easy to understand.
Given a scheduling problem consisting of n=2 periodic tasks (A1,A2) such that:
• 𝑇1=8 time units (t.u.) and 𝐶𝐶1=2 t.u.;
• 𝑇2=12 time units (t.u.) and C2=8 t.u.;
Determine whether it is schedulable.
-1-The formula for calculating the utilization factor
The first step in determining schedulability is to calculate the utilization factor, which represents the percentage of time the computational resource (the processor) is occupied. The formula for calculating the utilization factor is as follows:

-2-Substitution of values
Now let's replace the values in the formula with the data from the exercise.
For tasks A1 and A2, we will have…

-3-The utilization factor U
The utilization factor U will therefore be…

-4-Result
We can make the following consideration.
Since the utilization factor U is less than 1, the necessary condition for schedulability is satisfied. If U were greater than 1, the problem would not have had any solution because the processor would be overloaded.
Therefore, the set of tasks is schedulable.
Conclusions
In industrial automation, managing periodic tasks is essential for coordinating work cycles in event-controlled systems.
A scheduling algorithm is not just a sequence of operations, but the solution to a concurrent scheduling problem.
Imagine a large logistics hub. Its goal is not just to dispatch trucks, but to ensure that every delivery arrives intact and that perishable products arrive before their expiration dates. If too many orders arrive at once (U > 1), the system collapses; a good manager is one who knows how to organize shifts (i.e., scheduling) to maximize warehouse utilization without ever creating bottlenecks that block urgent deliveries.
Historical Notes and Questions
A crucial moment in the history of scheduling algorithms occurred in 1975, when it was demonstrated that the general scheduling problem is NP-HARD (extremely complex mathematical and computational problems).
The field of automation found a pragmatic path in the 1970s, moving from studying generic problems to defining simplifying assumptions. Did you know that these simplifying assumptions allowed the development of efficient scheduling algorithms for real-world scenarios?

ITALIAN

25-01-2026-Automazione industriale - Algoritmi di scheduling [EN]-[IT]
Con questo post desidero fornire una breve spiegazione sull’argomento indicato in oggetto
(codice lezione/articolo: EX_LS_14)

immagine creata con l’intelligenza artificiale, il software usato è ChatGPT
Cosa sono gli algoritmi di scheduling

immagine creata con l’intelligenza artificiale, il software usato è Notebooklm
Un algoritmo di scheduling è una soluzione a un problema di programmazione concorrente all'interno di un sistema di automazione
Il problema di programmazione concorrente è un problema molto sentito nei processi di produzione.
In una fabbrica ci sono tantissimi task che vorrebbero iniziare nello stesso momento (concorrenza), ma spesso c'è un solo "cervello" (il computer o processore) che deve gestirli tutti, o una sola macchina che può fare una cosa alla volta. Il problema è: chi inizia per primo? Se due task provano a usare la stessa risorsa insieme, il sistema va in tilt e si creano rallentamenti piuttosto seri.
Praticamente, è in situazioni del genere che arriva in aiuto l’Algoritmo di Scheduling.
L'algoritmo di scheduling è come un vigile urbano o l'organizzatore del sistema. È una sequenza di istruzioni che decide l'ordine esatto in cui i compiti devono essere eseguiti.
A cosa servono gli algoritmi di scheduling

Gli algoritmi di scheduling sono strumenti fondamentali nell'automazione industriale per la gestione e il coordinamento di diverse attività all'interno di un sistema.
Lo scopo principale degli algoritmi di scheduling è il coordinamento di differenti task per ottimizzare l'uso delle unità di calcolo e delle risorse disponibili.
Qui di seguito un elenco di ciò che servono nello specifico gli algoritmi di scheduling:
- Gestire la concorrenza. Cioè risolvere i conflitti quando più attività necessitano della stessa risorsa limitata o della stessa unità di calcolo
- Garantire il rispetto dei vincoli. Significa che assicurano che i compiti vengano eseguiti rispettando le precedenze.
- Gestire cicli di lavoro periodici
- Effettuare il Dispatching. Gli algoritmi di scheduling decidono la sequenza esatta con cui i task vengono inviati all'unità di elaborazione
- Controllo dell'ammissione (Admission Control). Questo serve a verificare preventivamente se un task (un’attività) può essere completato entro la sua deadline; in caso contrario, il task viene scartato per non compromettere il resto del sistema.

immagine creata con l’intelligenza artificiale, il software usato è Notebooklm
Esercizio
Provo a mostrare un esercizio a riguardo proprio dello scheduling, lo renderò semplice in modo che sia comprensibile.
Dato un problema di scheduling costituito da n=2 task periodici (A1,A2) tali che:
•𝑇1=8 time unit (t.u.) e 𝐶𝐶1=2 t.u.;
• 𝑇2=12 time unit (t.u.) e C2=8 t.u.;
Stabilire se esso è schedulabile.
-1-La formula per calcolare il fattore di utilizzazione
Il primo passo per stabilire la schedulabilità è calcolare il fattore di utilizzazione, che rappresenta la percentuale di tempo in cui la risorsa computazionale (il processore) è occupata. La formula per calcolare il fattore di utilizzazione è la seguente:

-2-sostituzione dei valori
Andiamo ora a sostituire i valori nella formula con i dati dell’esercizio.
Per task A1 e A2 avremo…

-3-Il fattore di utilizzazione U
Il fattore di utilizzazione U sarà quindi…

-4-Risultato
Possiamo fare la seguente considerazione.
Poiché il fattore di utilizzazione U è minore di 1, la condizione necessaria di schedulabilità è soddisfatta. Se U fosse stato maggiore di 1, il problema non avrebbe ammesso alcuna soluzione poiché il processore sarebbe stato sovraccarico.
Quindi l'insieme di task è schedulabile.
Conclusioni
Nell'automazione industriale, la gestione di task periodici è essenziale per coordinare cicli di lavoro in impianti a eventi programmati.
L'algoritmo di scheduling non è solo una sequenza di operazioni, ma la soluzione a un problema di programmazione concorrente.
Immaginiamo un grande hub logistico. Il suo obiettivo non è solo far partire i camion, ma assicurarsi che ogni consegna arrivi integra e che i prodotti deperibili arrivino prima della scadenza. Se arrivano troppi ordini contemporaneamente (U > 1), il sistema collassa; il bravo gestore è colui che sa organizzare i turni (cioè lo scheduling) in modo da sfruttare al massimo i magazzini senza mai creare ingorghi che blocchino le consegne urgenti.
Cenni storici e domande
Un momento cruciale nella storia degli algoritmi di scheduling è rappresentato dal 1975, anno in cui è stato dimostrato che il problema generale dello scheduling è di tipo NP-HARD (problemi matematici e computazionali estremamente complessi).
Il campo dell'automazione ha trovato una strada pragmatica negli anni ‘70 e si è passati dallo studio di problemi generici alla definizione di ipotesi semplificative. Sapevate che queste ipotesi semplificative hanno permesso di sviluppare algoritmi di scheduling efficienti per gli scenari reali?
THE END
hahaha,I like your comment, thanks for making me smile, I needed it, it was a very long day, a lot of work
Lo scheduling si usa non solo in automazione industriale, ma anche in informatica, noi spesso lo usiamo a lavoro
!PIZZA
$PIZZA slices delivered:
@davideownzall(1/15) tipped @stefano.massari
Send $PIZZA tips in Discord via tip.cc!
Congratulations @stefano.massari! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)
You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOPThis must have really been a whole lot. Is this algorithm still relevant till today
Molti di noi vorrebbero evitare gli algoritmi, ma oggigiorno riescono a individuarci anche mentre dormiamo.