How Computer Networks Work | Introduction to Operating Systems

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

← 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 →

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

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.

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 How Computer Networks Work

What is the difference between client-server and peer-to-peer networks?
In a client-server network, servers wait for requests and clients send them, while in a peer-to-peer network the machines are equals that both ask and answer. A shop's web server answering many customers' browsers is client-server. Two laptops swapping a file directly, with no central machine in charge, is peer-to-peer. Many real systems mix both arrangements.
How do you calculate how long a file takes to download?
Convert the file size from bytes to bits by multiplying by eight, then divide by the link speed in bits per second. A 12 megabyte photo is 96 megabits, so it takes about 48 seconds at 2 megabits per second and roughly a tenth of a second on a gigabit link. Real transfers run a little slower than these nominal figures.
What is the difference between a LAN and a WAN?
A LAN, or local area network, covers one home, shop or school, while a WAN, or wide area network, crosses regions and countries. Between them sits a MAN, linking sites across a city, and below them a PAN joins the gadgets around one person. The Internet joins a huge number of such networks into one network of networks.
Why do most offices use a star topology?
Most homes, schools and offices use a star topology because one broken cable cuts off a single device while the rest keep working. In a star, every device links to one central switch. A bus shares one cable, a ring passes data from neighbor to neighbor, and a mesh links many devices to many others, which suits places where failures are expensive.

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 →