{"id":29059244,"url":"https://github.com/linconavila/operational_systems","last_synced_at":"2025-06-27T07:06:06.214Z","repository":{"id":290382456,"uuid":"974255513","full_name":"LinconAvila/Operational_Systems","owner":"LinconAvila","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-24T05:13:06.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T13:49:03.084Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LinconAvila.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-28T13:47:01.000Z","updated_at":"2025-05-24T18:58:41.000Z","dependencies_parsed_at":"2025-04-28T14:50:32.517Z","dependency_job_id":"3db80a48-59e4-44b6-8b2e-96e6d405dc1a","html_url":"https://github.com/LinconAvila/Operational_Systems","commit_stats":null,"previous_names":["linconavila/computing-fundamentals","linconavila/operational_systems"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LinconAvila/Operational_Systems","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinconAvila%2FOperational_Systems","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinconAvila%2FOperational_Systems/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinconAvila%2FOperational_Systems/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinconAvila%2FOperational_Systems/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinconAvila","download_url":"https://codeload.github.com/LinconAvila/Operational_Systems/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinconAvila%2FOperational_Systems/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262210195,"owners_count":23275494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-27T07:06:03.433Z","updated_at":"2025-06-27T07:06:06.205Z","avatar_url":"https://github.com/LinconAvila.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Operational Systems\n\nThis repository contains a collection of programs demonstrating various concepts in operating systems, including process management, thread synchronization, and parallel computing. The programs are written in C and C++ and cover a range of topics from basic process creation to matrix operations using threads.\n\n---\n\n## Programs Overview\n\n### 1. Process Management\n\n- **collatz_sequence_processes.c**: Demonstrates process creation using `fork()` and the Collatz sequence calculation.\n- **extern_process_executing.c**: Shows how to execute an external program using `fork()` and `execl()`.\n- **process_array_multiplication.c**: Multiplies two arrays using processes, showcasing process creation and synchronization.\n- **process_parity_array_ops.c**: Performs array operations based on the parity of process IDs, demonstrating conditional process behavior.\n\n### 2. Thread Synchronization and Parallel Computing\n\n- **matrix_sum_threads.c**: Sums two matrices using threads, with workload distribution and synchronization.\n- **matrix_product.c**: Multiplies two matrices using threads, demonstrating parallel computation.\n- **sum_matrices.c**: Another implementation of matrix summation using threads.\n- **transpose_matrices.c**: Transposes a matrix using threads, showcasing parallel data transformation.\n- **vector_product.c**: Multiplies two vectors using threads, illustrating parallel element-wise operations.\n\n### 3. File and Text Processing\n\n- **text_analyser.c**: Analyzes text files in a directory using threads, counting words, vowels, and consonants.\n- **image_converter.cpp**: Converts a color image to grayscale using threads, demonstrating parallel image processing with OpenCV.\n\n---\n\n## Compilation and Execution\n\n### C Programs\n\nTo compile and run the C programs:\n```bash\ngcc program_name.c -o output_name -lpthread\n./output_name\n```\n\n### C++ Program (Image Converter)\n\nTo compile and run the C++ program:\n```bash\ng++ image_converter.cpp -o image_converter -lpthread -lopencv_core -lopencv_highgui -lopencv_imgproc\n./image_converter\n```\n\n---\n\n## Features\n\n- **Process Management**: Demonstrates `fork()`, `waitpid()`, and `execl()`.\n- **Thread Synchronization**: Uses `pthread_create()`, `pthread_join()`, and workload balancing.\n- **Parallel Computing**: Implements matrix and vector operations using threads for efficiency.\n- **Error Handling**: Includes robust input validation and error handling.\n- **Performance Measurement**: Measures execution time for parallel tasks.\n\n---\n\n## Usage Examples\n\n- **Matrix Summation**:  \n  Run `matrix_sum_threads.c`, input matrix dimensions, and observe the parallel summation.\n\n- **Text Analysis**:  \n  Run `text_analyser.c`, provide a directory path, and analyze text files for word and character statistics.\n\n- **Image Conversion**:  \n  Run `image_converter.cpp`, input an image path, and convert it to grayscale using multiple threads.\n\n---\n\n## Dependencies\n\n- **C Programs**: Standard C libraries (`stdio.h`, `stdlib.h`, `pthread.h`, etc.).\n- **C++ Program**: OpenCV library for image processing.\n\n---\n\n## Notes\n\n- Ensure all dependencies are installed before compiling.\n- Adjust the number of threads or processes based on your system's capabilities for optimal performance.\n\n---\n\nThis repository serves as a practical guide for understanding operating system concepts through hands-on programming. Feel free to explore, modify, and extend the programs for further learning.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinconavila%2Foperational_systems","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinconavila%2Foperational_systems","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinconavila%2Foperational_systems/lists"}