Implementation of the Semaphore algorithm, which's a synchronization mechanism to control the processes that are being executed in the critical section and being used by shared resources.
RunTransactons simulates transactions being processed on bank accounts. There is always a chance that more than one thread will want to update an account at the same time. In that case, ATMs that are being used by the same account at the same time by different users might not get the most up-to-date account information(balance), which can cause banks financial loss. So the program uses critical sections to avoid that issue, and makes other threads wait until the account is ready to be reused without giving users any errors.
Jajodia-Mutchler Voting Algorithm handles the consistency of file updates when the network is partitioned. This uses hybrid Voting technique and 3 phase commit protocol to accomplish this huge task.
Course project: Operating Systems (OS) ➟ Wite a shell script that produces a file of sequential numbers by reading the last number in the file, adding 1 to it, and then appending to the file. Run one instance of the script in the background and one in the foreground, each accessing the same file. Modify the script to prevent the race.