Skip to content

lotricekCZ/IOS-project-2-skibus-fork-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[IOS project2] synchronization of multiple forked processes

This script solves skibus and skiers synchronization problem and this problem is an adaptation of the Senate Bus problem described in the Allen Downey's Little Book of Semaphores. This adaptation takes into account multiple bus stops on which passengers can enter the bus, but only if the bus capacity allows it. Skiers and the bus must report their status int the stdout so that thers's an evidence of them doing the actions described in the assignment. Script creates process for each skier and the bus that's taking them to their final station, creating number_of_skiers + 2 processes.

Usage

invoke make in the project root directory and then ./proj2 L Z K TL TB with parameters being

  • L: number of skiers, L<20000
  • Z: number of bus stops, 0<Z<=10
  • K: skibus capacity, 10<=K<=100
  • TL: Maximal skier breakfast-to-bus stop wait time v microseconds, 0<=TL<=10000
  • TB: Maximal station to station bus travel time. 0<=TB<=1000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published