This homework project for an operating systems course contains Java programs demonstrating parallel computing concepts, including Amdahl's Law and various concurrency patterns.
AmdahlSimulator/AmdahlSimulator.java- Amdahl's Law simulator for parallel speedup analysisConcurrencySimulations/ConcurrencySimulations.java- Menu-based concurrency simulations
- Java: JDK 8 or higher
- Dependencies: None (uses only Java standard library)
Compile both programs:
javac AmdahlSimulator/AmdahlSimulator.java
javac ConcurrencySimulations/ConcurrencySimulations.javajava AmdahlSimulator.AmdahlSimulatorAnalyzes parallel speedup based on Amdahl's Law, showing how serial portions limit performance gains.
java ConcurrencySimulations.ConcurrencySimulationsWhen 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
- 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
- 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
- Compile the programs using the commands above
- Run the desired simulation
- Follow the interactive prompts
- Enter menu options to explore different concepts
- Uses Java standard library (
java.util.concurrent,java.lang.Thread, etc.) - Simulations are for educational purposes
- Demonstrates fundamental operating system concepts
Operating Systems course homework assignment
Cemil Ilkim Teke
Note: This is a simple homework project and requires no additional files or configuration.