Plazza - Pizzeria Simulation

May 8, 2023
to
May 28, 2023
Overview
The Plazza is a project that simulates the operations of a pizzeria, including a reception, multiple kitchens, cooks, and pizza cooking processes. The simulation focuses on aspects like load balancing, process/thread synchronization, and inter-process communication (IPC).
Key Features
Interactive Shell: Allows users to place pizza orders and view the status of kitchens, including current cook occupancy and ingredient stocks.
Dynamic Kitchen Creation: Kitchens are created as child processes as needed, depending on the incoming order volume. Each kitchen contains a predefined number of cooks (threads), and can only accept a limited number of pizza orders at a time.
Load Balancing: Orders are allocated pizza by pizza to the kitchens in a balanced manner to avoid kitchen saturation.
Communication: Uses inter-process communication (IPC) to facilitate communication between the reception and the kitchens.
Logging: Maintains a record of completed orders, which are also displayed to the user.
Ingredient Stock Management: Each kitchen starts with a stock of ingredients, which regenerate every N seconds.
Technical Details
Processes (man fork, man exit, man wait, man ...)
Inter-process communication (IPC)
STL threads
Threads(jthread…)
Pizza Types
Margarita: Contains dough, tomato and gruyere. Baked in 1 sec * multiplier.
Regina: Contains dough, tomato, gruyere, ham, mushrooms. Baked in 2 secs * multiplier.
Americana: Contains dough, tomato, gruyere, steak. Baked in 2 secs * multiplier.
Fantasia: Contains dough, tomato, eggplant, goat cheese and chief love. Baked in 4 secs * multiplier.
Contributions
The project was a collaboration with Kevin CARTTIGUEANE, Jules DUTEL, and Thomas HEILES.