Updated test0 with a forktest. Fixed timeslices. Updated kmem usage calculations.

- test0 now forks 16 tasks that each modify a global variable.
- scheduler now gives 1/10th of a second per task. It also does not increase timeslice
  of a task that has scheduled.
- When a memory is granted to the kernel, the distribution of this memory to memcaches
  was calculated in a complicated way. This is now simplified.
This commit is contained in:
Bahadir Balban
2008-09-17 15:19:37 +03:00
parent cb9c5438e2
commit 1ea21d84bd
10 changed files with 75 additions and 59 deletions

View File

@@ -38,13 +38,19 @@ void main(void)
printf("Error forking...\n");
if (pid == 0) {
printf("File IO test 1, done by child:\n");
printf("Child: file IO test 1.\n");
if (fileio() == 0)
printf("-- PASSED --\n");
else
printf("-- FAILED --\n");
printf("Child: forktest.\n");
if (forktest() == 0)
printf("-- PASSED -- \n");
else
printf("-- FAILED -- \n");
} else {
printf("File IO test 2, done by parent, with child pid %d:\n", pid);
printf("Parent: file IO test 2. child pid %d:\n", pid);
if (fileio2() == 0)
printf("-- PASSED --\n");
else