2 Types of External Memory Magnetic DiskRAID (Redundant Array of Independent Disks)RemovableOpticalCD-ROMCD-Recordable (CD-R)CD-R/WDVDDVD-RDVD-RWMagnetic Tape
3 Magnetic DiskDisk substrate coated with magnetizable material (iron oxide…rust)Substrate originally was aluminium - Is now glassImproved surface uniformityIncreases reliabilityReduction in surface defectsReduced read/write errorsLower flight heights (head rides on air gap)Better stiffnessBetter shock/damage resistance
11 FormatingWhy?Must be able to identify position of data: start of track and sectorMarks tracks and sectors
12 Winchester Disk Format 30 fixed-length sectors per track
13 Speed Parameters Seek time Latency (Rotational) Access time Time to position head at trackLatency (Rotational)Time for head to rotate to beginning of sectorAccess time- Seek time + Latency timeTransfer rate- The rate at which data can be transferred after accessT = b / N * 1/rTransfer time = bytes transferred / bytes/track * sec/revolution (track)Note: How does organization on disk (e.g. random vs sequential) effect total time?
15 RAID – Goals: Speed, Reliability, Standardization Redundant Array of Independent Disks(or Redundant Array of Inexpensive Disks ?)Set of physical disks viewed as single logical drive by O/SData distributed across physical drivesCan use redundant capacity to store parity information7 “levels” of RAID organization (not a hierarchy)0 not really a RAID organization (no redundancy)1, 3 used for high transfer rate5, 6 used for high transaction rate2, 4 not commercially availableRequirements for high transfer rate:High transfer rate along entire path between host memory to disk drivesApplication must make I/O requests that drive disks efficiently
16 Redundant Array of Independent Disks Not RAIDNot usedNot used
18 RAID 0 Description: Characteristics: No redundancy (Not “really” RAID) Data striped across all disksRound Robin stripingCharacteristics:Increase speedMultiple data requests probably not on same diskDisks seek in parallelA set of data is likely to be striped across multiple disks
19 RAID 1 Description: Characteristics: Mirrored Disks Data is striped across disks2 copies of each stripe on separate disksRead from eitherWrite to bothCharacteristics:Recovery is simpleSwap faulty disk & re-mirrorNo down timeExpensive
20 RAID 2 (not used) Description: Characteristics: Disks are synchronized Very small stripesOften single byte/wordError correction calculated across corresponding bits on disksMultiple parity disks store Hamming code error correction in corresponding positionsCharacteristics:Lots of redundancyVery ExpensiveNot used commercially
22 RAID 3 Description: Characteristics: Similar to RAID 2 Only one “redundant” disk, no matter how large the arraySimple parity bit for each set of corresponding bitsCharacteristics:Data on failed drive can be reconstructed from surviving data and parity infoVery high transfer ratesNot very expensive or complex
23 RAID 4 (not used) Description: Characteristics: Each disk operates independentlyGood for high I/O request rateLarge stripesBit by bit parity calculated across stripes on each diskParity stored on parity diskCharacteristics:Good for high request rates rather than high transfer ratesEvery write impacts the parity disk so it becomes a bottleneck.Not used commercially
25 Characteristics: RAID 5 Description: Very similar to RAID 4 Parity striped across all disksRound robin allocation for parity stripeCharacteristics:Avoids RAID 4 bottleneck at parity diskCommonly used in network servers
26 Three disks need to fail for data loss RAID 6Description:Two parity calculationsStored in separate blocks on different disksUser requirement of N disks needs N+2 disksCharacteristics:High data availabilityThree disks need to fail for data lossSignificant write penalty (two parity calculations)
31 Optical Storage CD-ROM Originally for audio650Mbytes giving over 70 minutes audioPolycarbonate coated with highly reflective coat, usually aluminiumData stored as pitsRead by reflecting laserConstant packing densityConstant linear velocity
35 Other speeds are quoted as multiples e.g. 24x CD-ROM Drive SpeedsAudio is single speedConstant linear velocity1.2 m/secTrack (spiral) is 5.27km longGives 4391 seconds = 73.2 minutesOther speeds are quoted as multiplese.g. 24xQuoted figure is maximum drive can achieveNote: CD-ROM has option of error correction (not on CD)
36 CD-ROM Format Mode 0 = blank data field Mode 1 = 2048 byte data + error correctionMode 2 = 2336 byte data
37 Random Access on CD-ROM & CD-R DifficultProcess:Move head to rough positionSet correct speedRead addressAdjust to required location
38 CD-ROM CD-R for & against Large capacity (?)Easy to mass produceRemovableRobustExpensive for small runsSlowRead only
39 CD-RW Erasable Getting cheaper Mostly CD-ROM drive compatible Phase changeMaterial has two different reflectivities in different phase states
40 DVD - technology Multi-layer Very high capacity (4.7G per layer) Full length movie on single diskUsing MPEG compression
42 Two objectives had to be resolved to make the DVDs viable. The linear velocity of a DVD must be held constant and be able to reproduce a vertical frame rate of frames/secondEvery DVD player had to have absolute tracking accuracy to insure the extremely narrow laser beam would scan exactly in the middle of the track where the data was recorded. The solution:The disk is pressed with the track grooves accurately pre-cut and encoded with a constant bit rate frequency. Thus a blank DVD disk isn't really blank at all.
43 Types of External Memory Magnetic DiskRAID (Redundant Array of Independent Disks)RemovableOpticalCD-ROMCD-Recordable (CD-R)CD-R/WDVDDVD-RDVD-RWMagnetic Tape
44 Magnetic Tape Serial access Slow Very cheap Used for backup and archive
46 Input/Output Challenges Must support a wide variety of peripheralsDelivering different amounts of dataAt different speedsIn different formatsAll slower than CPU and RAMNeed standardized I/O Interfaces (modules) or channels
51 Programmed I/O Programmer has direct control over I/O Sensing statusRead/write commandsTransferring dataCPU (program) must wait for I/O module to complete operationUsually not a good use of CPU time
52 Programmed I/O - details Program initiates I/O operationRequests Write, sends data, and waits for doneRequests Read and waits for data readyI/O module performs operationI/O module sets status bits (in Status Register) to confirm operation is doneProgram is continuously “Polling the I/O status register” checking status bits for I/O Ready/DoneActually program may wait or come back laterProgram completes I/O operation (processes data)Reads data or Writes next dataProgram continuesIn Programmed I/O, the program must wait for the I/O operation to be completed before moving on
53 Interrupt driven I/O Programmer Issues I/O command to I/O interface Similar to step one in programmed I/OProgrammer goes on to other work, i.e. does not have to “poll the device” and wait for I/O completionInterface Requests an Interrupt when I/O is readyInterface Requests “Service Routine (program) be executed”CPU switches context and executes the I/O service routine.At the end of the service routine, the context is switched back and the original program continues.Interrupt driven I/O relieves the need for polling I/O devices and programming the I/O service
54 Interrupt Physical Model CPUGeneral Purpose RegistersProgram counter (PC)Stack Pointer (SP)User stack Pointer StorageSupervisor Stack Pointer StorageProgram Status Word (PSW) – IncludesState – user/supervisor, priority, etc.Program PriorityCondition Codes (CC)Hardware to communicate over the BUSAddress, Data, and Data ControlBus status and controlMemoryUser programInterrupt Service Routine ProgramOperating SystemInterrupt Vector TableIncludes an entry that points to the Interrupt Service Routine (Interrupt vector #)DeviceStatus/Control Register(s) – Includes:Interrupt Enable bitInterrupt bit (sometimes called ready or done)Priority Level for Interrupt Service Routine (In hardware or firmware)Interrupt vector number (In hardware or firmware)Hardware to communicate with CPU over the BUS
55 Interface Registers Keyboard Status Register (16 bit) Keyboard Device: Bit 15 Done BitBit 14 Interrupt Enable BitBits 0-2 PriorityKeyboard Data Register (16 bit)Contains character enteredKeyboard Interrupt Vector (16 bit)Contains the “address” in the Interrupt Vector TableDisplay Device:Display Status Register (16 bit)Bit 15 Ready BitDisplay Data Register (16 Bit)Contains character to be displayedDisplay Interrupt vector (16 bit)
56 Interrupt Sequence What does the programmer do? What does the computer do?
57 Interrupt SequenceProgrammer Action:Enable Interrupts by setting “intr enable” bit in Device Status RegEnabling Mechanism for device:When device wants service, and its enable bit is set(i.e, the I/O device has the right to request service), andthe device priority is higher than the priority of the presently running program, andexecution of an instruction is complete, thenProcess to Service the Interrupt:The Processor saves the “state” of the program (must be able to return to program)The Processor goes into Privileged (or Supervisor) ModeThe Priority level is set (established by the interrupting device)The context is switchedThe user SP is saved and the Supervisor SP loadedThe (PC) and the (PSR) are PUSHED onto the Supervisor StackThe contents of the other registers are not saved. Why?The CC’s are cleared. Why?The Processor Loads the PC from the Interrupt Vector TableThe device provides the Vector Table entry numberInterrupt Service Routine is executedThe routine ends with an “RTI” instructionThe context is switched backThe stored user: PSR (POP into PSR), PC (POP into PC), USP loaded (POP into SP)The Processor goes into User mode8) And the next instruction in the original program is fetched
Your consent to our cookies if you continue to use this website.