Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.

SauzeauYannis/System-programming-Project

Repository files navigation

System-programming-Project

Table of Contents

Ce projet a été effectué en troisième année du CMI Informatique à l'UFR SFA Université de Poitiers dans le cadre de l'enseignement Programmation avancée en C.

Ce projet a été développé en binôme et avec l'EDI Visual Studio Code sur Ubuntu.

Le but est de determiner si un nombre est premier en se basant sur le crible d’Eratosthène, et plus precisement sur la version pipeline : le crible de Hoare.

Pour lancer le programme sous linux, utilisez la commande "./master" en premier, puis lancer autant de "./client" que nécessaire.

Vous intéragissez avec le programme client qui envoie l'ordre au master qui créé des workers pour traiter la demande.

Le client peut demander au master de savoir si un nombre est premier, combien il en a calculé et quel est le plus grand nombre premier qu'il a calculé.

Le client peut aussi calculer si un nombre est premier localement et sans l'aide du master.

Chaque worker à la charge d'un seul nombre premier.

Si vous voulez recompiler le projet, utilisez la commande "make".

  • Programmation système Unix
    • Communication inter-processus
      • Utilisation de sémaphores
      • Utilisation de tubes nommés
      • Utilisation de tubes anonymes
      • Utilisation des fichiers
    • Communication bidirectionnelle
    • Processus léger
  • Programmation en C
    • Programmation modulaire
    • Utilisation de débogueur mémoire (Valgrind)
    • Entrées-sorties de fichiers

Nous avons obtenu la note de 16/20.

This project was carried out in the third year of the CMI Informatique at the University of Poitiers as part of the Advanced C programming teaching programme.

This project was developed in pairs and with Visual Studio Code IDE on Ubuntu.

The goal is to determine if a number is prime based on the Sieve of Eratosthenes, and more precisely on the pipeline version: the Hoare sieve.

To launch the programme under linux, use the "./master" command first, then launch as many "./client" as necessary.

You interact with the client program which sends the order to the master who creates workers to process the request.

The client can ask the master to find out if a number is prime, how many it has calculated, and what is the largest prime number it has calculated.

The client can also calculate whether a number is prime locally and without the help of the master.

Each worker is responsible for a single prime number.

If you want to recompile the project, use the "make" command.

  • Unix system programming
    • Inter-process communication
      • Use of semaphores
      • Use of named pipelines
      • Use of anonymous pipelines
      • Use of files
    • Bi-directional communication
    • Threads
  • Programming in C
    • Modular programming
    • Use of memory debugger (Valgrind)
    • File input/output

We obtained a score of 16/20.