projects/virtual_memory_manager/scheduler.cpp
//Thread of the scheduler, by default it will be running
Thread of the scheduler, by default it will be running
Thread of the scheduler by default it will be running
void Scheduler::myThread()
    {
        bool alive = true;
        this->set_status(status_t::RUNNING);
        while (alive)
        {
            status_t current_status = this->get_status();
            switch (current_status)
            {
            case status_t::IDLE:
                break;
            case status_t::TERMINATED:
                alive = false;
                break;
            case status_t::RUNNING:
                this->cycle();
                break;
            default:
                break;
            }
        }
        this->set_status(status_t::TERMINATED);
    }
void Scheduler :: myThread ( ) { bool alive = true ; this -> set_status ( status_t :: RUNNING ) ; while ( alive ) { status_t current_status = this -> get_status ( ) ; switch ( current_status ) { case status_t :: IDLE : break ; case status_t :: TERMINATED : alive = false ; break ; case status_t :: RUNNING : this -> cycle ( ) ; break ; default : break ; } } this -> set_status ( status_t :: TERMINATED ) ; }
Thread of the scheduler, by default it will be running
Thread of the scheduler by default it will be running