RRScheduler
RRScheduler
Key Features
Core Functions
def _execute_syscall(self, syscall, executor, syscall_type):
try:
syscall.set_time_limit(self.time_slice)
syscall.set_status("executing")
self.logger.log(f"{syscall.agent_name} is executing {syscall_type} syscall.\n", "executing")
syscall.set_start_time(time.time())
response = executor(syscall)
syscall.set_response(response)
if response.finished:
syscall.set_status("done")
log_status = "done"
else:
syscall.set_status("suspending")
log_status = "suspending"
syscall.set_end_time(time.time())
syscall.event.set()
self.logger.log(
f"{syscall_type} syscall for {syscall.agent_name} is {log_status}. Thread ID: {syscall.get_pid()}\n",
log_status
)
return response
# Error handling omitted for brevityLast updated