This repository contains all projects related to the Operating System course offered by University of Tehran.
The repository is organized into the following structure:
-
Socket Programming: This project establishes a robust communication network between three distinct user types: customers, restaurants, and suppliers. Using TCP and UDP ports, these users can seamlessly interact and exchange information.
User Types:
Customers:
Connect to restaurants to place orders, view menus, and etc.Restaurants:
Accept orders from customers, manage inventory, and communicate with suppliers.Suppliers:
Provide restaurants with ingredients and supplies, track inventory levels, and receive orders.
Communication Protocols:
The system utilizes both TCP and UDP protocols to ensure reliable and efficient communication.
TCP:
Used for critical data transfers, such as order placement.UDP:
Used for real-time updates, such as opening notification.
Features:
- Seamless communication between customers, restaurants, and suppliers
- Real-time updates and inventory management
-
Map Reduce: This project utilizes the MapReduce programming model to analyze the utility usage of different buildings. It processes large datasets containing electricity, gas, and water consumption data to calculate various metrics.
Map Phase:
- Parses input records and extracts relevant data (e.g., building ID, utility type, consumption value)
Reduce Phase:
- Aggregates consumption values for each building and utility type
- Calculates metrics such as total consumption, average consumption, peak consumption, and bill
-
Multi Threading: This multithreading application leverages multiple threads to concurrently apply a series of filters to an input image. It optimizes image processing performance by distributing the workload across available CPU cores.
Multithreading Process:
Thread Creation:
- The application creates multiple threads, each responsible for applying a specific filter to the input image.
Concurrent Processing:
- Threads run concurrently, processing different parts of the image simultaneously.
Image Combination:
- Once all filters have been applied, the final processed image is generated by combining the results from each thread.