FIFOScheduler

The FIFO (First-In-First-Out) scheduler processes tasks in the order they arrive, with a 1-second timeout for each task.

Source code

Core Functions

def _execute_syscall(self, syscall, executor, syscall_type):
    try:
        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)

        syscall.event.set()
        syscall.set_status("done")
        syscall.set_end_time(time.time())

        self.logger.log(
            f"Completed {syscall_type} syscall for {syscall.agent_name}. Thread ID: {syscall.get_pid()}\n",
            "done"
        )
        
        return response
    # Error handling omitted for brevity

Last updated