process-synchronization

There are 32 repositories under process-synchronization topic.

  • Cheejyg/CZ2005-Operating-Systems-Experiment-2-Process-Synchronization

    We have two exercises in this experiment. 1. In this exercise, we will conduct the following steps to understand race condition problem in Nachos. 1) Change your working directory to lab2 by typing cd ~/nachos-3.4/lab2 2) Read the Nachos thread test program threadtest.cc carefully. There is a shared variable named value (initially zero). There are two functions, namely void Inc(_int which) and void Dec(_int which), where increases and decreases value by one, respectively. In this exercise, you need to consider different interleaving executions of Inc and Dec so that the shared variable value is equal to a predefined value after threads complete. 3) You need to implement the following three functions. When all the threads (two Inc_v1 threads and two Dec_v1 threads) complete in TestValueOne(), value=1. void Inc_v1(_int which) void Dec_v1(_int which) void TestValueOne() In Inc_v1 and Dec_v1, you need to use Yield primitive in Nachos to induce context switch. Inc_v1 and Dec_v1 should have the same logic as Inc and Dec, respectively. You are only allowed to add Yield into those two functions. You need to implement ThreadValueOne() by creating two threads with Inc_v1 and two threads with Dec_v1. The current thread should wait for all those threads to complete. At the end of TestValueOne(), a checking is performed on whether the value is 1. If the checking is passed, you should get the message "congratulations! passed.". Otherwise, an error message is printed. 4) After you finish implementing the above-mentioned functions, you can demonstrate the result of TestValueOne(), by commenting other test functions in ThreadTest() like below. //for exercise 1. TestValueOne(); //TestValueMinusOne(); //for exercise 2. //TestConsistency(); 5) Compile Nachos by typing make. If you see "ln -sf arch/intel-i386-linux/bin/nachos nachos” at the end of the compiling output, your compilation is successful. If you encounter any anomalies, type make clean to remove all object and executable files and then type make again for a clean compilation. 6) Test this program by typing ./nachos. If you see “congratulations! passed.” at the end of the debugging messages, your program is successful. Otherwise, “failed.” will be displayed. 7) Repeat Steps 3)—6), and implement the following three functions. When all the threads (two Inc_v2 threads and two Dec_v2 threads) complete in TestValueMinusOne(), value=-1. At Step 4), you need to test TestValueMinusOne(). void Inc_v2(_int which) void Dec_v2(_int which) void TestValueMinusOne() 2. In this exercise, we will conduct the following steps to understand process synchronization problem in Nachos. 1) Change your working directory to lab2 by typing cd ~/nachos-3.4/lab2 2) You need to implement the following three functions. When all the four threads (two Inc_Consistent threads and two Dec_Consistent threads) complete in TestConsistency(), value=0. You need to achieve consistent result (value=0), regardless of different interleaving execution orders in Inc_Consistent and Dec_Consistent as well as different thread fork orders in TestConsistency(). void Inc_Consistent (_int which) void Dec_Consistent (_int which) void TestConsistency () In Inc_Consistent and Dec_Consistent, you use Yield interface in Nachos to induce context switch. You need to implement TestConsistency() by creating two threads with Inc_Consistent and two threads with Dec_Consistent. The current thread should wait for all those threads to complete. At the end of TestConsistency(), a checking is performed on whether the value is 0. If the checking is passed, you should get the message "congratulations! passed.". Otherwise, an error message is printed.3) After you finish implementing the above-mentioned functions, you can demonstrate the result of TestConsistency(), by commenting other test functions in ThreadTest() like below. //for exercise 1. //TestValueOne(); //TestValueMinusOne(); //for exercise 2. TestConsistency(); 4) Compile Nachos by typing make. If you see "ln -sf arch/intel-i386-linux/bin/nachos nachos” at the end of the compiling output, your compilation is successful. If you encounter any anomalies, type make clean to remove all object and executable files and then type make again for a clean compilation. 5) Test this program by typing ./nachos. If you see “congratulations! passed.” at the end of the debugging messages, your program is successful. Otherwise, “failed.” will be displayed. In the oral exam, you need to demonstrate your testing with different interleaving execution orders in Inc_Consistent and Dec_Consistent as well as different thread fork orders in TestConsistency().

    Language:C++3303
  • rohanrao619/Operating_System_Algorithms

    Implementation of OS Process and Disk Scheduling Algorithms in C.

    Language:C3203
  • alexandreLamarre/dlock

    Reliable & scalable distributed locking, scheduling and process synchronization

    Language:Go2210
  • Dare-marvel/Operating-Systems--OS--

    💻 Welcome to the Operating Systems Repository! 📚✨ Immerse yourself in a meticulously curated knowledge reservoir on Operating Systems. 🌐💡 Explore the intricacies of system management, processes, and kernel architecture. 🚀🔍 Master the art of efficient operating system navigation in this dynamic space! 👨‍💻🌐

    Language:C210
  • EStog/PathEx

    Declarative task synchronization in Python inspired by Path Expressions

    Language:Python2250
  • gustavooquinteiro/operating-system

    Implementing known synchronization problems in Python

    Language:Python2100
  • nikita9604/Dekker-s-Algorithm

    Dekker's Algorithm using Scilab

    Language:Scilab210
  • SamFu1113/Process-synchronization-using-semaphores

    Practice for process synchronization

    Language:C2120
  • ayushgupta138/Starvation-free-Readers-Writers-Problem

    Solution to starvation free reader writers problem using FIFO semaphores

    Language:C++1100
  • eduschadesoares/sistemasOperacionais2

    Sistemas Operacionais (4º Ano)

    Language:Java1000
  • iamgideonidoko/boat-passenger-c-solution

    C solution to the Boat Passenger Problem in operating system.

    Language:C110
  • minhngt62/os-dining-philosopher

    A simulation of dining philosophers problem and its solutions

    Language:Python1100
  • zhangwengyu999/Appointment_Organizer_Project

    An Appointment Organizer (APO) Project in C

    Language:C1101
  • Aayushraj1/Operating-System-Questions

    All important questions considering every chapters of operating system and some programs.

  • Barb02/SO_Restaurant

    Simulation of a dinner between friends, using semaphores.

    Language:C0100
  • definitelyliz/Process-Synchronization

    A simulation of process synchronization.

    Language:Python0100
  • hveini/mod_serializer

    Apache web server module to make parallel requests serial.

    Language:C0100
  • jm55/CSOPESY

    Github Repository for CSOPESY

    Language:Java0200
  • Hariharan-SV/Producer_Consumer

    Visualizing Producer-Consumer problem as a photocopy centre where clients are producers and printers are consumers

    Language:C10
  • KPlanisphere/ipc-c

    Practica 7 - Sistemas Operativos

    Language:C10
  • KPlanisphere/process-management

    Practica 5 - Sistemas Operativos

    Language:C10
  • logos914/TUI_UNGS_-_09_-_Sor_1_-_TP_1_Sistemas_Operativos_TULA_-_Com2_S1_2019

    Trabajo Práctico 1 de Sistemas Operativos y Redes. Bash, C, Hilos, Sincronización, Fork, Noción de paralelismo

    Language:C20
  • MariaAguiar/pipex

    6th Project of the 42 Common Core

    Language:C10
  • mstrlc/ios-project-2

    FIT VUT – IOS – bulding H2O problem with semaphores

    Language:C10
  • nepiskopos/linux-process-synchronization

    Linux Process Synchronization and Communication using Semaphores and Shared Memory Segments.

    Language:C10
  • PalAditya/OSLab

    Codes for Operating Systems Lab in 5th Semester

    Language:C10
  • robkle/minishell

    Simple Unix command interpreter with builtins.

    Language:C10
  • saad0510/road-intersection-problem

    A process synchronization problem.

    Language:C10
  • tahaShm/multithreading

    This is an operating system project intended to simulate a transportation system using multi-threading, semaphores, and process synchronization methods.

    Language:C++20
  • tibetteixeira/operating-system

    Repository for the Operating Systems discipline at the Federal University of Ceará.

    Language:Jupyter Notebook112
  • utkarsh512/ec60012

    Advanced Operating Systems Design

    Language:C10