Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/petruki/jcpu-simulator
Java CPU Simulator
https://github.com/petruki/jcpu-simulator
cpu-emulator java queue
Last synced: 7 days ago
JSON representation
Java CPU Simulator
- Host: GitHub
- URL: https://github.com/petruki/jcpu-simulator
- Owner: petruki
- License: mit
- Created: 2020-08-22T20:04:11.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-01T22:00:17.000Z (9 months ago)
- Last Synced: 2024-06-01T23:30:09.672Z (9 months ago)
- Topics: cpu-emulator, java, queue
- Language: Java
- Homepage:
- Size: 24.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### About
Java CPU Simulator is a showcase application that displays how multi-threading works programmatically.
Nothing fancy though.### Usage
1) Run `mvn clean install`
2) Execute the simulator located at: com\github\petruki\playground\Simulator.javaYou can also create your own scenario or use one of the available pre-built scenarios located at *com\github\petruki\playground\sample*
### Output sample
```
#############################
# Custom Scenario:
# CPUs: 1
# - Computer
# quantum=5
#
# Proc I
# Start at: 0
# run(10)
# run(3)
#
# Proc II
# Start at: 3
# run(10)
#
# Proc III
# Start at: 2
# run(10)
#
#############################Proc I - w: 20
|#####----------#####----------###
Proc II - w: 17
---|-------#####----------#####
Proc III - w: 13
--|---#####----------#####- : IDLE
# : RUNNING
| : STARTED
w : WAITING
```