Introduction to Operating Systems
Introduction to Operating Systems
1.1 Course Structure: Modules, Assessment, and Resources
1.1.1 The Roadmap: What the Course Covers
This first session answers a simple question that the whole course builds on: what is the operating system actually doing inside your machine, between the moment you switch it on and the moment your work is done?
This opening session is the first module of the course, and it is an introduction: what an operating system is, the definitions people give for it, how a computing system is put together, the design issues that come up, and the different types of systems that exist. Everything that follows is set up from here.
Module one covers this introduction. From the second module onward, the course moves into processors and threads, and then into how processes get scheduled, what the different scheduling algorithms are, and what process synchronization means. The professor flagged these as very important topics. After that come process synchronization and deadlock: what a deadlock is, how to prevent it, how to avoid it, and how detection and recovery work. Then memory management — if you have very little memory, how do you manage with many processes? Then file systems — how the operating system deals with files — and finally secondary storage structures and management, meaning the different scheduling algorithms that exist for the disk. With that, the course completes.
Everything discussed in the course is about the general characteristics of operating systems, not about any one particular operating system. Wherever a concept applies to a specific system, that example is quoted at that point in the course.
Scope: The course describes operating systems in general. A claim that holds for Linux may not hold verbatim for Windows or macOS; the course points out where a particular system does something differently, rather than teaching one product's internals. Do not memorize OS-specific details as if they were universal rules.
1.1.2 Assessment Breakdown
The evaluation has three components, and it is worth writing them down once so the numbers stay straight for the whole semester:
| Component | Weight | Form | What it covers |
|---|---|---|---|
| First component | 25% | Quiz one, quiz two, and the lab (quiz one can be run as an assignment) | Online, early in the course |
| Mid-semester | 35% | Closed-book test, two hours | Contact sessions 1 to 8 only |
| Comprehensive exam | 40% | Open-book test, two and a half hours | All the topics present in the handout |
Everything is conducted online — if a component is a lab, it is conducted as an assignment: you simulate the given exercises in the CPU-OS simulator, take snapshots of the output, and submit them by the announced date and time. If any change is announced, it will be put on the portal. Dates were announced as fixed: the mid-semester on March 16 and the comprehensive exam on Saturday, May 18.
Exam note: the split is 25% (quiz one, quiz two, lab) + 35% (mid-semester) + 40% (comprehensive), and the mid-semester syllabus is strictly contact sessions 1 to 8 — anything taught in later sessions will not appear on it.
1.1.3 Textbooks and References
The standard textbook for the course is Operating System Concepts by Abraham Silberschatz, and the e-book is available on the e-learning portal — the professor pointed out that it is readily available there. The PowerPoint-style session materials follow this textbook closely. For reference, two more books were named: William Stallings, Operating Systems: Internals and Design Principles, and The Design of the UNIX Operating System, which the professor noted is relevant to a topic that appears in the second or third unit of the syllabus.
For the assignment, you will download the CPU-OS simulator from the course site, and a demo will be given before the mid-semester, because the assignment is to be submitted after the mid-semester. The list of exercises can be done individually or in a group; groups are limited to four members.
1.1.4 How the Class Runs
This session runs for one and a half hours, and the course follows a flipped mode. Recorded sessions are available on the portal, and you are expected to go through them before coming to the contact session. Session materials are posted on the same day the session completes. Announcements for every quiz and assignment are made well in advance on the portal. There are eight contact sessions covering the mid-semester portion. If something cannot be completed in a particular session, it simply moves to the next session.
1.1.5 Opening Exchange: Any Doubts?
Q: Is there any doubt in the handout or with respect to any of the assessment components?
A: No doubts were raised, and the class moved into the topic. If a doubt does come up in a later session, the same channel stays open — questions are welcome as the course goes along.
1.2 What Is an Operating System?
1.2.1 The OS as a Program That Bridges User and Hardware
Every time you press a key, the machine in front of you reacts. But the key is hardware, your word processor is software — so who translates between them? That translator is the operating system, and it is the one program you cannot skip on the way to the machine.
An operating system — the program that sits between you and the machine — is first of all a program: a set of instructions that performs some task. What makes it special is its position. The operating system acts as an intermediary, an interface, or a bridge between a user and the system, where "system" means the hardware sitting in front of you. Most people use a laptop or desktop every day, but in detail, what the operating system does internally — that is what this course opens up.
An operating system is the bridge between the user and the hardware. The motivating picture is simple: a computer system has many parts, and if you want to communicate with any of those parts — or with most of them in parallel — there has to be a bridge or interface. That bridge is the operating system. Think of it like a translator you cannot skip: any request that touches hardware passes through it.
Through this bridge the user can execute whatever programs they want, make problems easier to solve, and make the system easier to use — and, importantly, the operating system also does these things efficiently. Those are the various goals of the operating system; more of them appear later in the course. Where does the analogy hold, and where does it break? A human translator changes the words but not the meaning; the operating system is stricter — it does not merely translate, it decides whether a request is allowed at all. A user program cannot quietly ask the disk to overwrite another program's file; the operating system checks the request first. That checking role appears again in the dual-mode discussion later in this lecture.
1.2.2 The Four Components of a Computer System
The overall structure of a computing system has four components, and they are worth holding in your head for the whole course:
- Hardware — all the devices: memory, CPU, and everything else physically present.
- The operating system — the component that controls and coordinates the use of the hardware among various applications and among the users.
- Application programs — the software that runs on top of the operating system, each with its own purpose.
- Users — the people (or other systems) who use the machine.
Imagine a network of systems: each system is used by a user, in an organization, an institution, or a lab. The same system can also be used by multiple users, and multiple programs or tasks can run in parallel on one system. A user can be a human being, or it can be another system — a server sitting somewhere else, or another machine in the same local network. When you interact with that other machine, you are the user and it is another "user" in the network from the operating system's point of view.
Application programs are built for a specific purpose. A text editor, where you type text and make changes, is one. Word, PowerPoint, and Excel are application software. Games are application software. A browser is application software too: through it you interact with your own system or with a remote one — when you search and click a link, the information travels from a place that is not near you, and it is the operating system, together with the hardware, that reaches out to the remote server and brings the information back to your screen. Whenever any software has to deal with hardware, the operating system is needed.
Real-world: that last sentence is the hidden cost of every web search. The bytes of your query leave through a network card, travel to a distant server, and return — and the operating system arranged every step of that journey, from opening the network connection to writing the reply onto your screen.
1.2.3 Goals: Easier to Use, Efficient to Run
The operating system exists for convenience and for performance. Resource utilization — making sure the CPU, memory, and devices are put to good use — is very important, but as a user you do not think about it. You do not decide how memory is managed or how resources are shared; the operating system does. The system tries to keep resource utilization high while keeping the system usable. Later sections show exactly how it goes about that.
Two goals pull in opposite directions: the user wants ease of use, the administrator wants efficiency. The operating system's design work is mostly the art of satisfying both at once.
1.2.4 Kinds of Computer Systems
Many kinds of computer systems exist, and the operating system adapts to each:
- Desktops — the classic personal machine.
- Workstations — in a network of systems, each user is given a workstation.
- Handheld computers — from mobiles to iPads. Handheld systems are the interesting case: the resource utilization may be poor — you may not be using all the resources — but the system is optimized for usability. You use it until the life of the battery runs out; that is the trade-off the design makes.
- Embedded systems without any interface — used in automobiles and other smart devices. A car may have components installed (a music system, sensors) that you do not use all the time; you use them when you take the car out. A sensor does its work only when someone comes or something happens, and otherwise sits idle. Even a CCTV that monitors a house all day is idle most of the time you look at it. These systems are utilized rarely, and the operating system still has to manage that sporadic usage.
The phone in your pocket is the clearest example of the trade-off: its operating system spends most of its design budget on battery life and responsiveness, not on squeezing the last drop of throughput from the processor. The moment you press the screen, the screen must react — that is usability winning over utilization. A server, by contrast, runs workloads back to back and is tuned the opposite way: every idle CPU cycle is wasted money.
1.2.5 Industry Applications: The Operating System Landscape
Most people meet operating systems as products. Microsoft Windows is the most widely used, holding about 64% of the usage of today's systems; Unix or Linux comes next, then the Mac (macOS). On mobile devices, Android and iOS dominate. Solaris, part of Sun Microsystems, also exists.
Historically, the first operating system was developed for IBM hardware by General Motors — GM-OS was the first system that was developed, and all later systems followed from that start. The reference literature agrees: the first batch operating system, and the first operating system of any kind, was built in the mid-1950s by General Motors for the IBM 701, and the idea was then refined on the IBM 704 before spreading to commercial machines. So "GM-OS" is the correct name to hold onto.
Unix is written in the C programming language — a high-level language — and was developed by Ken Thompson and Dennis Ritchie working together. The course mostly studies Microsoft, Unix or Linux because those are the widely used systems.
Pitfall: Do not confuse the first operating system (GM-OS, 1950s, batch processing for IBM mainframes) with the influential ones that shaped modern design (Unix, Windows, Linux). An exam answer that says "Windows was the first OS" is wrong on both counts — Windows appeared decades later, and Unix (1969) introduced much of the design language this course uses.
1.3 The Operating System as Resource Allocator and Control Program
1.3.1 The Resource Allocator View
Ask ten people "what is an operating system?" and you will get ten answers. Two of them matter for this course, and they describe two different jobs of the same program — the giver of resources, and the guard of execution.
The classic definition of the operating system: it is a resource allocator — the one program that manages all the resources of the system. Many resources exist. The operating system decides which process gets the processor. Main memory is limited, so not every process can live there at once; most processes wait in secondary storage. Secondary storage means magnetic tape, magnetic disc, and optical discs — CDs, DVDs, and Blu-ray discs are examples of optical discs — and now SSDs, solid-state drives, which are based on solid-state devices, faster than hard disks but very expensive; even a small SSD costs more.
A resource is anything that gets utilized. The working definition is deliberately broad: a resource can be a variable, it can be memory, it can be the processor itself. If too many processes request a particular resource, the operating system decides how the resource is handed out and how utilization is kept reasonable. That allocation work is the core of the resource-allocator definition.
The scarce-resource picture shows why allocation is needed at all. Consider a machine with 8 GB of main memory and twenty running processes whose combined needs are 30 GB: fourteen gigabytes of demand simply cannot fit. The operating system must choose which processes live in memory, which wait in secondary storage, and how the 8 GB is divided. Every memory card, every disk drive, and every CPU cycle is the same story: demand exceeds supply, so someone has to ration.
1.3.2 The Control Program View
A second classic definition: the operating system is a control program — it controls the execution of various programs. The system programs it controls include compilers and assemblers. A compiler translates high-level language programs into machine-level language. An assembler translates low-level assembly-language programs into machine-level language. Controlling the execution of these programs — every time you switch on the machine — belongs to the operating system. If the operating system stops working, or something happens to it, the whole system crashes; that is how central it is.
Real-world: a compiler is itself a program — the C compiler that built the browser you use today was itself run under the control of an operating system. So the control program supervises the tools that make other programs, and a failure anywhere in that chain takes the whole machine down.
1.3.3 The Bootstrap Program and the Kernel
When you switch the system on, power it up, or reboot, the first program to run is the bootstrap program — the term that came through garbled in the session ("gini process") is the standard one: the bootstrap program, also called the boot loader, the first program that runs when the system boots. The bootstrap program is stored in read-only memory (ROM) or in an electrically programmable read-only memory (EPROM), which is also called firmware. (Textbooks often write the second option as EEPROM — electrically erasable programmable read-only memory — the difference is only in how the chip is reprogrammed; the role is the same.) It initializes all the configurations needed for the system to start execution. This is the first program that runs in your system, and everything else is controlled by the operating system from that point on.
Bootstrap program (boot loader): the small initial program stored in ROM/EPROM firmware that runs when the machine powers on. It initializes the system — CPU registers, device controllers, memory contents — finds the operating-system kernel, loads it into memory, and hands over control. Kernel: the core of the operating system, the program that runs every time on the system — the one that is always there.
At the heart of it all is the kernel. The kernel is the program that runs every time on the system — the one that is always there — and it is the core of the operating system. With the help of the kernel, programs interact with the hardware: any program that needs hardware goes through the kernel. You can think of the kernel as the permanent resident of the system, the part of the operating system that never leaves memory while the machine is on.
Pitfall: the bootstrap program and the kernel are two different things. The bootstrap starts the system and then exits the stage; the kernel stays in memory and runs for as long as the machine is on. A common mistake is to say "the kernel is the first program to run" — the first program to run is the bootstrap; the kernel is what the bootstrap loads.
1.3.4 No Single Definition
The session made the point that there is no single definition of an operating system. Each person — each textbook — offers one: resource allocator, control program, the program that runs every time. From all of these together you should be able to say what the operating system is.
Holding both definitions together is better than memorizing one: the resource allocator describes what it does with the machine's resources, and the control program describes what it does with the programs that want those resources. One sentence that uses both: the operating system decides who gets what (allocator) and makes sure they run safely (control).
1.4 Computer System Operation: Controllers and the Bus
1.4.1 Devices and Their Controllers
A computer system has a CPU and various controllers, and each controller is responsible for interacting with a particular device. The disk is secondary storage, and interacting with it — reading information or writing information — is controlled by the disk controller. The mouse, keyboard, and printer are input-output devices, and the information that passes through them is handled by the USB controller. To display information on the monitor you need the graphics adapter. Every device of this kind has its own controller that speaks to the rest of the system on its behalf.
Controller: the hardware piece that manages one type of device. It understands that device's low-level signals (which pin means "head moved", which byte is a key code) and presents a uniform interface to the rest of the machine. The CPU does not push individual bytes into the disk; it tells the disk controller what to do, and the controller drives the mechanics.
Why this layering matters: the disk, the keyboard, and the display speak completely different languages. The disk speaks in tracks and sectors, the keyboard in scan codes, the display in pixel coordinates. If the CPU had to speak all of these directly, every new device would force a redesign of the processor. Instead, each device is represented by its own controller, and the CPU talks to controllers — the device's details stay inside the controller. The operating system later exploits the same idea at the software level with device drivers, which are introduced in the caching section.
1.4.2 The Common Bus and Memory Cycles
All of these controllers need a common thing to share information: the bus. Through the bus, information is shared among the devices, and memory is accessed by all of them. The CPU and many devices execute concurrently, which means two or more processes may be competing for the same device at the same time; the memory cycle gets utilized by more than one program or process at once. That competition for memory cycles is exactly the kind of problem the operating system later has to sort out.
Picture a single highway with several on-ramps: the bus is the road, and every device — CPU, disk controller, display — has its own ramp onto it. They can all drive at once, but the road itself is one lane at a time. Each time something crosses the bus to memory, that is one memory cycle, and when two devices want the road at the same instant, someone must wait.
A modern general-purpose computer system so looks like this: one or more CPUs and a number of device controllers, all connected through a common bus that provides access to shared memory. The CPU and the device controllers can execute concurrently — the disk controller can be moving data while the CPU computes — but when they compete for the same memory cycle, the system needs an orderly way to share it. The memory controller exists precisely to synchronize access to the shared memory. That arbitration is a hardware problem today; later in the course the same competition reappears as a software problem, when the operating system must schedule processes that fight over the CPU and the I/O devices.
Every device has a controller that speaks for it, and all controllers meet at the common bus. The bus is the shared bottleneck: the reason the operating system must later care about "who gets the memory cycle" is that the request traffic of all devices funnels through this one highway.
1.5 Interrupts: How the OS Finds Out What Happened
1.5.1 What an Interrupt Is and How the Vector Works
A device controller finishes a disk read and the CPU is busy computing. How does the controller say "done"? It cannot knock on the CPU's door — so it sends an interrupt, a signal that makes the CPU stop what it is doing and listen.
A device controller does its work and then has to tell the CPU that the operation has completed. It does this with an interrupt — it interrupts the execution of the processes running on the CPU by informing the system that this particular thing has been completed. You already use interrupts: Ctrl+C means stop, Ctrl+Z and Ctrl+A are interrupts as well, and each one does its own job.
Interrupt: a signal to the CPU that an event has happened and attention is needed. The interrupt transfers information through the interrupt vector, which holds the addresses of all the service routines. Based on the addresses, the system finds the right service routine and does its work. When a trap occurs, or an exception occurs — both are kinds of interrupt — the control is transferred to the address saved in the interrupt architecture, and the service routine at that address starts executing. Ctrl+Z, for example, stops whatever is running because the address for "stop" is in the vector.
Think of the interrupt vector as a directory: it is a table of pointers to interrupt routines, stored in low memory, and each device is given a number that indexes into the table. When the disk controller raises an interrupt with device number 14, the CPU looks up entry 14 in the vector, finds the address of the disk's service routine, and jumps there. No searching, no guessing — the address comes straight from the table, which is exactly why interrupt handling can be fast enough to keep up with devices.
1.5.2 Hardware and Software Interrupts, Traps and Exceptions
Interrupts come in two kinds. A hardware interrupt is generated by one of the devices connected to the system — Ctrl+C and similar are hardware interrupts. A software interrupt is based on a user request or on an error caused by a program: when a program does something wrong, it causes an exception, and the exception makes a trap — a software-generated interrupt. If a program runs into an infinite loop, that is also the kind of event that produces a software interrupt.
Pitfall: trap, exception, and interrupt are cousins, not synonyms. An exception is the error itself (divide by zero, illegal instruction); a trap is the software-generated interrupt that the exception triggers; a hardware interrupt comes from an outside device. All three land in the same interrupt machinery, but their causes are different — and the course uses "interrupt" loosely to cover all three unless the distinction matters.
The key takeaway: the operating system is interrupt driven — it works based on the interrupts it is given, whatever they are.
1.5.3 Handling Interrupts: Polling vs. Vectored Interrupts
Once an interrupt occurs, it has to be handled. Handling can be done in different ways: with the polling method, or with a vectored interrupt system. These methods identify what type of interrupt has happened, and the appropriate service routine is activated. The vectored approach uses the interrupt vector's addresses; polling checks the devices in turn to see who is requesting service.
| Dimension | Polling | Vectored interrupt |
|---|---|---|
| Who finds the source | The CPU asks each device in turn, "was it you?" | The device itself announces its identity (via the vector index) |
| Speed | Slow: one check per device per interrupt | Fast: one table lookup |
| Cost | No extra hardware on devices | Needs the vector table in memory |
| Typical use | Simple, few devices | Most modern systems (Windows and Unix both dispatch this way) |
When to pick which: polling is fine when devices are few and interrupts rare; once many devices share the system, vectored interrupts win because the device number leads the CPU straight to the right routine.
1.5.4 The Interrupt Timeline: Keeping CPU and I/O Busy
The session walked through the timeline of interrupts as a diagram. There is a line for the user process executing on the CPU and a line for the I/O device. When the I/O device is idle, its line is flat; when it does some work, the line is triggered — an edge — and then it goes back up when the device goes idle again. When the user process is executing on the CPU, its line is up at a level; when it is not doing work, the line is down. The two lines move in opposite directions: when an I/O request comes for a process, the process stops its execution, the CPU line drops, and the I/O device does its work; once the transfer completes, the I/O device goes idle again and the CPU starts executing the next user process. This constant alternation between CPU and I/O is what the diagram shows.
Worked example — reading the interrupt timeline. Draw a time axis with two lines. The top line is the CPU (its state is "high" = executing a user process, "low" = idle); the bottom line is the I/O device (flat = idle, a pulse/edge = busy doing an I/O transfer).
Step by step, left to right:
- t = 0 ms: CPU line is high (process P1 is computing). I/O line is flat (device idle).
- t = 2 ms: P1 issues an I/O request — say, a disk read. The CPU line drops to low: P1 stops executing. The I/O line rises: the disk controller starts the read.
- t = 2–6 ms: CPU low, I/O busy. The disk is doing its mechanical work. Notice the CPU is not waiting — by the design rule below, P2 (next in the ready queue) takes the CPU.
- t = 6 ms: the disk read completes. The I/O line goes flat again (device idle). An interrupt tells the CPU "the read is done". P1 resumes or is rescheduled; the CPU line rises again.
The two lines never both stay high for long: CPU high ⟷ I/O busy. That is the opposite-direction motion the professor pointed out — when one line is busy, the other drops toward idle.
Sense-check: the diagram shows the entire trick of modern systems in two lines — the CPU never stands idle while I/O runs, and the I/O device never stands idle while the CPU runs. When both lines are busy for most of the timeline, utilization is high.
Two failure modes show up on the same diagram. If more processes try to execute on the CPU than it can handle — when the CPU has a queue that is too long — the I/O device sits idle the whole time. If the I/O device has a full queue of processes, the CPU sits idle. In both cases, utilization of the devices is very low; it is either the CPU or the I/O that starves.
Pitfall: an overloaded CPU starves the I/O and an overloaded I/O starves the CPU. Both failures look identical in the timeline — one line permanently busy, the other permanently flat. The fix is not more hardware alone; it is keeping balanced queues in front of both, which is exactly the scheduling problem later in the course.
The important design rule that follows: as soon as the I/O starts, control returns to the user program without waiting for the I/O completion. Once a process has started its I/O, the next process in the queue gets the CPU — the CPU should not be idle. When that next process later finishes its turn or goes to I/O, it returns to the ready queue and waits for its turn again. There should always be some queue of processes, either at the CPU or at the I/O, to get full utilization of both. That is very important.
The operating system is interrupt driven, and the interrupt timeline is its heartbeat: I/O starts → control returns immediately to the user program → the next ready process takes the CPU → the device interrupts when done. Never let the CPU wait for I/O, and never let a device wait with an empty queue.
Q: Any doubts about the interrupt explanation so far?
A: No doubts — this is all an introduction only. Much more detail comes later in the course; no need to worry now, this is just the gist of what is what.
1.6 System Calls and the Device Status Table
1.6.1 System Calls as Requests to the Operating System
A user program cannot touch the disk controller directly — so how does a process actually get moved to the CPU or to the I/O? It asks the one program that can: the operating system, through a system call.
How does a process actually get moved to the CPU or to the I/O? Through a system call: a request we make to the operating system that allows the user to go for I/O or to go for CPU execution. Which of the two you get depends on what type of system call you use. System calls are the standard way a user program asks the operating system for something it is not allowed to do directly.
System call: the formal request channel between a user program and the operating system. The user program names the service it wants — read a file, write to the display, get more memory — and the operating system performs it on the program's behalf. Because only the operating system may touch hardware, the system call is the only door between application code and the machine.
The "depends on what type of system call you use" point matters: system calls are not one thing but a family. A read system call moves the program to the I/O side (it will wait while data is fetched); a request for CPU time moves the program into the ready queue. Later in the course, the type of system call becomes part of how the operating system decides what happens next to a process.
1.6.2 The Device Status Table
To manage all devices, the operating system keeps a device status table: an entry for each and every device, recording what type it is, what its address is, and what state the device is in — whether it is running, ready, or terminated. Every time the situation changes, the values in the table change and the operating system has to modify the table accordingly. That table is one of the ordinary pieces of bookkeeping the operating system does all day.
Worked example — a small device status table. Suppose the system knows four devices:
| Device | Type | Address | State |
|---|---|---|---|
| Disk 0 | Hard disk | 0x1F0 | Running |
| Disk 1 | Solid-state drive | 0x171 | Ready |
| Keyboard | USB input | 0x60 | Ready |
| Printer | USB output | 0x378 | Terminated |
While a print job finishes, the printer's row shows running; when the job ends, the operating system changes that row to terminated and the printer is free. Every interrupt, every completed transfer, every power change is a row edit in this table — the table is the operating system's running picture of all its devices.
Sense-check: three fields, one row per device, and the state column is the volatile one — that is where most of the changes land.
Pitfall: the device status table is bookkeeping, not hardware. A student sometimes expects the table to "do" something; it only records. The work happens elsewhere — the table is what the operating system consults to know which device can take the next request.
1.7 Storage Structure: Units and the Device Hierarchy
1.7.1 Bits, Bytes, and Words
Before the storage structure, the basic units of storage. A bit is the basic unit of storage: either 0 or 1. A byte is a combination of 8 bits, and it is the smallest chunk of storage — a byte is very, very little. Some systems also talk in terms of a word, which depends on the architecture: a word can hold more than one byte, up to 4 bytes or up to 8 bytes. On a 64-bit memory-address system the words are 64-bit words, which means 8 bytes. When the system executes an operation, the block of storage it works with is called a word rather than a byte. Above these, the measurements are the familiar kilobyte, megabyte, gigabyte, terabyte, and petabyte.
Bit (binary digit): the basic unit of storage, a single 0 or 1. Byte: 8 bits — the smallest addressable chunk of storage. Word: the natural unit the processor works with per operation; its size is architecture-dependent (e.g. 4 bytes on a 32-bit system, 8 bytes on a 64-bit system).
Each step multiplies by 1024, not by 1000 — because 1024 is , the natural power of two for binary machines. So — slightly more than a billion. A byte with 8 bits can represent different values, which is exactly enough for the 26 letters (upper and lower case), the digits, and the punctuation of the ASCII character set.
A worked number to fix the scale: a 64-bit machine reads a word of at a time; a 32-bit machine reads . Same instruction, different chunk size — which is why the same program runs at different speeds and memory footprints on the two architectures.
1.7.2 The Storage Hierarchy and What the Arrows Mean
The device hierarchy runs: registers, cache, main memory, solid-state drive, hard disk, optical disk, and magnetic tapes. The diagram carries two arrows. The down arrow tells you how big the storage device is — capacity grows as you go down the hierarchy. The top arrow tells you how fast information gets retrieved from the device — speed grows as you go up. Registers are very, very fast but very limited; a particular processor may have only eight registers or twelve, and the information you store there is tiny. The cache is a very, very small memory, an intermediate memory, and the often-used information is placed there — with the cache, execution becomes much faster, but you cannot place more than a small amount in it. Main memory is bigger than the cache, and the CPU can access it directly. SSD is faster, and again the amount of storage is not large because it is very expensive. The hard disk is bigger in size and not very expensive when compared with the SSD. Optical disks are very, very inexpensive. Magnetic tapes are not at all expensive but are not used much nowadays.
Reading the arrows (the professor's rule): the down arrow means the storage grows bigger — capacity increases as you descend. The top arrow means retrieval gets faster — speed increases as you ascend. So the hierarchy is a ladder of opposites: the fastest things hold the least, and the roomiest things are the slowest.
Visualize the hierarchy as a pyramid. The apex is registers: a handful of words, accessible in one clock cycle. Below them the cache: kilobytes to a few megabytes, nearly as fast. Below that main memory: gigabytes, directly accessible by the CPU. Then the SSD (tens to hundreds of gigabytes, much slower than RAM), then the hard disk (terabytes, slower still), then optical discs, and at the base magnetic tapes — enormous capacity, tiny cost, and retrieval times measured in seconds, which is why tapes survive only for archival backups. The two arrows are the pyramid's two faces: speed on the way up, capacity on the way down.
1.7.3 Volatile vs. Non-volatile Memory; Inside the Hard Disk
Two properties of memory matter for everything that follows. Main memory is volatile: the information stored in it vanishes as soon as you switch the system off. Secondary storage is an extension of the main memory and is non-volatile: even when you leave the system, the information you stored is still there.
Scope: volatile means exactly "powered-off, erased". A program's data sitting in RAM survives a crash only if the power stays on; the file on the disk survives a power cut. This is why files are saved to disk: volatile memory is a rented room, non-volatile storage is your own cupboard.
Inside the hard disk: it is a metal covered with a magnetic recording material. The disk surface is divided into many concentric circles called tracks, and each track is divided into many sectors. The disk controller provides the interaction between this device and the system.
Visualize the platter as a vinyl record: the grooves are the concentric tracks, and each groove is chopped into arcs — the sectors. To read one piece of data, the head must reach the right track (a slow mechanical motion) and then wait for the right sector to rotate under it. Those two mechanical delays, seek time and rotation time, are the reason a disk is thousands of times slower than memory — and the reason the operating system cares about disk scheduling later in the course.
1.7.4 How the Levels Sit: Speed, Cost, and Capacity
The storage system is always organized in terms of speed, cost, and capacity. Solid-state drives are common in today's systems — the operating system itself is stored on the SSD and the system boots from there — but because SSDs are very expensive, capacity stays small. Previously flash memory was used; nowadays everything has come into SSD. Optical discs (CD, DVD, Blu-ray) are nearly free. Magnetic tapes are cheap but rarely used now. The course deals mainly with main memory, magnetic disks, and solid-state drives; registers and cache are studied in the computer organization and architecture courses.
Every storage level trades the same three things — speed, cost, capacity — and the hierarchy is the result: fast is expensive, expensive means small, small forces you down to slower, cheaper, bigger levels. Whoever manages storage is really managing this three-way trade.
1.8 Caching and Data Migration
1.8.1 Caching: Main Memory as a Cache for Secondary Storage
Why is your computer fast at things it did a second ago and slow at things it has not touched in an hour? Because of caching — the habit of keeping what you will need soon in the fastest storage that can hold it.
Caching is the name for putting the information you will need soon into faster storage. The cache holds the recently and often-used values. The picture extends across the whole hierarchy: main memory can be viewed as a cache for the secondary storage — main memory is bigger than the cache, but it is still small compared with the disk, so it holds the working set of what is needed right now. Each device has its own device controller and device driver to manage its I/O operation. Many levels of caching exist, studied in detail in computer organization and architecture; for this course, the key idea is that faster storage holds less information.
Cache: a small, fast storage that holds recently or often-used data so the machine can avoid fetching it from a slow, large storage. Device driver: the software that manages a device's I/O operation on the operating system's behalf — the software counterpart of the hardware controller.
The everyday picture is a desk and a filing cabinet. The cabinet holds everything (the disk); the desk drawer holds what you use today (main memory); the top of the desk holds the sheet you are working on right now (the cache). The relationship repeats at every level of the hierarchy: main memory is a cache for the disk, the cache is a cache for main memory, and registers are a cache for everything below. The rule that ties it all together: faster storage holds less information.
Where does the analogy break? A desk drawer must be emptied and refilled by you; the cache is managed automatically — you never choose what goes in it. What is in the cache is decided by what the program actually touched, most recently and most often.
1.8.2 Data Migration: From Disk to Register
When information lives on the hard disk, it does not jump straight to the CPU. The path: move the information from the disk to main memory first; from main memory it goes to the cache; and finally, if necessary and safe, it reaches a register. Registers hold very small data, so small data can be placed in a register, but large data cannot — large data stops at the cache level. The cache does not hold everything either, only the most recently used values. And main memory cannot keep every program; whatever is necessary is brought into main memory, and whatever is not necessary is put back into the disk. That is how the migration of information from the disk to the register takes place.
Worked example — one word travels from disk to register. Suppose a program needs a single 8-byte value, say the current bank balance, stored on the hard disk. The trip has four legs:
- Disk → main memory. The operating system asks the disk controller for the block containing the value. The block is read into main memory. Cost: milliseconds — the mechanical seek and rotation delay.
- Main memory → cache. When the CPU first requests the value, the cache is checked; on a miss the value is copied from main memory into the cache. Cost: tens of nanoseconds.
- Cache → register. The value fits in a register — 8 bytes is small. The instruction reads it into a register for the arithmetic. Cost: one clock cycle.
- The reverse trip for the result. After the arithmetic, the updated value migrates back the same way: register → cache → main memory → disk (the write may be delayed by the operating system to keep the fast path quick).
Now the same instruction runs again a moment later: the value is still in the cache, so step 2 is skipped — this is the cache hit that makes the machine feel fast.
Sense-check: every trip upward gets faster and carries less, and every value that is no longer needed travels back down again. The phrase "if necessary and safe" in the register step means: only small data (a word or two) goes all the way up, and only data whose change is allowed to be visible goes down again.
1.8.3 Who Manages Each Level
Each level has a different manager: registers are managed by the compiler; the cache is managed by the hardware; main memory, solid-state drives, and magnetic disks are managed by the operating system. The course does not deal with registers and cache; the parts to know are main memory, magnetic disk, and solid-state disk and who manages them.
| Storage level | Manager | Course coverage |
|---|---|---|
| Registers | Compiler | Not covered (computer organization) |
| Cache | Hardware | Not covered (computer organization) |
| Main memory | Operating system | Covered |
| SSD / hard disk / tape | Operating system | Covered |
Caching is the same idea at every level: keep the soon-needed data in the fastest storage that fits it, and let the manager of each level — compiler, hardware, operating system — decide what goes in and what comes out.
1.9 Memory Access: von Neumann and Harvard Architectures
1.9.1 von Neumann: One Shared Bus
A single machine needs two kinds of traffic on its wires: instructions going to the CPU and data going to and from it. What if both share one road? That is the von Neumann architecture — and the sharing comes at a price.
In the von Neumann architecture, there is a common bus that moves data between memory and the CPU. The CPU has the cache on one side and the threads of execution on the other. When the CPU makes an I/O request, it has to go to the particular device, and data is shared between them; if an interrupt occurs in that device, the interrupt is informed to the CPU, and the execution of the particular thread or process stops. Memory holds both the instructions and the data: the instruction has to move to the instruction register, and the data has to move to the registers used for data movement. All of this happens over the common bus, and that single bus is what limits the time taken to move information.
von Neumann architecture: one memory that holds both instructions and data, and one shared bus that carries both kinds of traffic between memory and CPU. The next instruction to execute moves to the instruction register; the data it works on moves to the data registers. Because instruction traffic and data traffic queue up on the same road, the single bus is the bottleneck — the famous von Neumann bottleneck.
1.9.2 Harvard: Separate Buses for Data and Instructions
The Harvard architecture is the other type — a hardware architecture with separate buses for the data and for the instructions. Because the two kinds of traffic no longer share one bus, the speed increases. That is the whole point of the distinction: von Neumann shares one path, Harvard gives each direction its own path.
| Dimension | von Neumann | Harvard |
|---|---|---|
| Buses | One shared bus for instructions and data | Separate bus for instructions, separate for data |
| Memory | One memory holds both instructions and data | Instructions and data can use separate memories (or separate paths to one memory) |
| Bottleneck | Yes — instruction and data traffic queue on one road | No — the two streams move at the same time |
| Typical use | General-purpose computers (your laptop is effectively von Neumann) | Embedded and signal processors (DSPs, microcontrollers) where every cycle counts |
When to pick which: general-purpose systems accept the shared bus for simplicity; embedded processors that must react in real time take Harvard's extra speed, at the cost of more hardware.
The difference is one word: shared versus separate. Von Neumann is a single road for two kinds of traffic — simple, but the road limits speed. Harvard builds a second road — faster, at the cost of extra hardware.
1.10 Multiprocessor Systems
1.10.1 Multiprocessor vs. Multiprocessing
Any system architecture in general uses a single general-purpose processor, and some systems may also have special-purpose processors. Nowadays, though, most systems are multiprocessor-based: multiple processors present in a single system.
Q: Is multiprocessing the same as multiprocessor?
A: No — the two get mixed up easily, because they sound alike. Multiprocessing means doing more than one task. A multiprocessor means you have multiple processors in a single system, each doing one work, and the information is shared between them. This type of system is otherwise known as a parallel system or a tightly coupled system. The preferred term for the hardware is multiprocessor; "multiprocessing" describes the activity, not the machine.
The professor's correction is worth keeping straight: multiprocessing is the verb (many tasks in progress), multiprocessor is the noun (a machine with several processors). The same distinction reappears everywhere in this course — between what a system does and what it is.
1.10.2 Why Go Multiprocessor: Throughput, Economy of Scale, Reliability
Three reasons were given for building multiprocessor systems. First, throughput: the number of works completed with respect to the total number of processes. With multiple processors, more processes get completed in the same time. Second, economy of scale: at a time you can execute more than one, so your time is saved. Third, increased reliability: you can rely on the system even if one processor fails, because two or three more are still there. Related to reliability is graceful degradation: the degradation will not be abrupt — the system slowly degrades, so you get to know about it and can change it out. That combination is called fault tolerance.
Throughput: completed work per unit of time — for a multiprocessor, roughly the number of processes finished in a second, which grows with the number of processors until other bottlenecks appear. Economy of scale: several processors share one chassis, one power supply, one memory system, so per-processor cost falls below the cost of several separate computers. Graceful degradation: a failing system slows down gradually instead of dying abruptly; fault tolerance is the property of a system that can survive component failure because degradation is graceful and the failure is known in advance.
1.10.3 Asymmetric vs. Symmetric Multiprocessing
There are two types of multiprocessor systems. In asymmetric multiprocessing, each processor is assigned a task: the first processor does one work, the second processor does another. In symmetric multiprocessing, each processor performs all the tasks. Suppose there are four tasks: the four tasks are divided among each and every processor, and all four processors work on them together — each processor does its component of the task in parallel, and the results are sent to the memory later. In the symmetric multiprocessing architecture, each processor has its own CPU, its own registers, and its own cache.
Worked example — asymmetric multiprocessing. A machine has two processors. The administrator assigns: processor A handles all the web-server work; processor B handles the database. A user request goes only to A; B never touches it. If A fails, the web service stops — B is not allowed to take over its work, because each processor owns its own task. This arrangement is simple to reason about, but it wastes processor B whenever the database is idle.
Worked example — symmetric multiprocessing (SMP) with four tasks. A machine has four processors, P1–P4, and four tasks arrive: T1 (sort a list), T2 (render an image), T3 (compress a video), T4 (compute statistics). Under SMP, the four tasks are divided among every processor: P1 takes a component of T1, P2 takes T2, P3 takes T3, P4 takes T4 — all four work on their components in parallel. When each finishes its component, the results are sent to the shared memory, and the combined result is the completed set of four tasks. Every processor runs the same OS code and can take any task, so the work balances automatically — if P1 finishes early, it picks up the next waiting task. Each processor in this architecture has its own CPU, its own registers, and its own cache.
Sense-check: asymmetric = "each processor owns its job"; symmetric = "all processors share all jobs". SMP wastes less hardware but needs more coordination — every processor's results must be merged in memory, and the operating system must be written to run on several processors at once.
1.10.4 Multi-core and Multi-chip Designs
Take a chip, and inside that chip you can have multiple processors or cores. A dual-core component has two cores; a quad-core component has four. Each core has its own register and its own cache. Designs can be multi-core and also multi-chip. Companies differ: some processors go up to 128 cores, some have 54, and the common counts are 2, 4, 6, 8, 16 — it depends on the company and the processor you choose. Intel, ARM, and AMD each design their own cores.
Pitfall: cores and chips are not the same unit. A core is a processor inside a single chip; a chip can hold several cores (dual-core = 2, quad-core = 4), and a machine can hold several chips. "Eight cores" does not mean eight separate boxes — it often means one box with one chip that holds eight cores.
Real-world: a modern phone and a modern laptop both run on multi-core chips — a four-core or eight-core part — which is why you can have a browser, a game, and a document editor making progress at the same time.
Multiprocessor systems buy throughput, economy of scale, and reliability; they come in two flavours — asymmetric (each processor owns a task) and symmetric (all processors share all tasks) — and today they are usually multi-core: several processors sharing one chip.
1.11 Cluster Systems
1.11.1 Clusters and the Storage Area Network
A multiprocessor puts several processors in one box. What if you need more — and you would rather buy several boxes than one giant machine? That is the cluster: several whole computers working as one, tied together through shared storage.
A cluster system is another type of system, like multiprocessing: here also multiple tasks are performed, and the work is done using a storage area network (SAN). The storage is shared among the various systems by using the SAN, and many systems are interconnected to each other and to the SAN.
Cluster: a set of interconnected, complete computer systems working together as a single computing resource. Storage area network (SAN): a dedicated, high-speed network whose only job is to give every machine in the cluster access to the same shared storage — so any node can reach any file, and the data does not live inside any single machine.
Why not just one big multiprocessor? A cluster of ordinary machines is often cheaper to buy and to expand than one enormous custom-built computer, and — as the next subsection shows — it keeps working even when a whole machine dies.
1.11.2 Higher Availability and Two Flavours of Clustering
The main advantage of a cluster is higher availability. Even if one system fails, the next system takes the information and does the work, or the work is shared among the rest of the systems. There are two kinds of clustering. In asymmetric clustering, one machine is always in the SAN as standby: if one of the machines present in the cluster fails, that standby machine becomes the backup for it. In symmetric clustering, each and every system runs in parallel and each monitors the others; more than one node runs the applications. All of this is done mainly for parallelization — and to keep the whole set of systems working properly.
Worked example — asymmetric cluster failover. A cluster has four machines: A, B, C work on customer requests; S is the standby, connected to the same SAN and running no applications — it is always "standing by" on the shared storage. At 14:00, machine B fails. The cluster detects B's silence, and S — which already has the SAN's data and B's configuration — becomes the backup: S takes over B's work. Customers notice at most a brief pause; the service continues from the shared storage as if B had never died. The standby is idle while everyone is healthy, which is the price of asymmetric clustering: availability is bought with one machine doing nothing most of the time.
Sense-check: one machine stands by in the SAN; when a working machine fails, the standby becomes the backup — the whole point of the cluster is that a single machine's death is a non-event.
The alternative, symmetric clustering: every machine runs applications and monitors every other. If one node fails, its load simply redistributes among the rest — no idle standby needed, but every node must be able to take over every other's work, which requires more careful coordination.
1.11.3 The Distributed Lock Manager
With many systems sharing storage, there is always the danger that the same operation accesses the same variable at the same time. That conflicting-operation problem is taken care of by the distributed lock manager (DLM): it coordinates locks so that conflicting operations do not collide on shared data.
Distributed lock manager (DLM): the cluster-wide referee for shared data. When two machines must both update the same file or variable, the DLM hands out locks — only the machine holding the lock may touch that data — so two conflicting operations never collide on the shared storage. Without it, machine A could overwrite machine B's update and the cluster would silently corrupt its own data.
Clusters buy high availability: asymmetric clustering keeps a standby in the SAN to take over on failure, symmetric clustering runs every node in parallel while each monitors the others, and the distributed lock manager keeps the shared data coherent.
1.12 Multiprogramming and Time-Sharing Systems
1.12.1 Multiprogramming (Batch) Systems
The disk is fast, the CPU is faster, and your printer is slowest of all. If the CPU waited for the printer on every print job, it would be idle for most of the day. Multiprogramming exists so that never happens.
Multiprogramming is a type of system that organizes jobs so that the CPU always has some program to execute. Always some set of jobs will be in memory to be executed, from which one job is selected for execution. When one job goes for I/O, the next job comes for execution — and the rule to remember: the CPU and the I/O should always be kept busy; they should never go idle. This is the batch type of system. In the memory layout for a multiprogramming system, multiple jobs sit in memory, and each job is taken for execution; which job runs next depends on the queue in which the jobs arrive at that moment.
Multiprogramming (batch): keep several jobs resident in main memory at once; while one job waits for I/O, the CPU switches to another. The operating system's job is scheduling — selecting which resident job runs next, based on the queue in which jobs arrived. The design rule is the same one from the interrupt timeline: the CPU and the I/O devices should always be kept busy; multiprogramming exists to stop either from going idle.
Worked example — the multiprogramming memory layout. Main memory holds three jobs side by side: job 1 (a payroll computation), job 2 (a report print), job 3 (a data sort).
| Time | What happens | CPU | Printer |
|---|---|---|---|
| t = 0 s | Job 1 is selected from the queue; it computes | Busy (job 1) | Idle |
| t = 2 s | Job 1 requests printing → goes to I/O | Switches to job 3 | Busy (printing job 1's report) |
| t = 5 s | Job 3 requests a disk read → goes to I/O; job 1's print finishes | Job 1 is still waiting on other I/O, so job 2 is selected | Idle again, ready for the next job |
| t = 7 s | Job 2 finishes; job 1's I/O completes | Job 1 resumes | Idle |
The CPU never waited for the printer, and the printer never waited for the CPU: whenever one went busy, the other was handed a different job.
Sense-check: multiple jobs sit in memory, one is selected for execution, and when it requests I/O the next job runs — the queue decides who is next.
1.12.2 Time-Sharing (Multitasking) Systems
The next type is the time-sharing system, also called multitasking. Here the CPU switches between jobs after a particular time slot: a response time is given, after which the processes switch to the next job and it starts executing. So multiprogramming switches when a job blocks on I/O, while time-sharing switches on a timer, so that every user's job gets its share of the CPU in turn.
| Dimension | Multiprogramming (batch) | Time-sharing (multitasking) |
|---|---|---|
| When the CPU switches | Only when the running job blocks on I/O | On a timer, after a fixed time slot, even if the job is still computing |
| Goal | Keep CPU and I/O busy | Give every user a fair share and a fast response |
| Who it serves | Many jobs, few users | Many users interactively |
| Response | Slow, non-interactive | Fast enough to feel interactive |
When to pick which: batch multiprogramming suits long, non-interactive workloads; time-sharing suits classrooms, offices, and any place where people type and expect an answer.
Pitfall: the switching trigger is the exam detail. Multiprogramming switches because the running job waits (blocked on I/O); time-sharing switches because the timer fires — even a job that is computing happily is cut off when its time slot ends. Mixing the two triggers is a classic mistake.
Multiprogramming keeps the CPU busy by overlapping I/O waits with other jobs' computing; time-sharing adds a timer so every user's job gets a regular share of the CPU — that regular sharing is what makes a machine feel like it belongs to many people at once.
1.13 Dual-Mode Operation: User Mode and Kernel Mode
1.13.1 User Mode and Kernel Mode
What stops a buggy program from wiping out the operating system? Nothing in software — the answer is a single bit of hardware. Dual-mode operation is the mechanism that helps the operating system protect itself and the other components of the system.
Dual-mode operation is very important: it is the mechanism that helps the operating system protect itself and the other components of the system. There are two modes. In user mode, the user has certain privileges and can run only those programs, processes, or jobs that those privileges allow. In kernel mode, the user does not have those privileges; the kernel has the privilege to operate in both the user mode and the kernel mode. Not everyone can execute privileged instructions — those run only in kernel mode. The mode is distinguished with the help of a bit provided by the hardware, the mode bit.
User mode: the mode of normal application execution, where only non-privileged instructions may run. Kernel mode (also called supervisor, system, or privileged mode): the mode of operating-system execution, where privileged instructions — I/O control, timer management, interrupt management, switching to kernel mode itself — are allowed. Mode bit: the hardware bit (added to the machine) that records which mode the CPU is in; the hardware refuses privileged instructions in user mode and traps them to the operating system instead.
1.13.2 The Mode Bit and a Notation Confusion
Q: Which bit value marks user mode — zero or one?
A: The convention was stated both ways in the session, which is exactly the kind of thing to watch out for. The first phrasing said bit 0 means user mode and bit 1 means kernel mode; the later walkthrough of a system call said the trap sets the mode bit to zero while the kernel executes the system call and sets it back to one when returning to the user process. The reading that fits the trap walkthrough is mode bit 0 = kernel mode, mode bit 1 = user mode — and this is also the consistent, standard treatment: the standard reference states it exactly this way, kernel (0) or user (1). The conflicting earlier phrasing is simply an inconsistency in the session; hold onto the trap-consistent version, because it matches how the machine actually behaves.
1.13.3 System Calls as the Gateway to Kernel Mode
When a system call occurs, the system switches from user mode to kernel mode. System calls include read — if you have to read information — and write — if you have to write information — plus opening a file and closing a file. If you are executing in user mode and make one of these calls, the system switches to kernel mode; only after going to kernel mode does the system call work. Once the read or write completes, the system returns from kernel mode to user mode and the user process continues.
Q: Is kernel mode a separate program that takes over my process?
A: No — the kernel mode itself is a part of the user process only; it is not visible from outside. It simply means that during the system call, certain privileges are available that cannot be used in user mode. The process does not hand over to a different program; it executes the system call portion with kernel privileges and then returns to user mode.
The transition works like this: the user process is executing; when a system call comes, a trap occurs; the mode bit is set to zero and the system call is executed; after the system call completes, the mode bit is set to one and control returns to the user process.
The trap walkthrough, step by step: (1) a user program executing in user mode needs to read a file; (2) it executes the read system call, which takes the form of a trap — a software interrupt to a specific location in the interrupt vector; (3) the hardware switches the mode bit to 0 (kernel mode) and control passes through the vector to the operating system's service routine; (4) the kernel executes the read with full privileges — on the hardware it owns; (5) the mode bit is set back to 1 (user mode) and control returns to the user process, which continues from the instruction after the system call. The kernel gains control at every interrupt or trap, and the mode bit is the switch.
1.13.4 The Timer and Infinite Loops
Along with the mode bit there is a counter, or timer, which is set before execution. The counter gets decremented, and when the counter becomes zero, an interrupt is generated; the interrupt is handled, and the process continues from user mode. The point of the timer: it must not be allowed to run into the infinite — the system has to take care of that. Because the timer fires an interrupt at zero, no single process can hold the CPU forever in an infinite loop; it gets cut off when the timer expires. This is how a software interrupt from an infinite loop gets caught.
Pitfall: an infinite loop is invisible to the mode bit. A user program in an infinite loop never traps and never asks for anything — the mode bit stays in user mode and nothing interrupts it. The timer is the safety net: it is set by the operating system before the process runs, counts down while the process executes, and fires an interrupt at zero — yanking control back to the kernel. Without the timer, one buggy loop would freeze the machine permanently.
A concrete scale: a 10-bit counter with a 1-millisecond clock allows interrupt intervals from 1 millisecond up to 1024 milliseconds (), in steps of 1 millisecond. A program with a 7-minute time limit has its counter set to 420 seconds' worth of ticks — and when the count reaches zero, the timer interrupts and the operating system regains control. The instructions that modify the timer are privileged, so a user program cannot quietly disarm its own safety net.
Dual-mode operation protects the system with three pieces: the mode bit separates user mode from kernel mode; the system call is the only gateway between them; and the timer guarantees the operating system always gets control back — even from an infinite loop.
1.14 Process Management
1.14.1 Process vs. Program: Passive and Active
A process is any program in execution; you can also call it the unit of work performed by the program.
Q: Is a program the same thing as a process?
A: No. A program is a passive entity — the file sitting there. A process is the active entity: the program when it is in execution. The same program can have a process whenever it runs.
Program: the passive entity — a file of instructions sitting on the disk. Process: the active entity — the program in execution, the unit of work the program performs. The same program can spawn a process every time it runs: run Word three times and you have three processes from one program.
The session used an arithmetic program as the example: even a small program may have functions — one that makes a sum, one that makes a difference, one that does multiplication, one that does division — and each function can be imagined as a separate module, a separate process, each of which may be in execution at a given moment.
Worked example — the arithmetic program. A tiny program offers four operations. It is written as four functions, and each function is treated as its own process while it runs:
- Process P_add executes the sum function: input and , output .
- Process P_sub executes the difference function: input and , output .
- Process P_mul executes the multiplication function: input and , output .
- Process P_div executes the division function: input and , output .
The four processes may be in execution at the same moment — on a multiprocessor they literally run together; on a single CPU they take turns. What matters for the definition: the program is the four functions sitting on the disk; the processes are the four active executions, each with its own inputs, outputs, and execution state.
Sense-check: one passive file, four active executions — the sum process finished at 8 while the multiplication process was still computing 42.
1.14.2 Resources a Process Needs, and the Program Counter
If a process has to work, to accomplish its task, it needs resources: a CPU, memory, the I/O, a file, and, apart from that, some other data. All of this information is required to complete the particular task. When the process completes its execution, it returns whatever memory, I/O, or CPU it utilized. There will always be a program counter (PC) for a single-threaded process: the PC holds the address of the next instruction to be executed — the same program counter you met in computer organization. If the process is multi-threaded — many threads per process — then each thread will have its own program counter.
Program counter (PC): the register holding the address of the next instruction the process will execute — the process's bookmark in its own code. A single-threaded process has one PC; a multi-threaded process has one PC per thread, because each thread is executing its own sequence of instructions.
1.14.3 Many Processes, Many Threads in a Running System
Any real system runs multiple processes concurrently. Real-world: with VMware you can put another operating system on top of a Microsoft operating system, and there a separate operating system runs as a program — so you can have one or more CPUs running in parallel, executing many processes or threads concurrently. On a desktop, you may have a Word file open, a browser open, a gaming application open, and some other software — all running in parallel; a single user can execute many programs at a time. Inside one process, threads multiply: in Word, at the same time you may be typing and the spelling checker may be checking — many threads work on your behalf within that one application.
Worked example — Word and the desktop. One user sits at one desktop with Word, a browser, and a game open: three application programs, so three processes running in parallel — the word processor, the browser, and the game each get CPU time. Inside Word itself, the typing and the spelling checker run as threads of that one process: while you type (thread 1), the spelling checker is already checking the words you wrote (thread 2). Two levels of parallelism are at work: processes for whole applications, threads for the parallel jobs inside one application.
Sense-check: a browser and a game are separate processes competing for the CPU; typing and spell-checking are threads cooperating inside one process — they share Word's memory and files, which is exactly why threads are cheaper than processes to run.
1.14.4 What the Operating System Does: Create, Delete, Suspend, Resume
With all these activities, the operating system is responsible for process management: creating and deleting both user and system processes; suspending a process; resuming a process; and providing mechanisms for synchronization, communication, and deadlock handling.
Exam note: process scheduling, synchronization, and deadlock were explicitly flagged by the professor as very important topics for the mid-semester. This section is only the first pass — the course returns to each of them in depth, and the definitions met here (process, thread, deadlock) are the vocabulary those later sections build on.
1.14.5 Deadlock: When Processes Wait on Each Other
What is a deadlock? When too many processes try to access the same resource, and no process can use the resource effectively, there comes the deadlock: each process may be waiting for the other.
Worked example — P3 holds the resource, P1 and P2 wait. Three processes compete for one shared resource, say the printer:
- P3 acquires the printer and starts its job.
- P1 requests the printer — it is taken, so P1 waits.
- P2 requests the printer — also taken, so P2 waits behind P1.
- P3 completes its work and releases the resource.
- P1 takes the printer, finishes, and releases it; then P2 runs.
The resource stays idle for no one in this story — the waits are honest, and the queue clears in order. The deadlock danger appears only when the wait stops being honest: if P3 could not finish without something P1 holds (and P1 cannot finish without the resource P3 holds), then every process waits forever, and the resource sits idle while they wait on each other.
Sense-check: when the wait is real — P1 and P2 cannot proceed and P3 cannot finish without something they hold — the resource sits idle and the processes wait on each other: that is the deadlock.
Pitfall: waiting is not deadlock. P1 and P2 waiting for P3 to release the printer is normal, healthy queueing. Deadlock requires the circular wait: each process holds a resource the other needs, so nobody can finish and the resource stays idle. The exam point is to distinguish "waiting" from "waiting forever in a circle".
How to handle a deadlock: some mechanisms exist, and the course covers prevention, avoidance, and detection and recovery — all done by the operating system.
1.15 Memory Management
1.15.1 Bringing Programs into Memory
A program on disk cannot run one instruction until it is inside memory — the CPU only executes what it can reach. Memory management is the answer to: who gets in, how much room, and what happens when the room runs out?
Whatever instructions a program has must be executed from memory, so the program first has to be brought into the memory. The program may be sitting somewhere on the disk; the operating system has to get it from there into main memory before any of its instructions run.
Memory management: the operating system's set of duties for deciding what lives in main memory. The job is a cycle: a program is fetched from secondary storage into main memory; while it runs, the OS tracks its parts and protects them from other processes; when it finishes (or when memory pressure grows), the OS moves it back out. Without this, the first program loaded would own the machine until it ended.
1.15.2 Tracking, Allocating, Deallocating
Memory management is a set of tracking duties. The operating system keeps track of which parts of the program are there in the memory, which parts have been used, and who is going to use them. If a part is not necessary, the operating system decides whether it should be moved into the secondary storage. If memory is allocated to a particular process but the process is not using it at all, the operating system has to deallocate the memory. All of this — allocation, tracking, swapping out, deallocation — is handled by the operating system.
Scope: memory is finite and volatile, which sets the limits of the whole job. The OS cannot place every program in memory at once — so it swaps parts out to secondary storage. And because main memory vanishes on power-off, anything that must survive a restart lives on disk, not in RAM. The tracking duties exist precisely because memory is too small for everything and too fast to waste.
Memory management is bookkeeping with consequences: track which parts of each program are in memory, allocate memory to processes that need it, swap out parts that are not necessary, and deallocate memory a process is no longer using — allocation, tracking, swapping, deallocation, all by the operating system.
1.16 Storage Management and the I/O Subsystem
1.16.1 Files as the Logical Storage Unit
The disk stores billions of bytes, but you never ask for "byte 4,000,000,217". You ask for "my report". The file is the trick that makes that work — the logical unit the operating system manages on your behalf.
Storage management works in terms of a logical storage unit called a file — everything should be organized as a file. A file is a collection of information. The operating system's file activities: create and delete files, manipulate files, map the files to the secondary storage device, and bring files back from secondary storage into the main memory.
File: the logical storage unit — a collection of information the user thinks of as one thing. Logical here means "as the user sees it": the physical disk has no files, only tracks and sectors; the operating system creates the file picture by mapping each file's contents onto physical storage, and hides that mapping so the user only ever deals with names and contents.
The professor's rule — everything should be organized as a file — is more than habit: devices, program data, and documents are all exposed through the same file interface, which is why one set of file operations (create, delete, manipulate, map to storage, bring back to memory) covers the whole machine.
1.16.2 Mass Storage Management
Main memory cannot hold all the information, so information that is not necessary at that point of time is taken into the secondary storage device. The operating system's mass-storage activities are free space management, storage allocation, and scheduling. Some storage need not be very fast, but it still has to be managed by the operating system or by the application that uses it.
Mass storage management: the three housekeeping duties for secondary storage. Free space management — knowing which blocks of the disk are empty and which are occupied. Storage allocation — deciding where each new file's blocks go. Scheduling — ordering the pending disk requests so the disk head moves efficiently. Even slow storage (optical discs, tapes) gets the same management; speed is a property of the device, not an excuse to skip the bookkeeping.
1.16.3 The I/O Subsystem: Buffering, Caching, Spooling
The I/O subsystem is responsible for buffering, caching, and spooling — the three techniques that smooth out the speed difference between the CPU and the slow devices around it.
Buffering: temporarily holding data in main memory while it travels between devices — the memory acts as a waiting room that lets a fast device hand off data to a slow one without either stalling. Caching: keeping recently used data in faster storage so repeated access is quick (the caching of the storage hierarchy). Spooling: a buffer that stores output for a slow device as a queue — print spooling collects whole jobs and feeds them to the printer one at a time, so the CPU never waits for the printer and two users' jobs do not collide.
The three techniques share one purpose: they absorb the mismatch between the machine's fast inside and slow outside. The CPU writes at memory speed, the printer takes seconds per page — buffering, caching, and spooling build bridges of waiting data between the two speeds.
Storage management is organized around the file, the logical storage unit; mass storage gets free-space management, allocation, and scheduling; and the I/O subsystem's buffering, caching, and spooling smooth the speed gap between CPU and devices.
1.17 Protection and Security
1.17.1 Why Protection Matters
A shared machine is a shared risk: the same resource that serves ten users can be attacked by one of them, or by an outsider. Protection and security are the operating system's answer — the difference between an open door and a guarded one.
Protection and security are very important. A resource cannot be used by all the users at all the times; it should be protected, and high security should be there against external or internal attacks. The attacks can be any type: a denial-of-service attack, a virus, or any type of theft — the operating system should be secured against them.
Pitfall: protection is not only about hostile outsiders. A resource cannot be used by all the users all the time — protection enforces the rules of sharing (who may use what, when), and security defends against attacks (external or internal): a denial-of-service attack floods a service so legitimate users cannot reach it; a virus spreads through the system; theft steals data or resources. The operating system must be secured against all of them, from inside and outside.
1.17.2 User IDs, Group IDs, and Access Control
Security starts with identity: we should know who all the users are going to use our system, and the identity of the user is very important. Each user ID is associated with a particular file or a process, and it is associated with a group as well: if there is a group ID, the group has these many users. Each group is given a particular privilege, so the group can use certain processes or certain information or files. This kind of access control should be provided — and that rounds out the introduction. The next sessions go into detail on processes and threads.
User ID (UID): the identity attached to each user; every file and every process carries the UID of its owner, which is how the system knows who a request comes from. Group ID (GID): an identity shared by several users — a group has this many members, and each group is given a privilege, so the whole group can use certain processes, information, or files without granting each member individually. Access control: the rules that decide, for each resource, which users and groups may use it.
Real-world: this is the scheme behind everyday permissions. The file you saved this morning is owned by your UID; your colleagues' group has read access to it; everyone else sees nothing. The operating system checks the requester's identity against the file's access rules on every open — protection enforced at the point of use, which is why the identity must be established before anything else.
Protection and security rest on identity: every user has a user ID, users are gathered into groups with group IDs, and each group is given privileges — access control built on that identity is what keeps a shared resource usable by the right people and safe from attacks.
Exam Guidance Summary
The mark split, once more: first component 25% (quiz one, quiz two, lab — quiz one can also be conducted as an assignment), mid-semester 35%, comprehensive exam 40%. Everything is conducted online; lab components become simulator assignments with snapshots submitted by the announced date and time.
- Mid-semester: closed-book, two-hour test, covering the topics taught in contact sessions 1 to 8; fixed date announced (March 16). Comprehensive exam: open-book, two-and-a-half-hour test, covering all the topics present in the handout; fixed date announced (Saturday, May 18).
- Assignment: exercises in the CPU-OS simulator, done individually or in groups of at most four members; submit after the mid-semester; a demo is given before the mid-semester.
- Quiz one is conducted before the mid-semester. Any change in dates or times is announced on the portal in advance.
The two things to prepare early: the closed-book mid-semester tests the first eight contact sessions, so the definitions of this introduction are directly examinable; and the simulator assignment needs snapshots of the output, so practice on the simulator before the mid-semester, not after.
- Importance signals to take into the exam: process scheduling, process synchronization, and deadlock were explicitly flagged as very important topics. Expect the course to return to them in depth.
- Definitions worth having ready: the operating system as a bridge between user and hardware; the four components (hardware, operating system, application programs, users); the resource allocator and control program definitions; the bootstrap program and the kernel; user mode vs. kernel mode and the mode bit; process vs. program; volatile vs. non-volatile memory; the storage hierarchy with the speed and capacity arrows.
- Study advice: download the e-book of Operating System Concepts (Silberschatz) and go through it; go through the recorded sessions on the portal before the contact session; ask doubts as they come — the first session or two are introductory and carry few doubts; and if the pace feels too fast, say so, because there are eight contact sessions to cover the mid-semester portion.
Key Industry Applications
- Real-world: Microsoft dominates today's systems with roughly 64% of usage; Unix or Linux comes next, then the Mac; Android and iOS rule mobile; Solaris belongs to Sun Microsystems. The market split matters because each platform's operating system makes its own design choices — and the course points them out as they come up.
- Real-world: GM-OS was the first operating system, developed by General Motors for IBM machines; Unix, written in C, was developed by Ken Thompson and Dennis Ritchie. The lineage runs unbroken from those two machines to today's systems.
- Real-world: the browser's remote-fetch path — your query travels through the operating system and hardware to a distant server and comes back to your screen. Every search you run exercises the OS's networking and I/O paths.
- Real-world: handheld devices (mobiles, iPads) are optimized for usability and battery life rather than resource utilization; sensors and CCTV sit idle until an event triggers them. The same OS must serve both a phone you hold and a sensor that wakes once a week.
- Real-world: solid-state drives are standard in today's systems — the operating system itself boots from the SSD — but SSDs are expensive, so hard disks, optical discs (CD, DVD, Blu-ray), and magnetic tapes still fill the cheaper tiers of the hierarchy.
- Real-world: multi-core processors from Intel, ARM, and AMD ship in counts like 2, 4, 6, 8, 16, up to 54 or 128 cores; each core has its own registers and cache. That is why your laptop can run a browser, a game, and an editor at once.
- Real-world: VMware runs one operating system on top of another, a practical example of processes and threads executing concurrently — the guest OS itself is just a program from the host OS's point of view.
- Real-world: clusters with a storage area network (SAN) and a distributed lock manager give high availability, with standby machines taking over when a node fails — the architecture behind search engines, banks, and any service that cannot afford downtime.
OS Lecture 1 notes · Introduction to Operating Systems
Sections Breakdown
The course opens with the module roadmap, the 25/35/40 assessment split, the textbooks, the flipped-class format, and a doubt-check that finds none.
The operating system is a program that bridges user and hardware; a computer system has four components (hardware, OS, applications, users); the OS pursues usability and resource utilization, adapting across desktops, workstations, handhelds, and embedded systems.
The OS has two classic definitions — resource allocator (rationing scarce resources among processes) and control program (supervising execution of programs like compilers) — plus the bootstrap program that starts the machine and the kernel that stays resident.
Each device is managed by its own controller (disk, USB, graphics), and all controllers share information through a common bus; CPU and devices execute concurrently, competing for memory cycles.
Interrupts (hardware and software, including traps and exceptions) tell the CPU an event happened; the interrupt vector holds service-routine addresses; the interrupt timeline shows CPU and I/O alternating so neither stays idle.
System calls are the user program's request channel to the operating system for I/O or CPU execution; the device status table records every device's type, address, and state (running, ready, terminated).
Storage units are bits, bytes (8 bits), and architecture-dependent words; the device hierarchy runs registers → cache → main memory → SSD → hard disk → optical → tape, with capacity growing downward and speed growing upward.
Caching keeps soon-needed data in faster storage; main memory is a cache for secondary storage; data migrates disk → main memory → cache → register; the compiler manages registers, hardware manages the cache, the OS manages memory and storage.
von Neumann uses one shared bus (and one memory) for instructions and data, creating a bottleneck; Harvard uses separate buses for instructions and data, increasing speed.
A multiprocessor is a single system with multiple processors (multiprocessing is the activity of doing many tasks); built for throughput, economy of scale, and reliability (graceful degradation, fault tolerance); asymmetric assigns tasks, symmetric shares all tasks; designs are multi-core/multi-chip.
Clusters tie multiple systems together through a storage area network (SAN) for higher availability; asymmetric clustering keeps a standby machine, symmetric clustering runs all nodes in parallel with mutual monitoring; the distributed lock manager prevents conflicting operations on shared data.
Multiprogramming keeps several jobs in memory and switches when a job blocks on I/O so CPU and I/O stay busy; time-sharing (multitasking) switches on a timer so every user's job gets a fair CPU share.
The mode bit distinguishes user mode (limited privileges) from kernel mode (privileged instructions allowed); system calls are the gateway via a trap; the timer interrupts at zero so no process can loop forever.
A process is the active entity (program in execution); processes need CPU, memory, I/O, files; the PC holds the next instruction address; the OS creates, deletes, suspends, resumes processes; deadlock is circular waiting on shared resources.
Programs must be brought from disk into main memory before execution; the operating system tracks which parts are in memory, allocates memory, swaps unneeded parts to secondary storage, and deallocates memory no longer used.
Files are the logical storage unit; mass storage duties are free space management, storage allocation, and scheduling; the I/O subsystem uses buffering, caching, and spooling to smooth the CPU-device speed difference.
A resource cannot be used by all users at all times; protection enforces sharing rules while security defends against denial-of-service, viruses, and theft; identity via user IDs and group IDs powers access control.
Exam Revision Notes
Below is the distilled, exam-ready core. Every entry comes from the full explanation above. Use this section for rapid review; return to the main notes when a point needs more context.
Course Structure: Modules, Assessment, and Resources
Must-know: Assessment split 25% (quiz one, quiz two, lab) + 35% (closed-book mid-semester, two hours, contact sessions 1-8) + 40% (open-book comprehensive, two and a half hours, all handout topics).
⚠️ Top pitfall: Treating the mid-semester syllabus as the whole course: it covers only contact sessions 1 to 8.
Self-check: Which assessment component is open-book and how much is it worth?
What Is an Operating System?
Must-know: An operating system is a program that acts as a bridge between the user and the hardware; the four components of a computer system are hardware, the operating system, application programs, and users.
⚠️ Top pitfall: Calling Windows or Unix the first operating system — GM-OS (General Motors, mid-1950s, IBM 701) was first.
Self-check: What are the four components of a computer system and what does the operating system do with them?
Connects to: 1.3
The Operating System as Resource Allocator and Control Program
Must-know: Resource allocator: the OS rations scarce resources (processor, memory, devices). Control program: the OS supervises the execution of programs. The bootstrap program (ROM/EPROM firmware) starts the system; the kernel is the always-resident core.
⚠️ Top pitfall: Confusing the bootstrap program (first to run, stored in firmware) with the kernel (always resident, core of the OS).
Self-check: Which program runs first when the machine is switched on, and where is it stored?
Connects to: 1.2
Computer System Operation: Controllers and the Bus
Must-know: Every device type has a dedicated controller; all controllers plus the CPU share a common bus to reach memory, so concurrent devices compete for memory cycles.
⚠️ Top pitfall: Thinking the CPU drives devices directly — it delegates to controllers and only talks to them over the bus.
Self-check: What hardware piece manages the disk, and what do all controllers share to reach memory?
Connects to: 1.5
Interrupts: How the OS Finds Out What Happened
Must-know: The OS is interrupt driven: hardware interrupts come from devices, software interrupts (traps) from exceptions or user requests; the interrupt vector maps device numbers to service-routine addresses; as soon as I/O starts, control returns to the user program without waiting.
⚠️ Top pitfall: Confusing exception (the error), trap (the software interrupt it triggers), and hardware interrupt (external device signal).
Self-check: In the interrupt timeline, what happens to the CPU line the moment a process starts an I/O transfer?
Connects to: 1.6, 1.13
System Calls and the Device Status Table
Must-know: A system call is the standard way a user program requests I/O or CPU execution from the operating system; the device status table holds one entry per device with type, address, and state.
⚠️ Top pitfall: Thinking the device status table performs the work — it only records device states; the OS updates it as situations change.
Self-check: What three fields does the device status table record for each device?
Connects to: 1.5, 1.13
Storage Structure: Units and the Device Hierarchy
Must-know: Down arrow = capacity grows downward; top arrow = retrieval speed grows upward. Main memory is volatile (vanishes on power-off); secondary storage is non-volatile.
⚠️ Top pitfall: Confusing the two hierarchy arrows: bigger capacity is DOWN the hierarchy, faster retrieval is UP.
Self-check: Is the hard disk above or below main memory in the hierarchy, and which arrow explains why?
Connects to: 1.8
Caching and Data Migration
Must-know: Faster storage holds less information; data migrates up the hierarchy disk → main memory → cache → register (small data only for registers), and unused data moves back down.
⚠️ Top pitfall: Thinking data jumps straight from disk to the CPU — it must pass through main memory and the cache, and only small data reaches registers.
Self-check: Who manages the cache, and who manages main memory?
Connects to: 1.7
Memory Access: von Neumann and Harvard Architectures
Must-know: von Neumann: common bus for instructions and data → single-bus bottleneck. Harvard: separate buses for data and instructions → higher speed.
⚠️ Top pitfall: Claiming Harvard uses two memories — the essential point is two separate buses/paths; whether the memories are physically separate is a design detail.
Self-check: Why does the Harvard architecture move information faster than von Neumann?
Connects to: 1.4
Multiprocessor Systems
Must-know: Multiprocessing = doing more than one task; multiprocessor = multiple processors in one system (parallel / tightly coupled). SMP: every processor runs all tasks; asymmetric: each processor has its own task. Graceful degradation + fault tolerance follow from reliability.
⚠️ Top pitfall: Using multiprocessing and multiprocessor as synonyms — one is the activity, the other the hardware.
Self-check: In symmetric multiprocessing with four tasks on four processors, what happens to the results?
Connects to: 1.11
Cluster Systems
Must-know: A cluster shares storage through a SAN; higher availability is its main advantage; asymmetric clustering: one machine stands by and becomes the backup on failure; symmetric clustering: all nodes run in parallel and monitor each other; the DLM coordinates locks on shared data.
⚠️ Top pitfall: Confusing cluster (many machines, shared storage) with multiprocessor (many processors, one machine) — clusters tolerate whole-machine failures, multiprocessors tolerate processor failures.
Self-check: In asymmetric clustering, what happens when a working machine in the cluster fails?
Connects to: 1.10
Multiprogramming and Time-Sharing Systems
Must-know: Multiprogramming switches the CPU when a job blocks on I/O (goal: never let CPU or I/O idle); time-sharing switches on a timer after a time slot (goal: fair share and fast response for every user).
⚠️ Top pitfall: Confusing the switching triggers: I/O block for multiprogramming versus timer for time-sharing.
Self-check: What event causes the CPU to switch jobs in a multiprogramming system?
Connects to: 1.13, 1.14
Dual-Mode Operation: User Mode and Kernel Mode
Must-know: Mode bit 0 = kernel mode, mode bit 1 = user mode (consistent with the trap walkthrough and the standard treatment); a system call traps to the kernel, which executes it with kernel privileges, then the mode bit returns to 1; the timer fires an interrupt at zero so no process can hold the CPU in an infinite loop.
⚠️ Top pitfall: Inverting the mode bit convention, or thinking kernel mode is a separate program that takes over the user process — it is part of the same process, run with kernel privileges.
Self-check: What happens to the mode bit when a user program executes a system call, and why is the timer needed?
Connects to: 1.5, 1.6
Process Management
Must-know: Program = passive entity (file); process = active entity (program in execution). A single-threaded process has one PC; each thread has its own PC. Deadlock: each process waits on another that holds a needed resource, so the resource sits idle. Process scheduling, synchronization, and deadlock are very important for the mid-semester.
⚠️ Top pitfall: Confusing waiting (normal) with deadlock (circular waiting where nobody can finish).
Self-check: In the deadlock example, why do P1 and P2 wait for P3's resource, and when does the wait become a deadlock?
Connects to: 1.12, 1.13
Memory Management
Must-know: Instructions must be in main memory to execute; the OS manages memory by tracking used parts, allocating, swapping out unneeded parts to secondary storage, and deallocating unused memory.
⚠️ Top pitfall: Thinking programs execute from disk — they must first be brought into main memory; execution happens only there.
Self-check: What four duties does the operating system carry out for memory management?
Connects to: 1.7, 1.8
Storage Management and the I/O Subsystem
Must-know: Everything is organized as a file (the logical storage unit); mass-storage duties are free space management, storage allocation, and scheduling; buffering, caching, and spooling smooth the speed difference between CPU and devices.
⚠️ Top pitfall: Thinking files are physical things on the disk — they are a logical view; the OS maps files onto physical storage.
Self-check: What are the three techniques of the I/O subsystem and what problem do they solve?
Connects to: 1.15
Protection and Security
Must-know: Protection = rules of resource sharing; security = defense against attacks (denial-of-service, viruses, theft). Each user has a user ID; users belong to groups with group IDs; each group gets privileges, giving access control over processes, information, and files.
⚠️ Top pitfall: Treating protection as only an anti-outsider measure — it also enforces sharing rules among legitimate internal users.
Self-check: What are the user ID and group ID used for in access control?
Connects to: 1.13, 1.16
Exam Guidance Summary
Must-know: Split 25/35/40; mid-semester closed-book covering contact sessions 1 to 8; comprehensive open-book covering all handout topics; scheduling, synchronization, and deadlock flagged as very important.
⚠️ Top pitfall: Underestimating the mid-semester syllabus boundary — only contact sessions 1 to 8 are examinable.
Self-check: Which exam covers all handout topics, and in how many hours?
Connects to: 1.1, 1.14
Key Industry Applications
Must-know: The lecture's concepts map to real systems: GM-OS (first OS), Windows/Unix/Linux/macOS/Android/iOS/Solaris market, SSDs and the storage hierarchy, multi-core processors, VMware virtualization, and SAN clusters with a DLM for high availability.
Self-check: Which architecture keeps services running when a cluster node fails?
Connects to: 1.2, 1.10, 1.11
Was this lecture useful?
BitsNotes AI Assistant
Subject Notes AssistantConfigure AI Chat
Choose how to access the chatbotSigned in as
Powered by BitsNotes — 20 messages per day. No API key needed. Want unlimited access? Use "Bring Your Own Key" mode.
Sign in to use AI Chat
Get 20 free AI messages per day to ask questions about your lecture notes. Sign in with Google or GitHub — it takes 5 seconds.
Sign In to BitsNotesSwitch to "Bring Your Own Key" tab above for unlimited access with any OpenAI-compatible provider.