Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.java

You 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
```