|
|
Study Questions
Briefly define the role of each of the following components in the
KModel design.
- Bus, Port and PortAdapter
- Controller
- DiskController, Serial Controller and TimerController each contain a class
that executes as a thread (SerialController has two). What is the role of
these thread classes?
- KernelLock
- Handle and its subclasses HandleFile and HandleProcess
- Memory
- Buffer
Each of the following modules contains system calls -- methods named using
the pattern sys_xxx. Describe the function of the set of system calls
implemented by each module.
- ModuleFileSystem
- ModuleMount
- ModuleProcess
- ModuleStdio
Each of the following modules contains system calls and an interrupt handler.
Describe the function of these modules
- ModuleDevHD
- ModuleSerial
- ModuleTimer
Describe the relationship that exists between each of the following classes.
What is the purpose of each relationship? Under what circumstances do the
classes interact?
- Buffer, BufferAllocator and KernelDeviceBlock
- FileSystem, InodeAllocator, KernelDeviceBlock, and FSSuperBlockStruct
- InodeAllocator and FSInode
- FSInode and Buffer
- VnodePipe, PipeBuffer and KernelDevPipe
- ModuleProcess and PCB
- ModuleSVC, Process, SysLib and InterruptMechanism
Create a table that describes how each class in the kernel package is used.
For each class, show
- The classes that contain an instance of the class in question and whether
the relationship is transient or permanent, one-to one or one-two-many.
Indicate if the instance is created in the constructor (or by initial
assignment) or whether the instance is passed in to the constructor. If the
instance is passed in to the constructor, explain how and where the class
was created and how it came to be passed to the constructor. This may entail
references to other descriptions in the table.
- The methods that receive the class as a parameter and the classes that
contain those methods.
- The methods (other than the constructor) that create instances of the
class. Indicate whether or not the class's lifetime is enclosed by the
lifetime of the method. If not, indicate how the class's lifetime is
determined.
Hint: the Find Usages tool in Netbeans 4.0 helps find the information for
each class. Otherwise, use a multi-file string-matching tool like grep, findstr,
or whatever your favourite editor provides. |