10:45am Wed 23rd Aug, Jacob R. ✅ content verified by our teaching staff
Pretty sure we're not actually implementing the functions. We're just emulating them. So we don't need to call actual functions, we're just transferring them between queues and pretending to run them, which takes time on the "cpu". But we're just counting that time then moving onto the next process or moving something out of an IO queue. We're just doing stuff on the surface level. Like the sleep syscall will just move the process to a sleep queue, and the spawn syscall will just create a new "process". It never actually reads or writes anything, though. It's just going to have to work out the time it would take to read or write based on the speed and amount of data. So you're basically just keeping track of the time and working out what the system would need to do next for us its running process, sleeping processes or the process in the bus.