512GiB disk drive with 1024 byte sectors
4096 byte blocks
8192 byte blocks
16384 byte blocks
134,217,728 blocks
67,108,864 blocks
33,554,432 blocks
| Switch time | Choose the correct side of the correct platter (and sometimes the correct head) |
| Seek time | Move the arm to the correct track |
| Rotational delay | Rotate the desired block under the arm |
| Transfer delay | Time taken to read/write the data |
| Switch time | Negligible |
| Seek time | 15ms on average |
| Data throughput | 50 Mbps (1M = 1000K, and bps is bits per second) |
| Block size | 32,768 bytes |
| Rotational speed | 7200 rpm |
Rotational delay: 4.2ms
Transfer delay: 5.2ms
Total: 0 + 15 + 4.2 + 5.2 = 24.4ms
#include <stdio.h>
int main()
{
FILE *fp = fopen(“hello.txt”, “w”);
fprintf(fp, “Hello world!\n”);
fclose(fp);
}fopen creates a new entry in the per-user OFT
Allocates read/write buffer with the entry.
Calls low-level open operation.