tac0S
Template Affectional Command Operating System
Classes | Macros
disk.h File Reference

Data structures to emulate a physical disk More...

#include "copyright.h"
#include "utility.h"

Go to the source code of this file.

Classes

class  Disk
 The following class defines a physical disk I/O device. The disk has a single surface, split up into "tracks", and each track split up into "sectors" (the same number of sectors on each track, and each sector has the same number of bytes of storage). More...
 

Macros

#define SectorSize   128
 
#define SectorsPerTrack   32
 
#define NumTracks   32
 
#define NumSectors   (SectorsPerTrack * NumTracks)
 

Detailed Description

Data structures to emulate a physical disk

Author
Olivier Hureau, Hugo Feydel , Julien ALaimo Data structures to emulate a physical disk. A physical disk can accept (one at a time) requests to read/write a disk sector; when the request is satisfied, the CPU gets an interrupt, and the next request can be sent to the disk.

Disk contents are preserved across machine crashes, but if a file system operation (eg, create a file) is in progress when the system shuts down, the file system may be corrupted.

DO NOT CHANGE – part of the machine emulation

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.