fastly written pseudocode of OS