Operating Systems Chapter 11 and 12
Scan
Arm moves in one direction only. Satisfies all requests until it reaches the last track then is reversed. Favors jobs on the inner and outermost tracks
RAID 3
Bit-interleaved parity. Requires only a single redundant disk, no matter how large the disk array.
RAID 5
Block-level distributed parity. Similar to RAID-4 but distributes the parity bits across all disks
RAID 4
Block-level parity. Makes use of an independent access technique. Involves a write penalty when an I/O write request of small size is performed
Database
Collection of related data. Relationships among data are explicit. Consists of one or more types of files
Record
Collection of related fields that can be treated as a unit by some application program. Fixed or variable length
File
Collection of similar records. Treated as a single entity. Referenced by name. Access control restrictions usually apply at the file level
PRI: Priority
Control of the scheduling is outside the control of the disk management software. Goal is NOT to maximize disk utilization. Short batch jobs and interactive jobs given higher priority. Poor policy for DBS
File operations
Create Delete Open Close Read Write
The Pile
Data collected in order they arrive. just gathers data. No structure or organization or standard record length or keys
Files
Data collections created by users. Desirable properties: long-term existence, sharable between processes, structure
Generality Design Objectives
Desirable to handle all devices in a uniform manner. Applies to the way process view I/O devices and the way the OS manages I/O devices
RAID 6
Dual Redundancy. Two different parity calculations are carried out and stored in separate blocks on different disks
Logical I/O
Enables users and applications to access records. Provides general purpose record I/O capability. Maintains basic data about file
Hierarchical Design
Functions of the OS should be separated according to their complexity, their characteristic time scale, and their level of abstraction. Leads to an organization of the OS in a series of layers
Block-oriented Single Buffer
Input transfers are made to the system buffer. Disadvantages: Complicates the logic in the OS, swapping logic is also affected.
Access Method
Level of file system closest to the user. Standard interface between applications and the file system and devices that hold the data.
Device Drivers
Lowest level. Communicate directly with peripheral devices. Responsible for starting I/O operations.
Efficiency Design Objectives
Major effect in I/O design. Important because I/O ops often form a bottleneck. Most I/O devices are very slow
RAID 1
Mirrored. Redundancy is achieved by the simple expedient of duplicating all the data. Disadvantage is the cost.
Sequential File
Most common. Fixed format used for records, key field uniquely identifies the record. Length and position of each field is known
Do the records in an indexed file have to be sorted?
NO
RAID 0(Zero)
Not a true raid. Data distributed across all drives. non-redundant
Single Buffer
OS assigns a buffer in main memory for an I/O request
Buffering
Performs input transfers in advance of requests being made and performs output transfers some time after the request is made.
FIFO: First In First Out
Processes in sequential order. Fair to all processes. Approximates random scheduling in performance if there are many processes competing for the disk
Indexed File
Records accessed through indexes. Variable length records. Used mostly in applications where timeliness of information is critical and where data are rarely processed exhaustively
RAID 2
Redundancy through Hamming Code. Makes use of a parallel access techniques.
Basic I/O Supervisor
Responsible for all file I/O initiation and termination. Selects the device on which file I/O is to be performed, based on the particular file selected. It is also concerned with scheduling disk and tape accesses to optimize performance
C-SCAN: Circular Scan
Restricts scanning to one direction only. When the last track is visited in one direction, the arm is returned to the appropriate side of the disk
What advantage is realized by a disk that spins 10,000 rpm over one that spins 7,200 rpm?
Rotational delay will be reduced when doing data transfer. Seek time will not be affected. Data transfer time will be improved.
What distinguishes between I/O devices?
SPEED
Operations Performed on a Directory
Search Create Files Delete Files List directory Update directory
What constitutes the time it takes to read OR write data (to a hard-drive)?
Seek time(time it takes to move head) Rotational Delay(how fast HD is spinning) Data Transfer(actual transfer of electrons transferring data)
N-Stop-Scan
Segments the disk request queue into sub queues of length n. Processed one at a time using Scan. New requests must be added to another queue while the current one is processed.
SSTF: Shortest Service Time First
Select the disk I/O request that requires the least movement of the disk arm from its current position
Criteria for file organization
Short access time Ease of update Economy of storage Simple maintenance Reliability
Machine Readable
Suitable for communicating with electronic equipment. Disk drives, USB drives, sensors
Programmed I/O
The processor issues an I/O command on behalf of a processor to an I/O module. That process then busy waits for the operation to be completed.
Interrupt-driven I/O
The processor issues and I/O command on behalf of a process. Could be blocking or non-blocking.
Circular Buffer
Two or more buffers are used. Each individual buffer is one unit in a circular buffer. Used when I/O operation must keep up with process operation
Double Buffer
Use two system buffers instead of one. A process can transfer data to or from one buffer while the OS empties or fills the other buffer. Also known as buffer swapping.
Parity Bit
Used as the simplest form of error detecting code. AKA Check bit(added to end of string in binary code that indicates whether the number of bits in the string with the value 1 is even or odd)
Disk Cache Memory
Used to apply to a memory that is smaller and faster than main memory and that is interposed between main memory and the processor. Reduces average access time
Stream-Oriented Single Buffer
Uses line at a time or byte at a time operation
F-Scan
Uses two sub queues. When a scan begins all the requests are in one of the queues with the other one empty. During Scan all requests are placed in a new queue
No Buffer
Without a buffer the OS directly accesses the device when it needs it
Do the records in an indexed sequential file have to be sorted?
YES
Field
basic element of data. contains a single value. fixed or variable length
File organization
logical structuring of the records determined by the way in which they are accessed
Communication
suitable for communicating with remote devices. Modems, digital line drivers
Human Readable
suitable for communicating with the computer user. Printer, terminals, video display
Block Oriented Devices
transfer blocks of data at a time, usually a fixed size. Reference by block #. Disks and USB keys
Stream Oriented Devices
transfer data at a time as a stream of bytes. Terminals, printers
File Management System Objectives(7)
• Meet the data management needs and requirements of the user, which include storage of data. • To guarantee, to the extent possible, that the data in the file are valid • To optimize performance, both from the system point of view in terms of overall throughput and from the user's point of view in terms of response time • Provide I/O support for a variety of storage device types • Minimize or eliminate the potential for lost or destroyed data • Provide a standardized set of I/O interface routines to user processes • Provide I/O support for multiple users, in multiple-user systems
Minimal User Requirements(7)
1. Each user should be able to create, delete, read, write, and modify files. 2. Each user may have controlled access to other users' files. 3. Each user may control what types of accesses are allowed to the user's files. 4. Each user should be able to restructure the user's files in a form appropriate to the problem. 5. Each user should be able to move data between files. 6. Each user should be able to back up and recover the user's files in case of damage. 7. Each user should be able to access his or her files by name rather than by numeric identifier.
Direct Memory Access
A DMA module controls the exchange of data between main memory and an I/O module
RAID: Redundant Array of Independent(or inexpensive) Disks
A way of organizing and using your HD. Set of physical drives viewed by the OS as a single logical drive. Data is distributed across the physical drives of an array in a scheme known as striping.
Basic File System
AKA Physical I/O level. Deals with blocks of data that are exchanged with disk or tape systems. Buffering blocks in main memory.
Direct/Hashed File
Access directly any block of known address. Hashes o a key value. Used where rapid access is required. fixed-length records used, records always accessed at one time
Indexed Sequential FIle
Adds an index to the file to support random access, overflow file added. Multiple levels of indexing can be used. Greatly reduces time required to access a single record