System Call Simulation: read() and write()