Based on Operating System Labs from NJU.