How eitan-wajsberg/tp-sistemas-operativos-2024-1c works
Project Type and Purpose
• The project simulates distributed system components. It includes modules for CPU simulation, a kernel for process management and scheduling, memory management (memoria), and I/O management (entradasalida).
• The README also highlights dependencies (the so-commons-library) and deployment via the so-deploy script, indicating the use of real systems integration techniques in an educational environment.
Analysis of the File Structure
• Top-Level Components:
"cpu": Contains the CPU simulation logic, including the instruction cycle (ciclo_de_instruccion) and modules for handling connections and configurations.
"kernel": Implements process scheduling, command console, interface management, and resource handling. It includes subdirectories such as “planificacion” (for long- and short-term planning), “conexiones”, and “consola”.
"memoria": Handles memory management with modules for configuration, connection handling (for CPU, IO, kernel), memory management logic (gestion_memoria), and tables for memory allocation.
"entradasalida": Manages I/O operations and the filesystem aspect. It includes configuration files for various I/O devices and source code for managing connections and system files.
"utils": Contains shared functionalities and utility functions such as communications, serialization, and support for shared data structures.
• Common patterns:
The presence of “conexiones” in each module indicates a design that emphasizes inter-module communication through network or IPC-like mechanisms.
Each module has its own makefile and configuration files, implying separation of concerns and independent compilation/deployment.
Inclusion of scripts in the kernel and memoria folders suggests both testing scenarios and automated deployment/testing scripts.
a. Main Components:
– CPU Module: Simulates CPU instruction cycles and interacts with other modules.
– Kernel Module: Acts as the core orchestrator for process scheduling, interfacing with both the CPU and the memory.
– Memory Module (Memoria): Manages memory allocation, read/write operations, and interacts via connections with CPU, Kernel, and IO.
– Entradasalida Module (I/O): Handles input/output operations and supports the file system simulation.
– Utils Module: Provides shared libraries (communication, serialization, data structures) used by all other modules.
b. Relationships and Interactions:
– The CPU sends instructions and state updates to the Kernel; it also might request memory operations from the Memoria module.
– The Kernel manages process lifecycle and scheduling, interacting with both CPU (for process execution simulation) and Memoria (for memory allocation and management).
– The Memoria module handles memory requests from both the CPU and Kernel, maintaining tables and managing free frames.
– The Entradasalida module handles I/O requests that may be triggered by both the Kernel and the Memoria module (for file system operations).
– The shared Utilties module underpins inter-process communications and data serialization across modules.
c. Architectural Patterns and Design Principles:
– Modular design: Each component (CPU, Kernel, Memoria, Entradasalida, and Utils) is independently developed, compiled, and then integrated.
– Use of configuration files: Every module contains its own configuration settings that might modify runtime behavior in a distributed system.
– Clear separation of concerns: Scheduling, memory management, I/O, and CPU simulation are compartmentalized into distinct modules.
– Communication abstraction: “conexiones” directories in modules indicate a pattern of abstracting inter-module communications.
d. Relevant Technologies, Frameworks, and Libraries:
– so-commons-library: A dependency that provides common functionalities, possibly for logging, thread management, or communication.
– Build tools (makefiles) for compiling each module.
– Visual Studio Code workspace setup (tp.code-workspace) to handle the project in an IDE.
– Deployment script (so-deploy) to package and deploy the project across machines.
Including Elements
– Additional Details: Optionally, include annotations for configuration files and deployment scripts if these are critical to understanding the architecture.