How shahriar-0/operating-system-course-projects-f2023 works
This repository is structured around three separate operating system projects for a course, each implementing a distinct system-level concept:
CA1: Socket Programming
• Purpose: A customer-restaurant-supplier application using TCP sockets and UDP broadcasts for messaging.
• Main components:
– Multiple process types: customer, restaurant, supplier
– Network components: TCP socket communication (for internal messaging) and UDP for broadcasts
– Logging subsystem: Each process logs into its own file
• Relevant files:
– All code under "P1 - Socket Programming/Code" (contains source code and supporting makefiles)
– "Assets" include examples, descriptions, slides, and recipes for testing/understanding
• Architectural pattern: Process-based distributed communication using the POSIX sockets API
CA2: MapReduce Counter
• Purpose: Implements a MapReduce-style counter where cost values from CSV files (for various buildings’ bills) are processed concurrently.
• Main components:
– Data ingestion: Reading CSV files for multiple buildings
– Map stage: Each building creates its own process to process a part of the data
– Reduce stage: A main financial process receives data from multiple worker processes (communication via POSIX unnamed and named pipes)
– Inter-process communication: Reliance on pipes to manage distributed data processing
• Relevant files:
– All code under "P2 - Map Reduce/Code" (including Makefiles, source files, and building CSVs)
• Architectural pattern: MapReduce paradigm applied to cost counting, with process-based separation and IPC for data aggregation
CA3: Parallel Image Processing
• Purpose: Applies image filters to BMP24 images both serially and concurrently using POSIX threads.
• Main components:
– Image I/O: A custom Bmp class for reading/writing BMP files
– Filters: Filtering functions (e.g., vertical flip, Gaussian blur, purple haze) implemented in a designated filter namespace
– Serial processing: A version that processes the entire image in sequence
– Parallel processing: A thread pool implemented with POSIX threads, a mutex-protected task queue, and splitting the image into multiple BmpViews for concurrent processing
• Relevant files:
– Code directories under "P3 - MultiThread Image Processing/Code" (separate folders for serial and parallel implementations, build scripts, etc.)
• Architectural pattern: Parallelism using thread pools and task queues, with explicit division between serial and parallel pipelines
– One grouping for CA1 (Socket Programming)
– One grouping for CA2 (MapReduce Counter)
– One grouping for CA3 (Parallel Image Processing)
• CA1: List separate process types (customer, restaurant, supplier). Indicate that each process has its own logging component and communicates over TCP (for regular messages) and UDP (for broadcasts)
• CA2: Illustrate the Map stage (individual building processes reading CSV parts), Reduce stage (the central financial process), and show the different types of pipes connecting these processes (unnamed pipes for worker communications, named pipes for their connection to the central process)
• CA3: Show the image input component (Bmp loader), the filter engine (filter functions), the serial processing pipeline, as well as the parallel processing components including the thread pool and the task queue. Represent the division of the image into multiple BmpViews for concurrent processing
d. Incorporate architectural patterns and technology details:
• That CA1 is built using POSIX sockets with process separation and CLI-defined commands
• Use of inter-process communication (pipes) in CA2’s MapReduce model
• Use of POSIX threads and a mutex-protected task queue in CA3’s parallel image processing