DOC PREVIEW
UMD CMSC 412 - Lecture Slides

This preview shows page 1-2-3-4 out of 13 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1CMSC 412 – S03 (lect 2)Announcementsz Program #0 – its due Tuesday– See note on web page about update to .bochsrcz Cell Phones and Pagers– Must be to “off” or “vibrate” during class– Failure to comply will lower your grade in the classz Reading– Chapter 2– Chapter 3 (for Tuesday)2CMSC 412 – S03 (lect 2)Computer Systemsz Computers have many different devices– I/O Devices–Memory• volatile storage– Processor(s)ProcessorMemoryMem. ControllerI/O Bus ControllerMemory BusI/O BusDisplay AdapterSCSI AdapterSCSI BusDisk DrivesTape DriveOptical DriveNetwork AdapterNetwork3CMSC 412 – S03 (lect 2)I/O Systemsz Many different types of devices– disks– networks– displays– mouse– keyboard– tapesz Each have a different expectation for performance– bandwidth • rate at which data can be moved– latency• time from request to first data back4CMSC 412 – S03 (lect 2)Different Requirements lead to Multiple Busesz Processor Bus (on chip)– Many Gigabytes/secz Memory Bus (on processor board)– ~1-2 Gigabyte per secondz I/O Bus (PCI, MCA)– ~100 megabytes per second– buses are more complex than we saw in class• show PCI spec.z Device Bus (SCSI, USB)– tens of megabytes per second5CMSC 412 – S03 (lect 2)Issues In Bussesz Performance– increase the data bus width– have separate address and data busses– block transfers• move multiple words in a single requestz Who controls the bus?– one or more bus masters • a bus master is a device that can initiate a bus request– need to arbitrate who is the bus master• assign priority to different devices• use a protocol to select the highest priority item– daisy chained– central control6CMSC 412 – S03 (lect 2)Disksz Several types:– Hard Disks - rigid surface with magnetic coating– Floppy disks - flexible surface with magnetic coating– Optical (CDs and DVDs) - read only, write once, multi-writez Hard Disk Drives:– collection of platters– platters contain concentric rings called tracks– tracks are divided into fixed sized units called sectors– a cylinder is a collection of all tracks equal distant from the center of disk– Current Performance:• capacity: megabytes to hundreds of gigabytes• throughput: sustained < 10 megabytes/sec• latency: mili-seconds7CMSC 412 – S03 (lect 2)I/O Interfacesz Need to adapt Devices to CPU speedsz Moving the data– Programmed I/O• Special instructions for I/O– Mapped I/O• looks like memory only slower– DMA (direct memory access)• device controller can write to memory• processor is not required to be involved• can grab bus bandwidth which can slow the processor down8CMSC 412 – S03 (lect 2)I/O Interruptsz Interrupt defined– indication of an event– can be caused by hardware devices• indicates data present or hardware free– can be caused by software• system call (or trap)– CPU stops what it is doing and executes a handler function• saves state about what was happening• returns where it left off when the interrupt is donez Need to know what device interrupted– could ask each device (slow!)– instead use an interrupt vector• array of pointers to functions to handle a specific interrupt9CMSC 412 – S03 (lect 2)I/O Operationsz Synchronous I/O– program traps into the OS– request is made to the device– processor waits for the device– request is completed– processor returns to application processz Asynchronous I/O– request is made to the device– processor records request– processor continues program • could be a different one– request is completed and device interrupts– processor records that request is done– program execution continues10CMSC 412 – S03 (lect 2)Hardware Protectionz Need to protect programs from each otherz Processor has modes– user mode and supervisor (monitor, privileged)– operations permitted in user mode are a subset of supervisor modez Memory Protection– control access to memory– only part of the memory is available• can be done with base/bound registersz I/O Protection– I/O devices can only be accessed in supervisor modez Processor Protection– Periodic timer returns processor to supervisor mode11CMSC 412 – S03 (lect 2)System Callsz Provide the interface between application programs and the kernelz Are like procedure calls– take parameters– calling routine waits for responsez Permit application programs to access protected resourcesload r0, xsystem call 10User ProgramOperating System(kernel)Code forsys call 10register r012CMSC 412 – S03 (lect 2)System Call Mechanismz Use numbers to indicate what call is madez Parameters are passed in registers or on the stackz Why do we use indirection of system call numbers rather than directly calling a kernel subroutine?– provides protection since the only routines available are those that are export– permits changing the size and location of system call implementations without having to re-link application programs13CMSC 412 – S03 (lect 2)Types of System Callsz File Related– open, create– read, write– close, delete– get or set file attributesz Information– get time– set system data (OS parameters)– get process information (id, time used)z Communication– establish a connection– send, receive messages– terminate a connectionz Process control– create/terminate a process (including


View Full Document

UMD CMSC 412 - Lecture Slides

Documents in this Course
Security

Security

65 pages

Deadlocks

Deadlocks

22 pages

Set 2

Set 2

70 pages

Project 2

Project 2

21 pages

Load more
Download Lecture Slides
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Slides and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Slides 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?