A Journey of A Byte:What happens when the program statement: write(textfile, ch, 1) is executed ?
Part that takes place in memory:
Statement calls the Operating System (OS) which overseas the operation
File manager (Part of the OS that deals with I/O)
- Checks whether the operation is permitted
- Locates the physical location where the byte will be stored (Drive, Cylinder, Track & Sector)
- Finds out whether the sector to locate the ‘P’ is already in memory (if not, call the I/O Buffer)
- Puts ‘P’ in the I/O Buffer
- Keep the sector in memory to see if more bytes will be going to the same sector in the file
-
-