1. Home
  2. Explore
  3. Computer Science
  4. Operating Systems Fundamentals

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Operating Systems Fundamentals

Speaker 1Speaker 2

Operating Systems Fundamentals

8:59
0:00-8:59
  1. Hope

    Welcome to our introduction to operating systems. This first lecture is building a foundation for the weeks ahead: we’ll look at where an operating system fits in a computer, what essential jobs it does, and why those jobs matter.

  2. Simon

    Let’s begin at the bottom of the computer system. The lowest level consists of enormous numbers of transistors, typically CMOS transistors. Combined into logical gates—such as AND, OR, and XOR—and elements like memory cells, flip-flops, and registers, they form the basic building blocks of computing.

  3. Hope

    Those building blocks are organized into larger units, including memory, RAM, decode units, and instruction-fetch units. Together, those organized components make up the physical hardware: the parts of the computer we can buy. Applications, such as office software or a web browser, run above that hardware, with the operating system sitting in between.

  4. Simon

    That position hints at the OS’s two broad responsibilities: it provides hardware abstraction, and it manages system resources. Abstraction makes hardware easier for software to use. Resource management matters because the computer has limited hardware that many applications may need to share.

  5. Hope

    To see why abstraction is useful, let’s follow a simple C program that prints “Hello World.” The string is stored somewhere in main memory, or RAM, and a pointer such as str refers to it. The program calls printf, but that raises a question: how does text in RAM actually become text on the monitor?

  6. Simon

    At the hardware level, processor instructions read the string byte by byte from main memory into registers and copy it to a video buffer. The buffer also needs information about how to display the text, such as its color and its x- and y-coordinates on the monitor, along with other display-specific attributes like depth.

  7. Hope

    Then the graphics card reads the video buffer and displays the result on the monitor. So even this tiny output operation involves the processor, memory, registers, a video buffer, a graphics card, and the display. It’s a lot of detail for a program whose goal is simply to print a message.

  8. Simon

    And if each program had to handle all of that itself, every programmer would need to know exactly where data lives in memory, how to set display attributes, and how to communicate with the graphics card. Those details would also depend on the hardware. Change the processor, graphics card, or monitor, and the program might need changes to keep working.

  9. Hope

    The operating system hides that complexity from the application. A simple call such as printf can lead to a system call that asks the OS to perform the operation. The OS handles the hardware-specific work—such as setting display information and arranging communication with the hardware—while the programmer works at a much simpler level.

  10. Simon

    That abstraction has a few important benefits. One is that writing programs becomes easier because programmers don’t have to manage every hardware detail. Another is reusable functionality: applications can use services provided by the OS rather than each implementing their own way to interact with the hardware.

  11. Hope

    For example, multiple applications can use printf, while the operating system provides the functionality that communicates with the hardware. The lecture describes this as a single OS module handling printf requests from applications. The applications reuse that service instead of each duplicating all the underlying work.

  12. Simon

    Abstraction also supports portability. A program that uses a familiar interface such as printf doesn’t have to be rewritten just because it runs on a desktop rather than a server or laptop. If it’s compiled appropriately for the target, it may also run on an embedded device; the underlying OS adapts the operation to the hardware.

  13. Hope

    Now let’s turn to the OS’s second broad role: resource management. A computer may run a browser, compile and run programs, and use applications like Skype or PowerPoint at nearly the same time. But those applications are sharing a limited set of physical resources.

  14. Simon

    The operating system manages components such as the CPU, memory, network hardware, secondary storage like hard disks, and monitors. The amounts are limited: a computer might have only a few CPUs, a fixed amount of RAM, and one network card or one or two hard disks. The OS coordinates their use among applications.

  15. Hope

    Consider the CPU. If several applications need it, the operating system is responsible for scheduling which application runs. One simple approach, described in the lecture as typical of some earlier systems in the late 1970s and early 1980s, was to let one application run until it finished and then start the next.

  16. Simon

    That sequential approach is straightforward to implement, but it isn’t the most efficient way to use the processor. The lecture flags this as a starting point: later material will examine its problems and how modern operating systems use the processor more efficiently.

  17. Hope

    Memory is another resource that needs careful sharing. Each application needs to be present in RAM in order to execute, but RAM is limited. So the operating system has to manage how that limited memory is shared among the applications running on the computer.

  18. Simon

    Sharing alone isn’t enough; applications also need to be isolated from one another. The goal is for each application to run in a sandboxed environment, without being able to inspect what other applications are doing. That protects applications and the information they handle.

  19. Hope

    The banking example makes the risk clear. Imagine a browser being used to enter passwords and credit-card details, while another application is a malicious game containing a virus. Without isolation, that second application might be able to find out what the browser is doing and steal sensitive information.

  20. Simon

    So the OS has to do two things at once: share constrained resources so multiple applications can run, and protect those applications from one another. The lecture emphasizes that achieving this kind of safe sharing is not a trivial task.

  21. Hope

    Operating systems are found in many kinds of devices, and their designs reflect the applications they’re intended to support. One example is an embedded OS such as Contiki, designed for memory-constrained environments like wireless sensor nodes used in the Internet of Things.

  22. Simon

    For embedded systems, power consumption is also a design concern. The OS manages resources and abstracts the hardware in a way intended to keep the system’s power use low. Mobile operating systems, such as Android, iOS, Ubuntu Touch, and Windows Touch, also aim to conserve power so a phone’s battery lasts as long as possible.

  23. Hope

    Mobile systems have an additional focus: user interaction. Unlike the embedded systems described here, mobile operating systems have to support devices and interfaces such as LCD screens and keypads. So mobile and embedded OSs share concerns like power efficiency, but their needs aren’t identical.

  24. Simon

    Another category is the real-time operating system, or RTOS. Examples include QNX, VxWorks, and RT Linux. These systems are used for machine-critical applications where a delay in an operation could have catastrophic consequences, such as in rockets, automobiles, or nuclear plants.

  25. Hope

    For those applications, it’s not enough that an operation eventually completes. An RTOS is designed so that every critical operation is guaranteed to finish within its specified time. Meeting that timing requirement is central to the system’s purpose.

  26. Simon

    There are also operating systems intended for secure environments, including SeLinux and SeL4. They’re used where security is especially critical—for example, in environments such as web servers hosting banking software. Other familiar categories include server operating systems, such as Red Hat, Ubuntu, and Windows Server, and desktop systems, such as macOS, Windows, and Ubuntu.

  27. Hope

    Server and desktop operating systems can share many features, while still differing in how they manage the applications running on them. The broader lesson is that there isn’t just one OS design: different operating systems are shaped by the kinds of devices and applications they need to serve.

  28. Simon

    For this course, we’ll study xv6, an operating system designed by MIT specifically for teaching. It’s small, well documented, and relatively easy to understand. It’s also designed to resemble UNIX version 6.

  29. Hope

    That resemblance makes xv6 a useful learning tool: understanding how it works gives us insight into how UNIX-like systems, including Linux, work. We’ve now established the foundation for the course: where the OS sits, how it abstracts hardware, how it shares resources while supporting isolation, and why different systems are designed for different needs.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent