#include int main(void) { printf("Simulating FFS locality-aware allocation\n\n"); printf("Cylinder/Block Groups:\n"); printf(" Group 0: [SB][ib][db] inodes... data blocks (home dir + files)\n"); printf(" Group 1: [SB][ib][db] inodes... data blocks (usr files)\n"); printf(" Group 2: [SB][ib][db] inodes... data blocks (tmp files)\n\n"); printf("Heuristic: Place new directory in group with fewest dirs.\n"); printf("Then place its files in the same group for locality.\n"); printf("Large sequential files get consecutive blocks inside the group.\n"); printf("This avoids the random seeks of the original UNIX FS.\n"); return 0; }