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 UNIX systems; realize that they are created before the thing

called the web existed. Spending some time reading man pages is a key step in the growth of

a systems programmers; there are tons of useful tidbits hidden in those pages. Some particularly

useful pages to read are the man pages for whichever shell you are using and certainly for any

system calls your program makes (in order to see what return values and error conditions exist).

Finnay, reading the man pages can save you some embarrassment when you ask colleagues

about some intricacy of fork(), they may simply reply: "RTFM". This is your colleagues‘ way of

gently urging you to Read The Man Pages. The F in RTFM just adds a little color to the phrase......

时间: 2024-08-08 01:13:47

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

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 proces

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

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