I am trying to build an OS simulator, but I am currently in a trouble

Did you change a multitasking library without using any debug messages and you expect it to work the first time :astonished:

At least show something on the serial monitor:

void setup() 
{
  Serial.begin( 9600);
  Serial.println( "The sketch has started");

Then add more debug messages.

To debug it, you can put everything in a single file and use Tinkercad (autodesk account required) or use the multiple files as they are with Wokwi.