AIOS Docs
  • Welcome
  • Getting Started
    • Installation
    • Quickstart
      • Use Terminal
      • Use WebUI
    • Environment Variables Configuration
  • AIOS Kernel
    • Overview
    • LLM Core(s)
      • LiteLLM Compatible Backend
      • vLLM Backend
      • Hugging Face Backend
      • LLM Routing
    • Scheduler
      • FIFOScheduler
      • RRScheduler
    • Context
    • Memory
      • Base Layer
      • Agentic Memory Operations
    • Storage
      • sto_mount
      • sto_create_file
      • sto_create_directory
      • sto_write
      • sto_retrieve
      • sto_rollback
      • sto_share
    • Tools
    • Access
    • Syscalls
    • Terminal
  • AIOS Agent
    • How to Use Agent
    • How to Develop Agents
      • Develop with Native SDK
      • Develop with AutoGen
      • Develop with Open-Interpreter
      • Develop with MetaGPT
    • How to Publish Agents
  • AIOS-Agent SDK
    • Overview
    • LLM Core API
      • llm_chat
      • llm_chat_with_json_output
      • llm_chat_with_tool_call_output
      • llm_call_tool
      • llm_operate_file
    • Memory API
      • create_memory
      • get_memory
      • update_memory
      • delete_memory
      • search_memories
      • create_agentic_memory
    • Storage API
      • mount
      • create_file
      • create_dir
      • write_file
      • retrieve_file
      • rollback_file
      • share_file
    • Tool API
      • How to Develop Tools
    • Access API
    • Post API
    • Agent API
  • Community
    • How to Contribute
Powered by GitBook
On this page
  1. AIOS Kernel
  2. Scheduler

FIFOScheduler

PreviousSchedulerNextRRScheduler

Last updated 1 month ago

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

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
Source code