PKUOS - Pintos
Pintos source browser for PKU Operating System course
Functions
mlfqs-load-1.c File Reference
#include <stdio.h>
#include "tests/threads/tests.h"
#include "threads/init.h"
#include "threads/malloc.h"
#include "threads/synch.h"
#include "threads/thread.h"
#include "devices/timer.h"
Include dependency graph for mlfqs-load-1.c:

Go to the source code of this file.

Functions

void test_mlfqs_load_1 (void)
 Verifies that a single busy thread raises the load average to 0.5 in 38 to 45 seconds. More...
 

Function Documentation

◆ test_mlfqs_load_1()

void test_mlfqs_load_1 ( void  )

Verifies that a single busy thread raises the load average to 0.5 in 38 to 45 seconds.

The expected time is 42 seconds, as you can verify: perl -e '$i++,$a=(59*$a+1)/60while$a<=.5;print "$i\n"'

Then, verifies that 10 seconds of inactivity drop the load average back below 0.5 again.

Definition at line 18 of file mlfqs-load-1.c.