UPI Study › Courses › Introduction to Operating Systems › Free lessons › Lesson 7.1 Free with a free account
How Computer Networks Work
Introduction to Operating Systems · Chapter 7: Computer Networks: Architecture, Layers, and ProtocolsSection 7.1 · lesson 56 of 838 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: The Seven-Layer OSI Model →← Types of File SystemsNext lesson: The Seven-Layer OSI Model →
A free account plays all of Chapter 1 and 3 more lessons of Introduction to Operating Systems. Create a free account →
In this lesson
How computers share data and how the OS sends it across networks.
- Define a computer network, distributed processing, and client-server versus peer-to-peer designs
- Describe the roles of the socket, protocol stack, network driver and NIC
- Classify networks by reach as PAN, LAN, MAN or WAN, and by topology
- Calculate transfer time by converting megabytes to megabits
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,120 words). Read along, or search it.
Opening Scene
An Order Crosses Town in Seconds
Here's Sam, who runs a small online bakery. One evening, a customer across town taps Place order on the shop's website. A moment later, Sam's phone buzzes with the new order. In between, that order crossed a radio link, some wires, and several machines that nobody involved ever saw. Who arranged all of that? And which part of it is the operating system's job?
Definition
Networks Let Computers Share
A computer network is two or more computers joined so they can exchange data. Think of roads. Each house is useful on its own, but roads let a whole town share one shop, one school, and one hospital. Networks let computers share in the same way: files, a printer, one internet connection, and, most importantly, work.
Distributed Processing
One Job Spread Over Many Machines
That last one has a name: distributed processing. One job is spread over several machines that cooperate over a network. When a customer orders from Sam's shop, the customer's phone draws the page. The shop server stores the order and works out the total. A payment service somewhere else handles the money. Each machine does the part it's best placed to do. Don't mix this up with multiprocessing, from lesson 2.1. There, the many workers are CPUs inside one computer.
Arrangements
Client-Server and Peer-to-Peer
The usual arrangement is client-server. A server waits for requests, and clients send them. Sam's shop server is a server. Every customer's browser is a client. The other arrangement is peer-to-peer. The machines are equals, and each one both asks and answers, like two laptops swapping a file directly.
Inside the OS
Socket, Stack, Driver and NIC
Now zoom in on one machine: Sam's laptop, as its browser sends a request to the shop server. The browser doesn't know how to push electricity down a wire. It just says: send these bytes to the shop server. The operating system takes it from there, in four steps. First, a socket: the doorway an app uses to reach the network. To the program, a connection feels almost like a file it can read and write. Second, the protocol stack: OS code that follows the network's rules, called protocols. It splits data into pieces, adds addresses, and checks for errors. Third, the network driver: the small program that knows one specific card, as in lesson 5.6. And fourth, the NIC, the network interface card or chip. It turns bits into electrical, light, or radio signals. A reply climbs the same steps in reverse, from the bottom up.
Layering
Troubleshooting From the Bottom Up
Because of this split, the browser never cares how the bytes leave the laptop: by radio, or by cable. Both look like an interface to the OS, so the apps above run unchanged. It's the layering idea from lesson 1.4. The split also gives a repair habit. When the network seems broken, check from the bottom up. Is the cable or Wi-Fi connected? That's the NIC. Does the OS list the interface? That's the driver. Does the laptop have an address? That's the stack. Only then, blame the website.
Real Example
A Wi-Fi Driver That Lost Its Card
Ivy, who looks after the computers at a school, uses this habit every day. One afternoon, Sam's shop page loaded slowly, and Sam blamed the website. Ivy saw a warning mark on the Wi-Fi icon. She unplugged the little USB Wi-Fi stick, and plugged it back in. The driver reloaded, the laptop got its address back, and the page snapped back too. The card was fine, she said. The driver had lost it for a moment.
Quick Check
New Wi-Fi Cards Need a New Driver
Quick check. Ivy replaces the Wi-Fi cards in her school's laptops with a different brand of card. Which part of the operating system has to change: the socket, the protocol stack, or the network driver? Pause, and decide. The network driver. It's the one part that knows a specific card, so a new kind of card needs its own driver. The protocol stack and the socket never see the card. They stay the same, and so do the apps above them.
Network Sizes
PAN, LAN, MAN and WAN
Networks are also sorted by how far they reach. A PAN, a personal area network, joins the gadgets around one person: a phone, earbuds, a watch. A LAN, a local area network, covers one home, one shop, or one school. A MAN, a metropolitan area network, links sites across a city. And a WAN, a wide area network, crosses regions and countries. The Internet joins a huge number of networks into one. Even its name comes from internetwork: a network made of networks.
Worked Example
Bytes, Bits and Transfer Time
Size also changes how fast a link usually is. So how long does Sam's 12 megabyte cake photo take to send? First, a trap. Files are measured in bytes, with a capital B. Link speeds are in bits per second, with a small b. One byte is eight bits. So 12 megabytes is 96 megabits. On a Bluetooth-style link of 2 megabits per second, that's 48 seconds. On old 54 megabit Wi-Fi, it's under two seconds. On a gigabit wired LAN, about a tenth of a second. Those are nominal speeds, the advertised top rates. Real life is a little slower.
Quick Check
Sending a Video Over 100 Megabits
Quick check. Ivy sends a 20 megabyte video across a link of 100 megabits per second. At nominal speed, about how many seconds does it take: 0.2, 1.6, or 16? Pause, and decide. One point six seconds. Twenty megabytes is a hundred sixty megabits, and a hundred sixty divided by a hundred is one point six. Point two seconds is the trap. It divides megabytes by megabits per second, and forgets the factor of eight.
Topology
Star, Bus, Ring and Mesh
Last, the shape. The pattern in which devices are wired together is called the topology. In a star, every device links to one central switch. In a bus, all of them share one cable. In a ring, each device passes data to its neighbor. And in a mesh, many devices link to many others. Today's homes, schools and offices are nearly all stars. One broken cable cuts off only one device, and the rest keep working. A mesh is what makes the wide Internet tough: if one link fails, traffic finds another road. But extra links cost money, so meshes go where failures are expensive.
Wrap-Up
Every Machine Did Its Part
Back to Sam's buzzing phone. The customer's phone, the shop server, and the payment service shared one job: distributed processing. The order left the customer's phone by radio, crossed the Internet, and reached the shop's own LAN. And on every machine, the OS did its part: the socket, the protocol stack, the driver, and the NIC that made the signals.
Key Takeaways
Sharing, Layers, Reach and Shape
To recap. A network joins computers so they can share data, and spread one job over several machines. Inside each machine, the OS runs the socket, the protocol stack and the driver. The NIC makes the signals. By reach, networks are PANs, LANs, MANs and WANs. And by shape: star, bus, ring and mesh.
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 How Computer Networks Work
What is the difference between client-server and peer-to-peer networks?
How do you calculate how long a file takes to download?
What is the difference between a LAN and a WAN?
Why do most offices use a star topology?
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 →