This java program has reading and writing sync for an OS simulation in java