UPI Study › Courses › Introduction to Operating Systems › Free lessons › Lesson 5.4 Free with a free account
Classifying Peripheral Devices
Introduction to Operating Systems · Chapter 5: Peripheral Devices and I/O SystemsSection 5.4 · lesson 39 of 837 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Introduction to Operating Systems.
Lesson complete
Earn the 3 college credits for Introduction to Operating Systems
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: Device Access Methods →← The System BusNext lesson: Device Access Methods →
A free account plays all of Chapter 1 and 3 more lessons of Introduction to Operating Systems. Create a free account →
In this lesson
Sorting devices by data direction and by character, block or network shape.
- Classify devices by direction as input, output, both or storage
- Distinguish character devices from block devices and network devices
- Relate block devices to direct access and streams to sequential access
- Explain how the operating system handles each device class differently
Free study notes
Get this lesson's notes by email
The key points and 4 practice questions with answers, in your inbox. One email, free.
One email. Unsubscribe in one click.
Transcript
Everything said in the video, section by section (906 words). Read along, or search it.
Opening Question
Streams Versus Numbered Chunks
A keyboard can only talk to the computer. A monitor can only listen. A touchscreen does both, and a drive remembers whatever you tell it. But the operating system sees a different divide. Some devices hand over a stream of bytes as they happen. Others let you ask for chunk number seven. Which kind a device is changes how the system must treat it. So how do we sort them? Let's find out.
By Direction
Input, Output, Both and Storage
The simplest sort asks one question: which way does the data travel, relative to the processor? Input devices send data into the computer: a keyboard, a mouse, a microphone, a barcode scanner. Output devices take data out of it: a monitor, speakers, a receipt printer. Some carry data both ways: a touchscreen, a network adapter, a headset with a microphone. And storage devices write data to keep it, and read it back later: a hard drive, an SSD, a USB stick. They do input and output too, but their special purpose is keeping data, so they get a class of their own.
Quick Check
A Controller That Rumbles
Quick check. A game controller has buttons and a joystick. And when your car crashes in the game, it rumbles in your hands. Which class is it: input only, output only, or both? Pause, and decide. Both. The buttons and the joystick send data in. The rumble is the computer sending a command out, to a little motor inside. Input is the tempting answer, because we think of controllers as things we press. But the moment it rumbles, data is flowing the other way.
By Data Shape
Character Devices and Block Devices
The operating system asks a second question: what shape is the data? A character device sends or takes data as a stream of single bytes, one after another, in order. You can't ask a keyboard for the five hundredth key you pressed last week. You get each keystroke as it happens. Keyboards, mice, serial lines, scanners, and most printers are character devices. A block device stores data in fixed-size chunks called blocks, each with its own number. You can ask for block seven, then block two, then block nine hundred, in any order. That's called random access. Hard drives, SSDs, USB sticks, and optical discs are block devices.
Third Kind
Network Devices and Packets
Operating systems often add a third kind, just for network adapters. A Wi-Fi adapter is neither a clean stream nor a set of numbered blocks. Its data arrives in packets, at moments nobody controls, and some packets can be lost. You'll meet packets properly in lesson 8.3.
Access Methods
Jumping Ahead Versus Passing Through
The shape gives two ways of getting at data. Block devices allow direct access: jump straight to a numbered block. A stream allows only sequential access, and so does an old tape. To reach the five hundredth item, you pass the first four hundred ninety-nine. Disks sit in the middle. They offer direct access to blocks, but they're still read faster in order.
Real Case
A Scanner That Remembers Nothing
Sam, who runs a small online bakery, once asked why the barcode scanner never remembers the last bag it scanned. Ivy, who looks after the computers at a school, explained. It's a character device. It hands you each code once, as it happens, and keeps nothing. If your program isn't listening at that moment, the code is gone. So Sam's order program now listens all day. The external drive is the opposite. As a block device, it keeps every block until Sam writes over it.
Two Labels
Direction and Shape Together
So every device gets two labels, and they answer separate questions. Here's Sam's shop, sorted both ways. The keyboard and the scanner are input, and character. The receipt printer is output, but still character. The external drive and the laptop's SSD are storage, and block. And the Wi-Fi adapter works in both directions, and it's a network device. A common mistake is treating direction and shape as one question. They're two questions, so answer both.
OS Handling
Buffers, Reordering and Block Caches
Why does the operating system care? Because each kind needs different handling. For a character device, it passes the bytes straight through, in the order they arrive. It may hold them in a small waiting area, a buffer, so a fast typist's burst isn't lost. But there's no going back to byte twelve. For a block device, it can reorder requests so the drive does less work. And it can keep recently used blocks in memory, so a later read skips the device. That's a cache. The file system, in lesson 6.2, sits on top of block devices. And for a network device, it must handle data that turns up at any moment, or never arrives at all.
Quick Check
A Dashcam Memory Card
Quick check. A dashcam in a car saves its video to a small memory card. The playback app jumps straight to minute forty of yesterday's drive, without reading the first thirty-nine minutes. Is the memory card a character device, a block device, or a network device? Pause, and decide. A block device. Jumping straight to a spot, without passing everything before it, is exactly what numbered blocks allow. Character device is the tempting pick, because the video plays like a stream. But how you watch it doesn't decide anything. The card can be asked for any block, in any order.
Key Takeaways
Two Questions for Every Device
To recap. By direction, a device is input, output, both, or storage. By shape, it's a character device, a stream, or a block device, with numbered chunks. Network devices are a third kind: packets, at any moment, and some get lost. And the class decides how the operating system handles it.
About Introduction to Operating Systems at UPI Study
Introduction to Operating Systems (Computer Science 354) is a self-paced online course of 83 video lessons in 10 chapters, from what an operating system does and process scheduling to concurrency, memory, devices, file systems, networks, the internet, security and virtual machines. It carries a NCCRS credit recommendation for 3 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus All Computer Science courses Every course with PRO →
Compare: Linux vs Operating Systems
Why take it here
Why students take Introduction to Operating Systems with UPI Study
Where the credit goes
Universities that work with NCCRS
Introduction to Operating Systems carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About Classifying Peripheral Devices
What is the difference between a character device and a block device?
Is a game controller an input or output device?
Why are network adapters treated as a separate device class?
How does an operating system handle block devices differently from character devices?
About the Introduction to Operating Systems course
How many college credits is Introduction to Operating Systems?
How much does Introduction to Operating Systems cost and what is included?
Which universities accept UPI Study credits?
How long does Introduction to Operating Systems take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 3 credits in Introduction to Operating Systems.
83 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
Updated
3 credits · NCCRSEnroll →