SAP interview question

implement a scheduler, consider synchronization.