rw.c fixed and working

rw.c is done. Now we just need to do CPU and I/O mixed :)