Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Operating Systems Assignment 5 - Simulations

This homework project for an operating systems course contains Java programs demonstrating parallel computing concepts, including Amdahl's Law and various concurrency patterns.

Files

  • AmdahlSimulator/AmdahlSimulator.java - Amdahl's Law simulator for parallel speedup analysis
  • ConcurrencySimulations/ConcurrencySimulations.java - Menu-based concurrency simulations

Requirements

  • Java: JDK 8 or higher
  • Dependencies: None (uses only Java standard library)

Compiling

Compile both programs:

javac AmdahlSimulator/AmdahlSimulator.java
javac ConcurrencySimulations/ConcurrencySimulations.java

Running

Amdahl's Law Simulator

java AmdahlSimulator.AmdahlSimulator

Analyzes parallel speedup based on Amdahl's Law, showing how serial portions limit performance gains.

Concurrency Simulations

java ConcurrencySimulations.ConcurrencySimulations

When the program starts, an interactive menu will appear with various concurrency demonstrations:

  • Thread vs Process concepts
  • CPU-bound and I/O-bound operations
  • Thread synchronization examples
  • Performance comparisons

Simulations

Amdahl's Law Simulator

  • Calculates theoretical speedup for parallel programs
  • Demonstrates impact of serial portions on scalability
  • Shows speedup curves with varying parallelizable portions
  • Helps understand limits of parallel performance

Concurrency Simulations

  • Thread creation and management
  • Process vs Thread comparisons
  • Synchronization mechanisms
  • Race conditions and thread safety
  • CPU-bound vs I/O-bound task demonstrations
  • True parallelism examples

Usage Example

  1. Compile the programs using the commands above
  2. Run the desired simulation
  3. Follow the interactive prompts
  4. Enter menu options to explore different concepts

Notes

  • Uses Java standard library (java.util.concurrent, java.lang.Thread, etc.)
  • Simulations are for educational purposes
  • Demonstrates fundamental operating system concepts

Author

Operating Systems course homework assignment

Cemil Ilkim Teke


Note: This is a simple homework project and requires no additional files or configuration.

About

This homework project for an operating systems course contains Java programs demonstrating parallel computing concepts, including Amdahl's Law and various concurrency patterns.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages