Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Operating Systems Practical Work

Rating
-
Sold
-
Pages
5
Uploaded on
22-04-2026
Written in
2025/2026

Operating Systems Practical Work

Institution
ESSTHS

Content preview

École Supérieure des Sciences et de la Technologie de Hammam Sousse

TP : Système D’exploitation 2 Durée : 1h30 / Classe : LI1
Enseignant : Ben Khlifa Hamza Année universitaire : 2025-2026



💻Correction TP6: Communication
Inter-Processus (Signaux)
✅ Exercice 1 : Ignorer SIGINT (Ctrl+C)🧪
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
int main() {
signal(SIGINT, SIG_IGN); // Ignorer Ctrl+C
while (1) {
printf("Toujours vivant !\n");
sleep(1);
}
return 0;
}




✅fonction 🧠
Exercice 2 : Gérer SIGUSR1 avec une

#include <signal.h>
#include <stdio.h>
#include <unistd.h>
void mon_handler(int sig) {
printf("Signal %d reçu ! Action spéciale exécutée !\n", sig);
}
int main() {
signal(SIGUSR1, mon_handler);
printf("PID = %d\n", getpid()); // Pour pouvoir envoyer un signal avec
kill


1/5

, École Supérieure des Sciences et de la Technologie de Hammam Sousse

TP : Système D’exploitation 2 Durée : 1h30 / Classe : LI1
Enseignant : Ben Khlifa Hamza Année universitaire : 2025-2026

while (1) {
printf("Attente de signal...\n");
sleep(2);
}
return 0;
}



🔧 Test :
kill -USR1 <PID>




✅SIGKILL 🧑‍🔧
Exercice 3 : Terminer un processus avec

#include <stdio.h>
#include <unistd.h>
int main() {
printf("PID = %d\n", getpid());
while (1) {
printf("Je suis invincible ? Essayez...\n");
sleep(2);
}
return 0;

🔧 Test :
kill -KILL <PID>




✅SIGUSR2 🚀
Exercice 4 : Réagir différemment à SIGUSR1 et

#include <signal.h>
#include <stdio.h>

2/5

Document information

Uploaded on
April 22, 2026
Number of pages
5
Written in
2025/2026
Type
Class notes
Professor(s)
Yassmine yazid
Contains
All classes

Subjects

$8.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
yassmineyazid

Also available in package deal

Thumbnail
Package deal
Operating Systems
-
10 2026
$ 89.90 More info

Get to know the seller

Seller avatar
yassmineyazid ESSTHS
View profile
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 weeks
Number of followers
1
Documents
73
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions