24-files-io-devices-part2

24-files-io-devices-part2 - CS241 Systems Programming...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS241 Systems Programming Files, I O, devices (par t 2) Yoann Padioleau shell ( P2 ) code heap stack Reminder: context of this lecture 0x0000 0xFFFF code heap stack printf(foo\n); write( 1 ,); mov ax,5 int 0x80 foo.exe ( P1 ) Virtual memory, restricted (user)-mode Real memory, power (kernel)-mode kernel hardware interrupt table software interrupt table sys_write(){} sys_open(){} disk_write(){} screen_write(){} File descriptor tables P1 P2 0 (stdin) 1 (stdout) 2 (stderrt) 3 4 5 Pn opened files table /dev/screen /dev/kbd /tmp/bar.txt device drivers What happens next ? What happens here ? I f asked today to write a joystick device driver ? Table of contents I nterface Files, File Descriptors Special Files, Device Files, Terminal Buffered I O, flush Files as a form of I PC: redirection, pipes, dup Files and concurrency, O_EXCL, lock, test_and_set at file level Others (mkfifo, select, mmap, non blocking I O, fcntl, ioctl, terminal control) I mplementation Device properties Asm in/ out ports or memory mapped I O, hardware interrupt Device drivers I nterrupt, polling, DMA Scheduling, kernel stack, concurrency in kernel Putting it together: tracing read() Devices taxonomy Human interface devices: screen, keyboard, mouse, speakers, microphone, webcam, joystick, multi-touch screen, virtual reality gloves, holographic display Storage devices: disk, tapes, floppy, usb key, cd, dvd, blu-ray Transmission devices: modem, network card, wireless card Misc devices: printer, camera, cam recorder Computer Hardware Review Components of a simple (old-school) computer Bus bus controller device Device components I / O units typically consist of The mechanical component: the device itself The electronic component: the device controller...
View Full Document

Page1 / 22

24-files-io-devices-part2 - CS241 Systems Programming...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online