Skip to content

Scheduling Ships is a C-based thread library, CEThreads, that simulates ship traffic through a virtual canal using customizable scheduling algorithms like Round-Robin, Priority, SJF, and Real-Time. It ensures collision-free, bidirectional ship flow control.

Notifications You must be signed in to change notification settings

Carlos12001/scheduling-ships

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scheduling Ships

Scheduling Ships is a project that implements a custom thread library in C called CEThreads, designed to manage scheduling algorithms for controlling ship traffic through a virtual canal.

Features

  • Custom thread library (CEThreads) similar to Pthreads.
  • Support for multiple scheduling algorithms:
    • Round-Robin (RR)
    • Priority Scheduling
    • Shortest Job First (SJF)
    • First Come First Serve (FCFS)
    • Real-Time Scheduling
  • Flow control mechanisms for ship traffic:
    • Equity (W ships from each side)
    • Sign-based control (direction switching)
    • Tico (free flow with collision prevention)

Project Structure

  • CEThreads: Custom thread library with basic thread creation, joining, and mutex functionality.
  • Schedulers: Handles ship scheduling based on the chosen algorithm.
  • Canal Simulation: Simulates a bidirectional canal where ships travel, with configurable flow control.

Setup and Usage

Tools

sudo apt install build-essential cmake ninja-build python3-tk
pip install Pillow

Configuration

Modify the configuration file to set parameters for the canal:

  • Canal length
  • Ship speed
  • Number of ships
  • Scheduling algorithm (RR, Priority, SJF, FCFS, Real-Time)
  • Flow control method

Design Hardware

https://docs.google.com/spreadsheets/d/19UOhnq-4k82qcbcaTn_bHiEcXRDhYykFDQgcdTzBlP0/edit?usp=sharing


About

Scheduling Ships is a C-based thread library, CEThreads, that simulates ship traffic through a virtual canal using customizable scheduling algorithms like Round-Robin, Priority, SJF, and Real-Time. It ensures collision-free, bidirectional ship flow control.

Topics

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •