Chapter 1. OS--an OS is the layer of a computer between the hardware and the user Programs. Hardware interface--consists of things like program counters registers interrupt’s disks (cs341 stuff). Hardware resources--Processor, Memory, I/O , Disk drives, other devices. Resource Management--transforming, multiplexing, scheduling. transforming--operating systems transform physical resources into virtual Resources to avoid the difficulties associated with using hardware Resources. virtual resource--provides the essential functionality of the hardware resource but is easier to use because the details of the hardware interface are hidden. time division multiplexing--the resource is used for different virtual computers at different times ie. time sharing. space division multiplexing--the resource is divided into smaller versions of itself and each virtual computer is given one of these versions. process--the OS creates multiple processes (simulated processors) out of the single processor and allocates them to programs. It Accomplishes this by time multiplexing the processor. address spaces--OS creates multiple address spaces (memory for a process to run in) out of the memory and allocates them to processes. file system-- OS implements a file system and I/O system so that the processes can easily share the disks. It accomplishes this by space multiplexing the disks and time multiplexing the I/O channels. system call--added instructions that allow the virtual processor to request virtual recourses from the operating system. -create new virtual computers. -communicate with other virtual computers. -allocate memory as needed. -do I/O -access a sophisticated file system. P.virtual = P.physical -(dangerous instructions) + (useful replacements) CHAPTER 2 ************************* general purpose registers--the cpu provides 32 gpr each 32 bits long. control register-- ia,psw, base, bound, iia, ipsw, ip (interupt parameter) iva (interupt vector add), timer. asm block--the insertion of assembly code into c++ code. asm {some assembly code} physical address--address is sent to memory by placing it directly into the system bus as a memory address. In sys mode all addresses are physical addresses(PA). logical address--processor checks to make sure it is less than bound, if so it is added to base which generates a PA, then placed on the bus. physical address space--all the physical addresses that a program can generate. 0 to 0xFFFFFFFF memory addresses space--the part of the physical address space where we can place memory. 0 to 0xEFFFFFFF only a part of the memory addresses space will have actual memory responding to those addresses. I/O address space--the part of the physical address space reserved for I/O devices. 0xF0000000 to 0xFFFFFFFF logical address space--the range of addresses that a program running in user mode can use. 0 to value of the bound register. each logical address is mapped into a physical address when the base register is added to it. interrupt vector area--a table of the starting addresses of the interrupts. masked--when bit one of the psw is 0 the timer and disk interupts are masked. the fact that they occur is recorded but the interrupt is not processed until interrupts are unmasked. memory mapped I/O--communication between the I/O devices and the processor is done through physical memory locations in the I/O address space. CHAPTER 3 *************************** system call interface--a description of the set of calls implemented by the operating system. directory--a collection of names, each referring to a file or a dir. hierachical file namming system-- a tree structure where leaf nodes are files and interior nodes are dir. name lookup-- given a dir and name you can find the file. (the path to the leaf). full path names-- /user/me/bin component names-- me or bin. open file-- an operating system object that is created when you open a file. file location-- the offset into the open file where the next r or w will occur. FILE RELATED SYSTEM CALLS in all these a negative return value indicates an error. int open(char *pathName, int openFlags) returns open file id. flags 0-read 1-write 2-r,w. int creat(char * pathName, int fileMode) returns ofid file location is initialized to 0. filemode , not used int read(int openFileID, char * bufferAddress, int count) returns the number of bytes actually read. int write(int openFileID, char * bufferAddress, int count) returns the # of bytes written. int lseek( int openFileID, int offset, int moveMode) returns new file location moveMode 0 - use 0 as base (beginning of file) 1 - use current file location 2 - use current file size (end) int close(int openfileID) returns 0 for success. int unlink(char * pathName) returns 0 for succes. file--a named sequence of bytes. meta-information-- information about information. a file is information. meta-info might be who ones it who can use it when created last modified last read how long it is device independence--a program does not need to know if it is writing to a file or a device. pseudodevices- windows on a workstation screen are called pseudodevices. since they act like devices but are not. program- a static object that exists in a file. process-- when a program is run it is run on a virtual computer. the executing program is a process. a dynamic object that is a program in execution. pid - the os assigns each procces a unique number. parent process-- when a process creates another process it is called the parent. child process-- the process created by a parent. process hierarchy--the tree structure made when a parent creates a child which creates multiple children etc. IPC--interprocess communication, processes communicating with each other while they are running. buffering--saving information until it is requested. message queue--buffered info is placed in a message queue. an object. COMMUNICATION SYSTEM CALLS int createMessageQueue(void); returns qid int SendMessage(int msg_q_id, int * message_buffer); returns 0 success -1 msg_q_id was not valid -2 message_buffer is invalid address void ReceiveMessage(int msg_q_id, int * message_buffer); returns 0 success -1 msg_q_id was not valid -2 message_buffer is invalid address int DestroyMessageQueue( int msg_q_id); returns 0 success -1 msg_q_id was not valid PROCESS-RELATED SYSTEM CALLS int fork(void); a new process is created that is an exact duplicate of the process making the sys call. returns to the parent pid of new process to the child 0 int execv(char * programName, char * argv[] ); the program "programName" is run in the calling process the calling process is overwritten and no longer exists. void exit(int returnCode); returns returnCode to whoever waits for the process. int wait( int * returnCode) causes the calling process to wait until any process created by it ( that is forked by it) exits. standard input--open file id 0 standard output--open file id 1 redirection-- someprog/dev/tty23 filter-- a program whose function is to read a file from standard input, transform it in some way, and write it to standard out is called a filter. pipe-- an object that can act like a file. It can be written to and read from.used for interprocess comunication. microkernal--a small os that provides only the basic services. shell--a user interface to the OS built on the programming (system call) interface. CHAPTER 4 *************************** design process-- steps in the design. system analysis and requirements analysis--gather the info neccesary for the design process and determine the specific needs that this software product must fulfill. system specifiction--specify the external interface of the software product to be built. syntax--what it will look like. semantics--how it will work. architectural design--decide on the major modules of the software product what each will do and how they will interact. module design--design each module. make decisions on algorithms and data structures. modularity--divide and conquer. two-level implementation--the lower level defines a language that the upper level uses to solve the problem. interface--a collection of functions that can be invoked. programming interface--the upper level is a program that calls the lower level with procedure calls. language interface--the upper level io a program or user that sends the lowerlevel a a program to execute little language--provides interactive access to a collection of functions related to a task. scripting languages--perl, shell programming languages. implementation--an interface does not exist in the software it is Implemented by the software. software implements the interface above it using the interface below it. decompostion patterns--a system is decomposed into modules. the one used most often is the "level structure" 0 0 0 - - - - - - - - - 0 0 0 0 0 0 - - - - - - - - - 0 0 0 0 etc. directed acyclic graph-- a node may have two parents but no cycles are allowed. level module--example. an OS creates a virtual machine that hides the hardware level. server module-- the server provides an exported interface but does not hide the levels below. CHAPTER 5 ************************************* time sharing--interleaving the the execution of all process to give the illusion they are running in parallel. more process system calls (-) returns = error int creatProcess(int blockNumber, int numberOfBlocks); returns process id -1 no free process descriptor slots in process table. void exitProcess(int exitCode); the CALLING process is terminated. disk IO system calls int readDiskBlock(int blockNumber, char * buffer); returns 0 this system call always succeeds. architecture--overall structure. process managment subsystem--creates the process abstraction it maintains the the process table and message queues handles system calls, and dispatches processes to the processor. disk driver subsystem--creates the disk abstraction for the user processes. it comunicates with the disk hardware and handels disk interrupt’s. it includes a device driver that accepts disk operation requests and schedules them into the disk. process states--running ready blocked. dispatcher--finds a ready process and starts it running. preemptive scheduling--a process is not allowed to run to completion but is allowed a time slice or quantum. system stack--when the oS is ready to start a user process it resets the stack pointer to the top of the stack any data that needed to be saved is saved in the OS data tables. timer interrupt handler--saves the context (the state) of the process this is called a "half-context switch" in that it saves the state but does not restore it. initial process--first process, created by the operating system using the createProcessSysProc call directly. *************************************************************** chapter6 *************************************** pseudo-parallel--process are run in an interleaved fashion with the appearance of running in parallel. logical parallelism. true-parallelism--with two cpu's physical parallelism. why not to use two OS's in parallel processing-- --twice the space in memory. --processes in one system would not easily be able to communicate with processes in the other. --which OS will control the hardware. -- one machine one OS. --its a bad idea. individual data-- registers stacks duplicated data-- current process variable shared data-- process table disk queue message queue problem*** there is a delay between when a processor finds out a process is ready and when it sets it's state to running. solution make the read write of a process's state an atomic action. exchangeword is an example of this. this is used to protect the process table. this same idea is used to protect access to the disk queues and message queues. have a separate flag for each message queue. race condition-- when two processors are running the same process. or relative speed of two process's affecting the output. ( this must involve some sort of communication between the the two ie- shared memory ) atomic action--once the instruction has begun execution the whole instruction executes before any interrupts are handled. no overlapping. bus master-- if a processor is allowed two remain bus master for two bus cycles, the read write can be an atomic action. TOTALY COOL -- intel i860 have an instruction that can hold the bus for 30 cycles allowing custom atomic actions. busy waiting--process is executing instructions (a loop that checks to see if it can continue) while it is waiting. as opposed to waiting for an interrupt, where the process does nothing. spin lock--pg 185 threads--similar to a process but unlike proceses they share memory. cheaper to create and destroy because they do not require allocation and dealocation of a new address space or other process resources. threads can communicate directly through the shared memory. spreadsheet example pg 196. int createThread(char * start addresses ,char * stackBegin); returns tid ( thread id ) int exitThread(int returnCode); returns returnCode int waitThread(int tid); server process-receives request from many other process acts on the requests and does what is requested. lightweight process-- the threads i have been describing. user threads--thread switching within a process. involves just a change in registers and as jump instruction. plan 9--using the fork process command to make custom threads. kernal-mode process--a process running in system mode. kernal-- the part of the operating system that implements the most basic functions of an OS. shared memory multiprocessors--the processors share memory. computer = 2*(processor ) + memory + I/O multicomputer-- computer = 2* (processor + memory ) + I/O multiprogramming-- interleaving of two programs with one processor. multiprocessing-- two processors. ******************************* CHAPTER 7 ******************************* IPC--interprocess communication. Process competition-- two processes trying to use the same resources. Process cooperation-- two processes combining to do one large job. mutual exclusion-- one process must exclude another from accessing some resources while it is using it. critical section--a sequence of actions that must be done one at a time. logical resource-- a logical object defined by the operating system not hardware. serially reusable resource-- (serially) used by one process at a time (reusable) duh!! monitors-- combines the mutual exclusion control and the data modification into a single procedure. signaling--the signal sender is doing some task and the signal receiver wants to know when the task is completed. The task completion event is signaled by sending a message to the signal queue. the signal sender does not wait but the receiver may. rendezvous--to synchronize two processes, so they do something at exactly the same time, we use two one way signals, where the receivers wait for a message before performing some action. many-process rendezvous-- we use a separate process as the coordinator when all the messages are in, this process sends go signals to all the others. The messages sent to the coordinator contain the mqid of each process. producer consumer-- one process does work that the second process needs to do its work. buffering-- the work of the first process maybe buffered so it may continue producing without waiting for the second. bursty-- when this is hapening the producer is said to be bursty. client-server IPC-- server process-- services requests for the use of a resource. client process--sends server requests to the server. database access and update pattern--is often called the readers-writers problem--readers can enter anytime, writers must wait for readers to leave. one writer at a time. priority--a flag that used by some method of deciding who gets to go first. private scheduling queues--each process has a queue and it is the only process that will wait for that queue, so sending a message to that queue guarantees the release of that process. pattern-- a design , a program structure, or an approach to a problem, framework--a reusable design. *************************************************************** CHAPTER 8 fifo-- queue, first in first out. first come first served. SJF-- shortest job first scheduling. highest response ratio scheduling-- response time= (wait time + job time) / job time priority scheduling-- duh! deadline scheduling-- seems like priority. closest deadline = highest priority. round robin scheduling-- if preemption is possible each person gets a quantem, everyone goes. quantum--an amount of time, the amount of time a process is allowed on the CPU. time slice-- see above. two queue scheduling--the first queue is for newly created process. and has a short quantum (10 mileseconds) and priority over the second queue which has a longer quantum (100 ms). the first queue is always chosen unless it is empty. multiple queue scheduling--same idea as above extended to more then one queue. processor sharing--the limiting case of round robin. look this up in another book ??? deadlock--occurs in a cycle of process when each holds a resource that another process needs and needs a resource that another process in the cycle holds. 4 necessary conditions for deadlock 1. resources are not preemptable 2. resources are not shared 3. a process can hold one resources and request another. 4. circular wait is possible. deadlock prevention-- 1. allowing preemption--all resources can be preempted but is impractical. 2.avoiding mutual exclusion--virtulize a resource so there appears to be an unlimited number of them. (printer spooling) 3.avoiding hold and wait--make a process acquire all of the resources its going to need at one time. (yea right). 4.avoiding circular wait--give each resource a unique positive integer and only acquire resources in ascending order. deadlock avoidance-- algorithms for this are slow and there is allot of overhead involved. deadlock recovery--every so often look for a deadlock and preempt the resource to free it. starvation--a situation where a process is prevented from getting the resource it needs because of "bad timing". nonblocking receive--nonblocking versions of recievemessge call. look this up?? blocking send--sendmessage call waits until there is a process ready to receive then sends it directly with no copying or buffering.this removes the burden of managing buffers from the OS. RPC(remote procedure calls)--structuring message passing so that it looks like a procedure call. more here?? synchronization--when one process waits for notification of an event that will occur in another process. semaphore--the key on the hook analogy. need more!!! binary semaphore(mutex)-- on or off. provides mutual exclusion. counting semaphore--has an integer count instead of just a busy flag. (allow some limit of processes access to some resource) moniter-- a language based synchronization primitive. --message passing and semaphores are OS based synchronization primitives. condition variable--a special kind of variable that can be defined only inside a moniter. find out how why and how they work. rendezvous--an Ada 95 synchronization mechanism. can only be made with another task (thread). protected variable--Ada 95 , like a rendezvou but simpler and less overhead to implement. a data structure. ***************************************** MACH OS thread--(a process) port--a message queue ***************************************** signal--an event notification that is sent to a process by another processes. ********************************************************************** CHAPTER 9 skipped ********************************************************************* CHAPTER 10 object module--when source code is complied an object module is produced. It has a header-records the sizes of the other sections and misc info. sizes are needed to parse the reminder of the object module and create the program in memory when it gets loaded. text section-- (machine code section), the executable instructions. initialized data section--all the global and static data used by the program that requires initialization. uninitailized data section-- global and static data,this section is not represented explicitly only its size is recorded. symbol table-- contains all the external symbols used in the program, both defined and undefined. relocation info--used by the linker to combine object modules into a load module. linker--combines object modules into load module. load module-- a program ready to be executed. stuff is gathered together so it has 3 sections. code, initialized and unintialized data. library--an archive of object modules. static relocation--recalculating addresses as the .o modules are combined. pg384. dynamic relocation--each time an address is used during execution the base register as added to it. linking--uses the global symbol table to write the correct stuff into the undefined external references. (inserts the library .o modules into the load module). load time dynamic linking--does not insert the .o modules into the load module instead it records information necessary to insert it, then when the -run time loader- loads the module it gets them and inserts them. run time dynamic linking--waits until execution to get and use the library routine. this is kinda cool.! where the code would go set a pointer to an interrupt, that will load code. fix pointer. spreads out time delay to load code. (6 sec at start vrs 12 separate 1/2 sec at run) the code may not even be needed on a given execution. memory management: buddy system--there is a memory block list for each power of two if list is empty get next biggest size and split it in two and put leftover in the list for that size. powers of two allocation-- buddy system but blocks are not split or combined , if list is empty process must wait. dynamic memory allocation-- issues how to keep trash of the blocks. which block to allocate. fragmentation-- when memory becomes divided into such small blocks none of them can be used. block list-- keep a linked list of all the blocks. allocate them as needed. resize and combine with unused blocks. should we keep allocated blocks on the list?? yes for safety. where to keep the block list: keep static list in memory? bad idea! Can’t predict memory usage. use the top of each block as a header? would work but there is something better. bitmap method--a string of bits one for each block. free block = 1 used = 0 pg405. checkerboarding--fragmentation. strategies for avoiding fragmentation-- first fit--chose the first block that is large enough. next fit--chose the next block that is large enough but start looking at the point of the last allocation. best fit--chose the free block that is closest to the requested size. worst fit--chose the largest free block. next fit is the best of these. memory protection--give each block of memory an owner register a process can only get to the memory that it owns. this allows for noncontiguous memory allocation. memory manager--the part of the OS that allocates memory. a processes logical memory-- code-- the executable code. static data--data areas that are allocated when the program is loaded into memory and remain resident for the life of the program. dynamic data--data areas that are allocated with the 'new' or 'malloc' operator, this memory is allocated and freed during the execution of the program. this is the HEAP. unused address address space--free logical address space for use by the heap or the stack. is this the free store?? stack--used to hold procedure call stack frames. see pg 417 it seems this is saying that memory is never freed during program exe. ******************************************************************* CHAPTER 11 compaction--move all the allocated blocks to one end of storage to create one big block. contiguous--consecutive physical addresses. the original idea: segmentation--break up the program into pieces and put these into a separate area in physical memory. logical mem must still be contiguous. the logical address is two parts an offset into the segment registers and an offset that is added into the base value ( from the segment registers) to get the physical address. segment registers-- registers containing the base and bound pair associated with the physical address. registers are fast. new thing: page-- a fixed length segment. page table entry--(PTE) is a word of information about a page. contains the base address of the page frame. and?? page table--a collection of page table entries. problem: we are putting the page table in memory. memory is slow. solution: use a page table cache.(TLB) translation lookaside buffer (TLB)--put the most recently used page table entries into process registers. locality--(principal of locality )--if you get something, you tend to get the next thing from nearby. or programs dont jump all over but move sequentially or in loops. cache hit--the page base register (entry) is found in the cache. cache miss--the page base register is not in the cache. cache hit rate--the percentage of times we get a cache hit. memory access time = (hit rate)*(hit time) + (miss rate)*(miss time) page frame--physical memory is divided up into blocks all the same size that can hold a page. these blocks are called page frames. this ends external fragmentation as all the blocks are the same size. but we still have internal fragmentation. internal fragmentation--wasted space inside a page. external fragmentation--wasted space at the physical memory level. protection field--describes the allowed uses of the page. time resource--example CPU. space resource-- example memory. (memory is time and space multiplexed) swapping--time multiplexing the memory. put one program in , take it out, put another in, take it out put the first back in. bursty--I type for a while and then think for a while. overlays--had a core segment of the program and then overlays that were brought in and out to do work. bank switching--Im not sure. pg456 virtual memory--the pages for a program are not all in memory at the same time when you need one it is fetched into memory. to the program it is as if they are all there hence the term virtual memory. virtual--being so in effect. although not in actual fact or name. present bit--field in the PTE to facilitate virtual memory. whether it is in memory or not. page fault interrupt--page is not there we need to go get it. page fault rate--pg 461 one in a million is acceptable. spatial locality--the sequential and looping nature of programs creates a spatial locality between instructions. temporal locality--a reference to a word is temporally close (close in time) to the next reference to it. paging daemon--a proactive part of the OS that 'wakes up' every so often and makes sure there are free page frames. It calls a replacement algorithm to pick which page to throw out. ** daemon--a term to describe a proactive part of the OS that does not wait to be called but "acts on its own and does things". ** file mapping--mapping files into virtual memory. memory-mapped files--another name for file mapping. ***************************************************************** CHAPTER 12 placement-- with paging the problem of placement becomes trivial as all the pages are the same size. replacement-- the principal issue with virtual memory. page replacement algorithm-- an algorithm that decides which page to replace. local replacement--only replace pages that belongs to the process that needs the new page. global replacement-- all pages in memory are considered for replacement. optimal page replacement algorithm-- produces the fewest page faults. theory of program behavior--looking to the past to predict the future. random page replacement algorithm-- duh!! fifo page replacement-- double duh!! lru--triple duh!! this is the best but high overhead to implement. referenced bit-- a field in the page table entry. clock algorithms--think of pages in a circle with pointer moving around them. different schemes to decide when to replace see pg 490. modified bit--( the dirty bit ) another field in the page table entry. working set--the pages needed for the program to run. this is not all the pages of a program but only those needed for some piece of code. ex. the pages that contain all of a loop. //ah whatever virtual time--each page reference is one unit of virtual time. reference string--a sequence of pages. //end ahh wahtever program phase-- as a program runs it’s working set changes, usually in leaps to a brand new working set. each of these working sets is called a program phase. resident set--the set of pages a process currently has in memory. working set replacement algorithm--pg 498 the overhead is too high to implement this. wsclock algorithm--pg 500. paging simulation: emulator-- simulation will contain an emulator for the hardware architecture the program is compiled to run on. page reference string--is the sequence of pages a program references during a particular execution. end paging simulation. thrashing--flailing about without getting anything done. load control-- medium term scheduler--decides which jobs will be in memory. short term scheduler-- decides which of the jobs in memory get the cpu. page fault frequency load control--monitor the page fault rates. if they get to high swap out a process. ?? on pg 507. predictive load control--use the working set to predict behavior and prevent load from becoming to high. demand paging--read in page only when you get a page fault on that page preparing-- bring in pages before their requested by the program. when a process is RESTARTED the pages it had before it was swapped out are brought back in. there should be something here about spatial locality. two level paging--page the page tables themselves. master page number--high order bits of the virtual address. Index into the master page table. (primary page table ) secondary page number-- middle bits of virtual address. Index into secondary page table. last bits are offset into the page itself. three level paging--add a third table. used for very large address spaces. software page table lookups--if you can get the cache miss rate very low you can do page table lookups in software. recursive addresses space--the operating system runs in virtual memory. see pg 516 clustering--use spatial locality to bring in more then one page at a time. //below is stupid stuff segment--dividing up the address space of a process into pieces based on the semantics of the program. two dimensional address space--each memory cell is addressed with a segment and an offset into that segment. swap area-- apart of the disk reserved solely for swapping. virtual swap space--dont understand?? page sharing ****************** copy-on-write--all pages are shared and marked read only. when a process tries to write to a page that is really writable then a protection violation occurs and each process is given its own copy of the page. also know as 'lazy copy'. end page sharing. ***************** two handed clock-- a second hand follows the first and allows pages to be reclaimed sooner then waiting for a full revolution of the the clock hand. region--a contiguous span of pages in the address space. guard page--a special page put at the end of a region. memory object--a specific source of pages. could be a file in local machine a file on a remote machine a frame buffer pager--manages a memory object. virtual memory object--pg 536 ************************************************************ CHAPTER 13 SKIPPED ************************************************************ ************************************************************ CHAPTER 14 ********************* input device-- a device that generated data for a computer to read. outputdevice-- a device that accepts data from a computer. I/O devices-- input and output devices. device controllers--an interface between the device and the computer. can communicate with both the device and the computer. i/o processors--channels--device controllers know how to execute more then one instruction. DMA--direct memory access. serial port--is a connection that allows communication in both directions of a stream of bits. there is a byte of screen memory for each character position on the screen. refreshing--rewriting the image on the screen based on the contents of the screen memory phosphor--a special chemical that glows for a fraction of a second when struck with an electron beam. scan line-- a horizontal line followed by the electron beam across the screen. pixel--a dot position on the screen. horizontal retrace--electron beam is turned off and moved back to the left of the screen to the next scan line. vertical retrace-- electron beam is turned off and moved from the lower right corner ( it has finished one screen pass) to the upper left corner. character generator--memory in the terminal that converts an ascii character into an array of _ by _ dots that can be written to the screen. cursor position--the implied position of the next write on a screen. terminal capability database--a database that describes how each terminal encoded a set of general commands available on most terminals. curses--a screen management system used by Unix. virtual terminals--not a real hardware device but instead created with software. device virtualization--a generalized virtual interface is used to communicate with a wide range of similar devices. relative device--reports a relative change not a absolute. a mouse is a relative device it reports a relative change in position not an absolute position on the pad. event model--combining all the events into a single stream of event records. these will have time stamp, event type. vector graphics--liberally writing on the screen with the electron beam. raster graphics--the way discussed above with retraces and such. frame buffer--the screen memory. color map--a set of 256 24 bit registers which map 8-bit color identifiers into 24-bit color specifications. terminal emulators--a software program that communicates with a modem over a serial port and pretends it is a terminal. PPP--point to point protocol. PPP-- network emulator--pg. 596 modem--a device that does modulation and demodulation. converting bits to sounds (modulation) converting sounds to bits (demodulation) --------------------------- communication devices serial ports, parallel ports, networks. serial port transfers one bit at a time. serial port controller--connects to the system bus and provides one or more serial ports for devices. (often 16) a parallel port can transfer 8 to 16 bits at a time. parallel port controller--connects to the system bus and provides one or more parallel ports. --------------------------- disk devices disk block--sector--disk devices read and write in fixed size blocks or sectors. disk block address--cylinder, track, and sector. striders note see another book on this. cylinder = track on the platter track = platter it is on. sector = spot on track. seek--moving read/write head to a cylinder. latency time--once you’re at the proper place on the right disk you still have to wait for the right spot to rotate under the head, this is latency time. transfer time--once everything is cool it takes 1/32 of a revolution to read the disk block. RAID--redunt array of inexpensive disks. law of diminishing returns--pg 606 SCSI--small computer system interface. an interface between the system bus ( which the controller connects directly to) and its own scsi bus. any device that can connect to a scsi bus can connect to this connection. tape drive--reads tapes sequentially. DAT--digital audio tape. ********************************************************** CHAPTER 15 *********** device driver--a module for each device controller that communicates with it. the driver knows details of how the control works. address of the control reg bit layouts format of command messages error codes operation codes etc. block device--the category of devices with fixed size addressable blocks as block devices. character device-- no address associated with the device and no fixed block size. example: a keyboard. DISK SCHEDULING: double buffering--process one block while reading the second. FCFS-- first come first served. SSTF-- shortest seek time first. pic the request that is closest to the current position of the read/write head. this can cause a clustering problem so use aging to solve it. elevator algorithm--goes one dir until there are no more request in that dir . then it reverses. use with batching to sole problems. problem: a study stream of requests for the same cylinder the elevator will not move. scan algorithm--same as elevator. N-step scan algorithm--elevator with batching. batching-- take job requests in "batches" of say 10 use whatever algorithm on these but all must be finished before getting next "batch". settling--the head makes a large move to the approximate location of the cylinder it is going to. then it makes a small adjustment "settling" to get on the exact one. logical disk--an entire disk to the OS. partition--a portion of a disk that the OS sees as a logical disk. RAM disk driver--a disk driver alocates a chunk of mem and treats it like a disk. memory as a device--treat all the mem as a disk. so a device driver can read/write to it. dont do it too dangerous. pseudo-tty driver--a device driver that resends it is a terminal. disk cache--the OS allocates an area of memory to hold disk blocks that have been recently read or written. when a disk block request is made it may still be in cache. SCSI--small computer system interface. ********************************************************* CHAPTER 16 *********** persistent storage--the storage of data that lasts after a process has terminated. It doesn’t need power. file--a sequence of bytes of arbitrary length. flat file--a file that is simply a sequence of bytes. as opposed to a file that has structure. keyed file--each record has a specific field that is used as a key to find the file. path name--a series of component names. /root/usr/lib/file component name-in the above example, root , usr, lib, file. separator character--the / absolute path name-- the path from the root dir to the file. working directory--current directory. also called the 'PWD' present working directory relative path name--the path from the "PWD" file extensions-- .exe .txt .ml .c .h file alias--a name that reefers to a file that also has another name. symbolic link--an alias in unix.(a soft link) hard link--all path names are real, no difference between a file name and an alias. open file--a source or sink for bytes. open file pointer table--an array of pointers to open files. per process open file pointer-- same thing. file descriptor--contains all the meta-information about a file. device switch--an array of structures each describing a device driver. **************************************************************** CHAPTER 17 *********** free block--a free block file system descriptor--has the following info the total size of the file system. the size of the file descriptor area. the first block on the free block list the location of the file descriptor of the root directory. the time the file system was created and last used. other stuff. super block-- in unix the above is called a super block. file system layout-- FAT-file allocation table. inode--in unix file descriptors are called inodes. see page 704. for all the following. logical blocks-- logical block numbers-- physical blocks-- physical block numbers-- contiguous file--a file that is made up of consecutive blocks on disk. good-- its fast. video uses this. bad-- its a disk space management problem. interleaved files--file1a,file2a,file1b,file2b,file1c,file2c, etc. this gives the head time to get the request for the next block before it has passed it. disk block pointer--