I/O Ports, Explained | Introduction to Operating Systems

UPI Study › Courses › Introduction to Operating Systems › Free lessons › Lesson 5.7 Free with a free account

I/O Ports

Introduction to Operating Systems · Chapter 5: Peripheral Devices and I/O SystemsSection 5.7 · lesson 42 of 838 min · free with a free account

← How Devices CommunicateNext lesson: Internal Buses →

A free account plays all of Chapter 1 and 3 more lessons of Introduction to Operating Systems. Create a free account →

Earn 3 college credits for Introduction to Operating SystemsRecommended for credit by NCCRS · Computer Science 354 · self-paced · one payment, lifetime access

In this lesson

Serial and parallel links, common laptop ports and USB speed math.

  • Identify the connector, wiring and protocol that make up an I/O port
  • Explain why fast links moved from parallel to serial
  • Distinguish a USB connector shape such as USB-C from the USB version it supports
  • Calculate a minimum transfer time from a file size in bytes and a link speed in bits per second

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 (1,096 words). Read along, or search it.

Opening Scene

A Row of Differently Shaped Holes

Turn Sam's old laptop around, and you'll find a row of little holes, each a different shape. Sam runs a small online bakery, and every hole has a job. One takes the phone charger cable, one takes a flash drive, and one takes the cable to the TV. Why so many shapes? Because each hole is a doorway, built for one kind of conversation. The shape, the wires inside, and the rules spoken through them all matter.

Definition

Connector, Wires and Protocol

An I/O port is a connection point where a peripheral plugs into the computer. Behind each port sits a small controller chip that speaks the port's language, and hands the data to the system. The OS talks to that controller through a driver, as in lesson 5.6. Every port is built from three choices. The connector: the shape you can see and touch. The wires inside. And the protocol: the agreed rules for what each signal means. Keep those three apart in your mind. Most of this lesson is about how they mix and match.

Serial Versus Parallel

One Path or Many Wires

Imagine moving eight books across a room. You could carry one book, eight times. Or hand all eight to eight friends, who walk across together. The first way is serial: bits travel one after another, on a single signal path. The second is parallel: several bits travel side by side, on separate wires, at the same moment. Old printers used a wide parallel port, and old modems and mice used a serial port, a style often called RS-232. You'll rarely find either on a new laptop.

Why Serial Won

Parallel Signals Drift Out of Step

So why did serial win? At high speeds, the signals on parallel wires don't arrive at exactly the same instant. The wires differ a tiny bit in length and electrical behavior. And a receiver that must wait for the slowest wire can't go any faster. A single serial path has nothing to line up with, so it can be pushed much faster. It also needs a thinner, cheaper cable. Serial isn't old-fashioned. USB stands for Universal Serial Bus. Ethernet and DisplayPort are serial too. Today's fast links are almost all serial.

Quick Check

Old Printer Cable Versus USB

Quick check. An old printer cable has twenty-five pins, and moves eight bits at once. A USB cable sends one bit at a time, on a single data pair. Push both to very high speeds. Which one can go faster? Pause, and decide. The USB cable. With one path, there's nothing to keep in step, so its rate can climb far higher. Eight bits at once sounds faster, and at slow speeds it can be. But push it hard, and the eight wires drift apart in timing, so the receiver must wait for the slowest one.

Common Ports

USB, HDMI, DisplayPort, Ethernet and Audio

Now the ports you'll find on a laptop. USB is by far the most common, made for almost any small peripheral: flash drives, mice, printers. HDMI and DisplayPort send video to a screen, and normally sound too. Ethernet uses the RJ45 plug, a square plastic connector with eight little contacts, for wired networks. Chapter 7 covers networking. And the audio jack is a round plug that carries sound as a smooth electrical wave. It's analog, so it's the one port here that isn't carrying bits. Each port has its own job.

USB Explained

USB-C Is Only a Shape

USB began as a way to replace the mess of old serial and parallel ports with one standard. The universal part was the whole point. And the name covers two separate things. As a protocol, it's a set of rules and speed tiers, released in versions. As a connector, it comes in several shapes. USB-A is the flat rectangle you know. USB-C is a small, oval, reversible plug that fits either way up. Here's the key point: USB-C is only a shape. A USB-C port can speak a slow USB version or a fast one, and some also carry video, or charge a laptop. What a port or cable supports is in its specification, not its shape.

Nominal Speeds

From 12 Megabits to 10 Gigabits

Here are some widely published top speeds, in bits per second. They're nominal: the maximum on paper. USB 1.1: twelve megabits per second. USB 2.0: four hundred eighty megabits. USB 3.2 Gen 1, which used to be called USB 3.0: five gigabits. USB 3.2 Gen 2: ten gigabits. And gigabit Ethernet, over an RJ45 cable: one gigabit per second. Real transfers also pay for overhead, so they land below these numbers.

Worked Example

Timing a Four Gigabyte Copy

Sam wants to copy a four gigabyte folder of shop photos. The speed is in bits per second, but the file is in bytes. So first, multiply the file by eight, then divide by the speed. Capital B means bytes, small b means bits, as in lesson 4.3. Four billion bytes is thirty-two billion bits. Over USB 2.0, that's at least sixty-seven seconds. Over USB 3.2 Gen 1, about six and a half. And old USB 1.1 needs about forty-four minutes. That's why it's hopeless for big files. The classic slip is forgetting to multiply by eight. Dividing bytes by the bit rate gives about eight seconds on USB 2.0: eight times too small. And these are minimum times at the nominal rate. A real copy is slower, because of overhead, the drive's own speed, and other traffic.

Real Case

A Slow USB 2.0 Cable

One week, Sam's backup drive crawled. It has a USB-C plug, Sam said, so it must be fast. Ivy, who looks after the computers at a school, picked up the cable and read its label: USB 2.0. The shape was modern. The rules inside were old. Four hundred eighty megabits sounds big, she said, but your folder takes more than a minute, at best. The drive and the laptop's port both supported five gigabits. So she swapped in a cable rated for that, and the copy dropped to a fraction of the time.

Quick Check

Two Gigabytes Over Gigabit Ethernet

Quick check. Ivy moves a two gigabyte file between two school computers, over gigabit Ethernet: nominally one gigabit per second. What's the shortest time the copy can take? Pause, and work it out. Sixteen seconds. Two billion bytes, times eight, is sixteen billion bits. Divided by one billion bits per second, that's sixteen seconds, at best. Two seconds is the classic slip: dividing bytes by a bit rate. And a hundred twenty-eight seconds multiplies by eight twice. Only sixteen seconds checks out.

Key Takeaways

Shapes, Protocols and Transfer Math

To recap. A port is a connector, the wires, and a protocol, and the shape alone tells you little. Fast links went serial, because parallel wires drift out of step. USB, HDMI, DisplayPort, and Ethernet carry bits. The audio jack carries an analog wave. And to time a copy, multiply bytes by eight, then divide by the bit rate.

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.

Compare: Linux vs Operating Systems

Why take it here

Why students take Introduction to Operating Systems with UPI Study

What happens under every app you runIntroduction to Operating Systems explains the software that runs a computer: processes and scheduling, threads and synchronization, deadlock, memory and paging, devices and storage, file systems, networking, security and virtualization. It suits computer science and information technology degrees.
Credit at a fraction of the priceThe same 3 credits can cost $750 or more at a US college. Here it is one payment, self-paced, with lifetime access.
Finish your degree soonerTransfer credits reduce the courses you still owe, so you can graduate earlier or lighten a heavy semester.
Strengthen an applicationA completed college-level course on an official transcript shows admissions and scholarship committees you can do the work.
Study on your own scheduleNo start dates, no deadlines. Watch the lessons, practice, and take the final when you are ready.
130,000+students helped with college creditsACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

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.

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 I/O Ports

Why is serial transmission faster than parallel at high speeds?
Serial links can run faster because a single signal path has nothing to keep in step. On parallel wires, small differences in length and electrical behavior make bits arrive at slightly different instants, and the receiver must wait for the slowest wire. That timing drift limits parallel speed, so modern fast links such as USB, Ethernet and DisplayPort are serial.
Does a USB-C port mean fast transfer speeds?
No, USB-C describes only the connector shape, not the speed. A USB-C port or cable may follow a slow USB version such as USB 2.0, at 480 megabits per second, or a faster one such as USB 3.2 Gen 2, at 10 gigabits per second. Some USB-C ports also carry video or charge a laptop. The specification, not the shape, tells what it supports.
How do you calculate how long a file transfer will take?
Multiply the file size in bytes by 8 to get bits, then divide by the link speed in bits per second. A 4 gigabyte folder is 32 billion bits, so over USB 2.0 at 480 megabits per second it needs at least about 67 seconds. Forgetting to multiply by 8 gives an answer eight times too small. Real copies take longer because of overhead, drive speed and other traffic.
What is the difference between USB 2.0 and USB 3.0 speeds?
USB 2.0 has a nominal top speed of 480 megabits per second, while USB 3.0, now called USB 3.2 Gen 1, reaches 5 gigabits per second, roughly ten times faster. A 2 gigabyte file therefore needs at least about 33 seconds over USB 2.0 but only about 3.2 seconds over USB 3.2 Gen 1. Real transfers land below these nominal figures.

About the Introduction to Operating Systems course

How many college credits is Introduction to Operating Systems?
Introduction to Operating Systems (Computer Science 354) carries a NCCRS credit recommendation for 3 semester credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
How much does Introduction to Operating Systems cost and what is included?
$250, paid once, with lifetime access: all 83 video lessons, a practice quiz after each, the graded work and final exam, and an official transcript when you finish. Students who want several courses choose UPI Study PRO instead.
Which universities accept UPI Study credits?
UPI Study has signed partner agreements with universities such as Thomas Edison State University, University of the People and Charter Oak State College, and works with universities such as Penn State, SNHU and SUNY. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities. Use "Find my college" on this page to check yours.
How long does Introduction to Operating Systems take?
It is self-paced with no deadlines. The 83 lessons total about 10 hours of video; most students add reading and practice time and finish in a few weeks to a few months, on their own schedule.
How are the exams done?
Quizzes and assignments are online in the course. The final exam is taken online with proctoring; a person on the UPI Study team checks assignments, usually within two days.
How do my credits reach my college?
When the course shows 100% complete, request the official transcript from your dashboard. It is sent to the college you name, and you can send it to more than one. Check your college first with "Find my college" on this page, or ask Athena.

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

Introduction to Operating Systems
3 credits · NCCRS
Enroll →