Operating System: Three Easy Pieces --- Process (Note)

1. How can the operating system provide the illusion of a nearly-endless supply of said CPUs?

The OS creates this illusion by virtualizing the CPU. The basic technique, known as the time-

sharing the CPU, allows users to run as many concurrent processes as they would like. Potential

cost is performance, as each will run slowly if the CPU(s) must be shared. To implement virtualization

of the CPU, and to implement it well, the OS will need both some low-level machinery mechanisms;

mechanisms are low-level methods or protocals that implement a needed piece of functionality.

时间: 2024-10-24 22:04:04

Operating System: Three Easy Pieces --- Process (Note)的相关文章

Operating System: Three Easy Pieces --- API (Note)

Aside: RTFM --- Read The Man Pages Many times in this book, when referring to a particular system call or library call, we will tell you to read the mannual pages, or man pages for short. Man pages are the original form of documantation that exist on

Operating System: Three Easy Pieces --- LDE (Note)

ASIDE: Why System Calls Look Like Procedure Calls? You may wonder why a call to a system call, such as open() or read() looks exactly like a typical procedure call in C; that is, if it looks just like a procedure call, how does the system know it is

Operating System: Three Easy Pieces --- Locks (Note)

From the introduction to concurrency, we saw one of the fundamental problems in concurrent programming: we would like to execute a series of instructions atomically, but due to the presence of interrupts on a single processor (multiple threads execut

Operating System: Three Easy Pieces --- Mechanism: Limited Direct Execution (Note)

In order to virtualize the CPU, the operating system needs to somehow share the physical CPU among many jobs  running seemingly at the same time. The basic idea is simple: run one process for a little while, then run another, and so forth. By time sh

Operating System: Three Easy Pieces --- Locks: Pthread Locks (Note)

The name that the POSIX library uses for a lock is mutex, as it is used to provide mutual exclusion between threads, i.e., if one thread is in the critical sections, it excludes the others from entering until it has completed the section. Thus, when

Operating System: Three Easy Pieces --- Limited Directed Execution (Note)

In order to virtualize the CPU, the operating system needs to somehow share the physical CPU among many jobs running seemingly at the same time. The basic idea is simple: run one process for a little while, then run another one, and so forth. By time

Operating System: Three Easy Pieces --- Page Fault (Note)

Recall that with TLB misses, we have two types of systems: Hardware managed TLBs (where the hardware looks in the page table to find the desired translation) and software managed TLBs ( where the OS does). In either type of systems, if a page is not

Operating System: Three Easy Pieces --- Beyond Physical Memory: Mechanisms (Note)

Thus far, we have assumed that an address space is unrealistically small and fits into the physical memory. In fact, we have been assuming that every address space of ervery running process fits into memory. We will now relax these big assumptions, a

Operating System: Three Easy Pieces --- Thread API (Note)

This chapter briefly covers the main properties of the thread API. Each part will be explained further in the subsequent chapters, as we know how to use the API. More details can be found in various books and online sources. We should note that the s