tac0S
Template Affectional Command Operating System
Macros | Functions
fstest.cc File Reference

Routines to manage an open Nachos file. More...

#include "copyright.h"
#include "utility.h"
#include "filesys.h"
#include "system.h"
#include "thread.h"
#include "disk.h"
#include "stats.h"

Macros

#define TransferSize   10
 
#define FileName   "TestFile"
 PerformanceTest Stress the Nachos file system by creating a large file, writing it out a bit at a time, reading it back a bit at a time, and then deleting the file. More...
 
#define Contents   "1234567890"
 
#define ContentSize   strlen(Contents)
 
#define FileSize   ((int)(ContentSize * 5000))
 

Functions

void Copy (const char *from, const char *to)
 Copy Copy the contents of the UNIX file "from" to the Nachos file "to".
 
void Print (char *name)
 Print Print the contents of the Nachos file "name".
 
void PerformanceTest ()
 

Detailed Description

Routines to manage an open Nachos file.

Author
Olivier Hureau, Hugo Feydel , Julien ALaimo Simple test routines for the file system.

We implement: Copy – copy a file from UNIX to Nachos Print – cat the contents of a Nachos file Perftest – a stress test for the Nachos file system read and write a really large file in tiny chunks (won't work on baseline system!)

Copyright (c) 1992-1993 The Regents of the University of California. All rights reserved. See copyright.h for copyright notice and limitation of liability and disclaimer of warranty provisions.

Macro Definition Documentation

#define FileName   "TestFile"

PerformanceTest Stress the Nachos file system by creating a large file, writing it out a bit at a time, reading it back a bit at a time, and then deleting the file.

Implemented as three separate routines: FileWrite – write the file FileRead – read the file PerformanceTest – overall control, and print out performance #'s