F_read - f_read.c This used to be a separate binary because it came from Nachos and nachos didn't support fork However in OS/161 there's no reason

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * f_read.c * * This used to be a separate binary, because it came from Nachos * and nachos didn't support fork(). However, in OS/161 there's * no reason to make it a separate binary; doing so just makes * the test flaky. * * * it will start reading from a given file, concurrently * with other instances of f_read and f_write. * */ #define SectorSize 512 #define TMULT 50 #define FSIZE ((SectorSize + 1) * TMULT) #define FNAME "f-testfile" #define READCHAR 'r' #define WRITECHAR 'w' #include <stdio.h> #include <unistd.h> #include <err.h> #include "f_hdr.h" static char buffer[SectorSize + 1]; static void check_buffer(void) { int i;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/10/2009 for the course CS 536 taught by Professor Lums during the Spring '09 term at Indiana.

Page1 / 2

F_read - f_read.c This used to be a separate binary because it came from Nachos and nachos didn't support fork However in OS/161 there's no reason

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online