OS Ch 1: Overview

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

multiprogramming, extended, separate, virtual machine monitor, copies, different, CMS (Conversational Monitor System)

)This system, originally called CP/CMS and later renamed VM/370 was based on an astute observation: a timesharing system provides (1) _____ which is a system that keeps several programs in main memory at the same time and executes them concurrently utilizing a single CPU (2) an ____ machine with a more convenient interface than the bare hardware. The goal of VM/370 is to completely _____ these two functions. The heart of the system, known as the _____ (aka type 1 hypervisor) runs on the bare hardware and does the multiprogramming, providing not one, but several virtual machines to the next layer up. However, unlike all other operating systems, these virtual machines are NOT extended machines, with files and other nice features. Instead, they are exact _____ of the bare hardware, including kernel/user mode, I/O, interrupts, and everything else the real machine has. Because each virtual machine is identical to the true hardware, each one can run any operating system that will run directly on the bare hardware. Different virtual machines can, and frequently do, run _____ operating systems. On the original IBM VM/370 system, some ran OS/360 or one of the other large batch or transaction-processing operating systems, while others ran a single-user, interactive system called ______ for interactive timesharing users. When a CMS program executed a system call, the call was trapped to the oper- ating system in its own virtual machine, not to VM/370, just as it would be were it running on a real machine instead of a virtual one. CMS then issued the normal hardware I/O instructions for reading its virtual disk or whatever was needed to carry out the call. These I/O instructions were trapped by VM/370, which then per- formed them as part of its simulation of the real hardware. By completely separat- ing the functions of multiprogramming and providing an extended machine, each of the pieces could be much simpler, more flexible, and much easier to maintain.

monolithic systems, layered systems, microkernels, client-server systems, virtual machines, and exokernels

6 types of structures that an operating system can exist as?

JVM (Java Virtual Machine), interpreter, protected

Another area where virtual machines are used, but in a somewhat different way, is for running Java programs. When Sun Microsystems invented the Java programming language, it also invented a virtual machine (i.e., a computer architecture) called the _____. The Java compiler produces code for JVM, which then typically is executed by a software JVM ____. The ad- vantage of this approach is that the JVM code can be shipped over the Internet to any computer that has a JVM interpreter and run there. If the compiler had produced SPARC or x86 binary programs, for example, they could not have been shipped and run anywhere as easily. Another advantage of using JVM is that if the interpreter is implemented properly, incoming JVM programs can be checked for safety and then executed in a ____ environment so they cannot steal data or do any damage.

one, trap, system call, kernel, file, buffer, number, errno, error,

Any single-CPU computer can execute ____ instruction at a time. If a process is running a user program in user mode and needs a system service, such as reading data from a file, it has to execute a ____ instruction to transfer control to the operating system. The operating system then figures out what the calling process wants by inspecting the parameters. Then it carries out the ____ ____ and returns control to the instruction following the system call. In a sense, making a system call is like making a special kind of procedure call, only system calls enter the ___ and procedure calls do not. To make the system-call mechanism clearer, let us take a quick look at the read system call. As mentioned above, it has three parameters: the first one specifying the ____, the second one pointing to the ____, and the third one giving the ___ of bytes to read. count = read(fd, buffer, nbytes); The system call (and the library procedure) return the number of bytes actually read in "count". This value is normally the same as nbytes, but may be smaller, if, for example, end-of-file is encountered while reading. If the system call cannot be carried out owing to an invalid parameter or a disk error, count is set to −1, and the error number is put in a global variable, ____. Programs should always check the results of a system call to see if an ____ occurred.

device driver, driver, driver, driver

Because each type of controller is different, different software is needed to control each one. The software that talks to a controller, giving it commands and accepting responses, is called a ___________ To be used, the _____ has to be put into the operating system so it can run in kernel mode. They can actually run outside the kernel, but the vast majority of them still run below the kernel boundary. There are three ways the ____ can be put into the kernel: 1) relink the kernel with the new ___ and then reboot the system. 2) make an entry in an operating system file telling it that it needs the driver and then reboot the system. At boot time, the operating system goes and finds the drivers it needs and loads them. 3) the operating system has to be able to accept new drivers while running and install them on the fly without the need to reboot.

file descriptor

Before a file can be read or written, it must be opened, at which time the permissions are checked. If the access is permitted, the system returns a small integer called a ____ ___ to use in subsequent operations. If the access is prohibited, an error code is returned.

cores, CPU, multiprocessor

Beyond multithreading, many CPU chips now have four, eight, or more complete processors or ____ on them. Thees multicore chips effectively carry four minichips on them, each with its own independent ___. Making use of such a multicore chip will definitely require a ___ operating system.

user-installed, untrusted, ROM,

EMBEDDED OPERATING SYSTEMS - run on the computers that control devices that are not generally thought of as computers and which do not accept ____ software. Typical examples are microwave ovens, TV sets, cars, DVD recorders, traditional phones, and MP3 players. The main property which distinguishes embedded systems from handhelds is the certainty that no ____ software will ever run on it. You cannot download new applications to your microwave oven—all the software is in ___. This means that there is no need for protection between applications, leading to design simplification. Systems such as Embedded Linux, QNX and VxWorks are popular in this domain.

UID (User IDentification), UID, UID, GID (Group IDentification), superuser, Administrator

Each person authorized to use a system is assigned a ____ by the system administrator. Every process started has the ____ of the person who started it. A child process has the same ____ as its parent. Users can be members of groups, each of which has a _____ One UID, called the ____ (in UNIX), or ____ (in Windows), has special power and may override many of the protection rules. In large installations, only the system administrator knows the password needed to become superuser

I/O port space, I/O port space

Every controller has a small number of registers that are used to communicate with it. For example, a minimal disk controller might have registers for specifying the disk address, memory address, sector count, and direction (read or write). To activate the controller, the driver gets a command from the operating system, then translates it into the appropriate values to write into the device registers. The collection of all the device registers forms the ______ On some computers, the device registers are mapped into the operating system's address space (the addresses it can use), so they can be read and written like ordinary memory words. On such computers, no special I/O instructions are required and user programs can be kept away from the hardware by not putting these memory addresses within their reach (e.g., by using base and limit registers). On other computers, the device registers are put in a special ______, with each register having a port address. On these machines, special IN and OUT instructions are available in kernel mode to allow drivers to read and write the registers. The former scheme eliminates the need for special I/O instructions but uses up some of the address space. The latter uses no address space but requires special instructions. Both systems are widely used.

i-number, i-nodes, i-number, ASCII name

Every file in UNIX has a unique number, its ______, that identifies it. This is an index into a table of _____, one per file, telling who owns the file, where its disk blocks are, and so on. A directory is simply a file containing a set of (_____, ____) pairs.

kernel mode, user mode,

Everything running in ____ is clearly part of the operating system, but some programs running outside it are arguably also part of it, or at least closely associated with it. For example, in many systems there are programs that run in _____ but help the operating system or perform privileged functions. Ex: a program that allows users to change their passwords. It is not part of the operating system and does not run in kernel mode, but it clearly carries out a sensitive function and has to be protected in a special way.

System calls, directory, System calls, files, directories

FILE SYSTEM a major function of the operating system is to hide the peculiarities of the disks and other I/O devices and present the programmer with a nice, clean abstract model of device-independent files. __ ____ are needed to create files, remove files, read files, and write files. Before a file can be read, it must be located on the disk and opened, and after being read it should be closed, so calls are provided to do these things. To provide a place to keep files, most PC operating systems have the concept of a _____ as a way of grouping files together. A student, for example, might have one directory for each course he is taking (for the programs needed for that course), another directory for his electronic mail, and still another directory for his World Wide Web home page. ___ ___ are then needed to create and remove directories. Calls are also provided to put an existing file in a directory and to remove a file from a directory. Directory entries may be either ___ or other ___.

stack, reference, library, register, TRAP, user, kernel, return, kernel, cannot, handler, runs, library, user, stack, increments,

HOW SYSTEM CALLS ARE PERFORMED the calling program first pushes the parameters onto the ____ count = read(fd, buffer, nbytes); The first and third parameters are called by value, but the second parameter is passed by ____, meaning that the address of the buffer (indicated by &) is passed, not the contents of the buffer. Then comes the actual call to the ___ procedure This instruction is the normal procedure-call instruction used to call all procedures. The library procedure, possibly written in assembly language, typically puts the system-call number in a place where the operating system expects it, such as a ____ Then it executes a ____ instruction to switch from ____ mode to ___ mode and start execution at a fixed address within the kernel The TRAP instruction is actually fairly similar to the procedure-call instruction in the sense that the instruction following it is taken from a distant location and the _____ address is saved on the stack for use later. Nevertheless, the TRAP instruction also differs from the procedure-call instruction in 2 fundamental ways: 1) as a side effect, it switches into ____ mode. The procedure call instruction does not change the mode. 2) rather than giving a relative or absolute address where the procedure is located, the TRAP instruction ____ jump to an arbitrary address. Depending on the architecture, either it jumps to a single fixed location or there is an 8-bit field in the instruction giving the index into a table in memory containing jump addresses, or equivalent. The kernel code that starts following the TRAP examines the system-call number and then dispatches to the correct system-call _____, usually via a table of pointers to system-call handlers indexed on system-call number. At that point the system-call handler ____. Once it has completed its work, control may be returned to the user-space _____ procedure at the instruction following the TRAP instruction. This procedure then returns to the ____ program in the usual way procedure calls return. To finish the job, the user program has to clean up the ____, as it does after any procedure call Assuming the stack grows downward, as it often does, the compiled code _____ the stack pointer exactly enough to remove the parameters pushed before the call to read. The program is now free to do whatever it wants to do next. In step 9 above, we said ''may be returned to the user-space library procedure'' for good reason. The system call may block the caller, preventing it from continuing. For example, if it is trying to read from the keyboard and nothing has been typed yet, the caller has to be blocked. In this case, the operating system will look around to see if some other process can be run next. Later, when the desired input is available, this process will get the attention of the system and run steps 9-11.

controller, device,

I/O devices generally consist of 2 parts: 1) _____ : a chip or a set of chips that physically controls the device. It accepts commands from the operating system, for example, to read data from the device, and carries them out. To do this, they often contain small embedded computers that are programmed to do their work. Presents a simpler (but still very complex) interface to the operating system 2) the _____ itself: have fairly simple interfaces, both because they cannot do much and to make them standard (so that any SATA disk controller can handle any SATA disk, for example. SATA stands for Serial ATA and ATA in turn stands for AT Attachment. SATA is currently the standard type of disk on many computers. Since the actual device interface is hidden behind the controller, all that the operating system sees is the interface to the controller, which may be quite different from the interface to the device.)

virtualizable, virtual-machine monitor, ignored, translating, machine simulators, binary translation, kernel module, type 2 hypervisors, host operating system, virtual disk, paravirtualization

In order to run virtual machine software on a computer, its CPU must be ______ In a nutshell, here is the problem. When an operating system running on a virtual machine (in user mode) executes a privileged instruction, such as modifying the PSW or doing I/O, it is essential that the hardware trap to the ______ so the instruction can be emulated in software. On some CPUs—notably the Pentium, its predecessors, and its clones—attempts to execute privileged instructions in user mode are just _____. This property made it impossible to have virtual machines on this hardware. Of course, there were interpreters for the Pentium, such as Bochs, that ran on the Pentium, but with a performance loss of one to two orders of magnitude, they were not useful for serious work. This situation changed as a result of several academic research projects in the 1990s and early years of this millennium. Some of these early research projects improved the performance over interpreters like Bochs by _____ blocks of code on the fly, storing them in an internal cache, and then reusing them if they were executed again. This improved the performance considerably, and led to what we will call ______. However, although this technique, known as _____, helped improve matters, the resulting systems were still not fast enough to use in commercial environments where performance matters a lot. The next step in improving performance was to add a ____ to do some of the heavy lifting. In practice now, all commercially available hypervisors, such as VMware Workstation, use this hybrid strategy (and have many other improvements as well). They are called _____ and they are not entirely user-mode programs. In practice, the real distinction between a type 1 hypervisor and a type 2 hypervisor is that a type 2 makes uses of a _____ and its file system to create processes, store files, and so on. A type 1 hypervisor has no underlying support and must perform all these functions itself. After a type 2 hypervisor is started, it reads the installation CD-ROM (or CD- ROM image file) for the chosen guest operating system and installs the guest OS on a _____, which is just a big file in the host operating system's file system. Type 1 hypervisors cannot do this because there is no host operating system to store files on. They must manage their own storage on a raw disk partition. When the guest operating system is booted, it does the same thing it does on the actual hardware, typically starting up some background processes and then a GUI. To the user, the guest operating system behaves the same way it does when running on the bare metal even though that is not the case here. A different approach to handling control instructions is to modify the operating system to remove them. This approach is not true virtualization, but _____.

PCIe (Peripheral Component Interconnect Express), DMI (Direct Media Interface), USB (Universal Serial Bus)

In this configuration, the CPU talks to memory over a fast DDR3 bus, to an external graphics device over the main bus, ___, and to all other devices via a hub over a _____bus. The hub in turn connects all the other devices, using the Universal Serial Bus to talk to USB devices, the SATA bus to interact with hard disks and DVD drives, and PCIe to transfer Ethernet frames. The _____ was invented to attach all the slow I/O de- vices, such as the keyboard and mouse, to the computer.

superscalar CPU

In this design, multiple execution units are present, for example, one for integer arithmetic, one for floating-point arithmetic, and one for Boolean operations. Two or more instructions are fetched at once, decoded, and dumped into a holding buffer until they can be executed. As soon as an execution unit becomes available, it looks in the holding buffer to see if there is an instruction it can handle, and if so, it removes the instruction from the buffer and executes it. An implication of this design is that program instructions are often executed out of order. For the most part, it is up to the hardware to make sure the result produced is the same one a sequential implementation would have produced

disable, static

Interrupts can (and often do) happen at highly inconvenient moments, for example, while another interrupt handler is running. For this reason, the CPU has a way to ____ interrupts and then reenable them later. While interrupts are disabled, any devices that finish continue to assert their interrupt signals, but the CPU is not interrupted until interrupts are enabled again. If multiple devices finish while interrupts are disabled, the interrupt controller decides which one to let through first, usually based on _____ priorities assigned to each device. The highest-priority device wins and gets to be serviced first. The others must wait.

jobs, batch, transaction processing, timesharing

MAINFRAME OPERATING SYSTEMS The operating systems for mainframes are heavily oriented toward processing many ____ at once, most of which need prodigious amounts of I/O. They typically offer three kinds of services: 1) ____: processes routine jobs without any interactive user present. Ex: Claims processing in an insurance company or sales reporting for a chain of stores 2) ____: handles large numbers of small requests, for example, check processing at a bank or airline reservations. Each unit of work is small, but the system must handle hundreds or thousands per second. 3)____: allow multiple remote users to run jobs on the computer at once, such as querying a big database. These functions are closely related; mainframe operating systems often perform all of them. An example mainframe operating system is OS/390, a descendant of OS/360. However, mainframe operating systems are gradually being replaced by UNIX variants such as Linux.

chdir, chmod, kill

MISCELLANEOUS SYSTEM CALLS 1) ____ call changes the current working directory. After the call chdir("/usr/ast/test"); an open on the file xyz will open /usr/ast/test/xyz. The concept of a working direc- tory eliminates the need for typing (long) absolute path names all the time. 2) In UNIX every file has a mode used for protection. The mode includes the read-write-execute bits for the owner, group, and others. The ______ system call makes it possible to change the mode of a file. For example, to make a file read-only by everyone except the owner, one could execute chmod("file", 0644); 3) The _____ system call is the way users and user processes send signals. If a process is prepared to catch a particular signal, then when it arrives, a signal handler is run. If the process is not prepared to handle a signal, then its arrival kills the process (hence the name of the call).

parallel, multicomputers, multiprocessors, server

MULTIPROCESSOR OPERATING SYSTEMS multiple CPUs connected into a single system. Depending on precisely how they are connected and what is shared, these systems are called ____ computers, ____, or _____. They need special operating systems, but often these are variations on the ____ operating systems, with special features for communication, connectivity, and consistency. With the recent advent of multicore chips for personal computers, even conventional desktop and notebook operating systems are starting to deal with at least small-scale multiprocessors and the number of cores is likely to grow over time. Luckily, quite a bit is known about multiprocessor operating systems from years of previous research, so using this knowledge in multicore systems should not be hard. The hard part will be having applications make use of all this computing power. Many popular operating systems, including Windows and Linux, run on multiprocessors.

kernel mode, user mode, kernel mode, supervisor mode, user mode, forbidden

Most computers have two modes of operation: ____ and ____. Usually, a bit in the PSW controls the mode. The operating system, the most fundamental piece of software, runs in _____ (also called ____) In this mode it has complete access to all the hardware and can execute any instruction the machine is capable of executing. The rest of the software runs in ____, in which only a subset of the machine instructions is available. In particular, those instructions that affect control of the machine or do I/O (Input/Output) are ____ to user-mode programs.

interrupt vector

Once the CPU has decided to take the interrupt, the program counter and PSW are typically then pushed onto the current stack and the CPU switched into kernel mode. The device number may be used as an index into part of memory to find the address of the interrupt handler for this device. This part of memory is called the ____. Once the interrupt handler (part of the driver for the interrupting device) has started, it removes the stacked program counter and PSW and saves them, then queries the device to learn its status. When the handler is all finished, it returns to the previously running user program to the first instruction that was not yet executed.

restarted, saved, pointer, position, pointers, read, process table, core image, process table entry

Periodically, the operating system decides to stop running one process and start running another, perhaps because the first one has used up more than its share of CPU time in the past second or two. When a process is suspended temporarily like this, it must later be _____ in exactly the same state it had when it was stopped. This means that all information about the process must be explicitly ____ somewhere during the suspension. For example, the process may have several files open for reading at once. Associated with each of these files is a ____ giving the current ____ (i.e., the number of the byte or record to be read next). When a process is temporarily suspended, all these ____ must be saved so that a ____ call executed after the process is restarted will read the proper data. In many operating systems, all the information about each process, other than the contents of its own address space, is stored in an operating system table called the _____ ____, which is an array of structures, one for each process currently in existence. Thus, a (suspended) process consists of its address space, usually called the ____ ____ (in honor of the magnetic core memories used in days of yore), and its ____ ___ _____, which contains the contents of its registers and many other items needed to restart the process later.

text, data, stack, brk, malloc

Processes in UNIX have their memory divided up into 3 segments: 1) the ____ segment (i.e., the program code) 2) the ___ segment (i.e., the variables) 3) the ____ segment. The data segment grows upward and the stack grows downwardB Between them is a gap of unused address space. The stack grows into the gap automatically, as needed, but expansion of the data segment is done explicitly by using a system call, ____, which specifies the new address where the data segment is to end. This call, however, is not defined by the POSIX standard, since programmers are encouraged to use the ____ library procedure for dynamically allocating storage, and the underlying implementation of malloc was not thought to be a suitable subject for standardization since few programmers use it directly and it is doubtful that anyone even notices that brk is not in POSIX.

time, deadlines, hard, guarantees, soft, software, add, industrial

REAL-TIME OPERATING SYSTEMS - These systems are characterized by having ____ as a key parameter. For example, in industrial process-control systems, real-time computers have to collect data about the production process and use it to control machines in the factory. Often there are hard ___ that must be met. For example, if a car is moving down an assembly line, certain actions must take place at certain instants of time. If, for example, a welding robot welds too early or too late, the car will be ruined. If the action absolutely must occur at a certain moment (or within a certain range), we have a ____ real-time system. Many of these are found in industrial process control, avionics, military, and similar application areas. These systems must provide absolute ____ that a certain action will occur by a certain time. A ____ real-time system, is one where missing an occasional deadline, while not desirable, is acceptable and does not cause any permanent damage. Digital audio or multimedia systems fall in this category. Smartphones are also soft real-time systems. Since meeting deadlines is crucial in (hard) real-time systems, sometimes the operating system is simply a library linked in with the application programs, with everything tightly coupled and no protection between parts of the system. An example of this type of real-time system is eCos. The categories of handhelds, embedded systems, and real-time systems overlap considerably. Nearly all of them have at least some soft real-time aspects. The em- bedded and real-time systems run only _____ put in by the system designers; users cannot ____ their own software, which makes protection easier. The handhelds and embedded systems are intended for consumers, whereas real-time systems are more for ____ usage. Nevertheless, they have a certain amount in common.

partitioning, kernel, exokernel, exokernel, remapping

Rather than cloning the actual machine, as is done with virtual machines, another strategy is _____ it, in other words, giving each user a subset of the resources. Thus one virtual machine might get disk blocks 0 to 1023, the next one might get blocks 1024 to 2047, and so on. At the bottom layer, running in ____ mode, is a program called the _____ Its job is to allocate resources to virtual machines and then check attempts to use them to make sure no machine is trying to use somebody else's resources. Each user-level virtual machine can run its own operating system, as on VM/370 and the Pentium virtual 8086s, except that each one is restricted to using only the resources it has asked for and been allocated. The advantage of the ______ scheme is that it saves a layer of mapping. In the other designs, each virtual machine thinks it has its own disk, with blocks running from 0 to some maximum, so the virtual machine monitor must maintain tables to remap disk addresses (and all other resources). With the exokernel, this _____ is not needed. The exokernel need only keep track of which virtual ma- chine has been assigned which resource. This method still has the advantage of separating the multiprogramming (in the exokernel) from the user operating system code (in user space), but with less overhead, since all the exokernel has to do is keep the virtual machines out of each other's hair.

multiplexing, time, space, time multiplexing, time multiplexed, space multiplexing, space multiplexed

Resource management includes ______ (sharing) resources in 2 different ways: in ____ and in ____. ____ ____ : When this happens, different programs or users take turns using it. First one of them gets to use the resource, then another, and so on. For example, with only one CPU and multiple programs that want to run on it, the operating system first allocates the CPU to one program, then, after it has run long enough, another program gets to use the CPU, then another, and then eventually the first one again. Determining how the resource is ____ ____—who goes next and for how long—is the task of the operating system. Another example is sharing the printer. When multiple print jobs are queued up for printing on a single printer, a decision has to be made about which one is to be printed next. ____ ____ : Instead of the customers taking turns, each one gets part of the resource. For example, main memory is normally divided up among several running programs, so each one can be resident at the same time (for example, in order to take turns using the CPU). Assuming there is enough memory to hold multiple programs, it is more efficient to hold several programs in memory at once rather than give one of them all of it, especially if it only needs a small fraction of the total. Of course, this raises issues of fairness, protection, and so on, and it is up to the operating system to solve them. Another resource that is ______ ____ is the disk. In many systems a single disk can hold files from many users at the same time. Allocating disk space and keeping track of who is using which disk blocks is a typical operating system task.

network, share

SERVER OPERATING SYSTEMS the second level of operating systems. They run on servers, which are either very large personal computers, workstations, or even mainframes. They serve multiple users at once over a ____ and allow the users to ___ hardware and software resources. Servers can provide print service, file service, or Web service. Internet providers run many server machines to support their customers and Websites use servers to store the Web pages and handle the incoming requests. Typical server operating systems are Solaris, FreeBSD, Linux and Windows Server 201x.

servers, clients, client-server, microkernel, message, locally, network, remote

TYPE OF OPERATING SYSTEM STRUCTURE A slight variation of the microkernel idea is to distinguish 2 classes of processes: 1) ______: each of which provides some service 2) ______: which use these services. This model is known as the _____ model. Often the lowest layer is a ____, but that is not required. Communication between clients and servers is often by ____ passing. To obtain a service, a client process constructs a message saying what it wants and sends it to the appropriate service. The service then does the work and sends back the answer. Since clients communicate with servers by sending messages, the clients need not know whether the messages are handled _____ on their own machines, or whether they are sent across a ____ to servers on a ____ machine. As far as the client is concerned, the same thing happens in both cases: requests are sent and replies come back. Thus the client-server model is an abstraction that can be used for a single machine or for a network of machines. Increasingly many systems involve users at their home PCs as clients and large machines elsewhere running as servers. In fact, much of the Web operates this way. A PC sends a request for a Web page to the server and the Web page comes back. This is a typical use of the client-server model in a network.

layered, multiprogramming, processor allocation, memory, communication, managing, I/O devices, user, operator

TYPE OF OPERATING SYSTEM STRUCTURE ____: organize the operating system as a hierarchy of layers, each one constructed upon the one below it. The first system constructed in this way was the THE system built at the Technische Hogeschool Eindhoven in the Netherlands by E. W. Dijkstra (1968) and his students. The THE system was a simple batch system for a Dutch computer, the Electrologica X8, which had 32K of 27-bit words (bits were expensive back then). The system had six layers: 0) Layer 0 dealt with allocation of the processor, switching between processes when interrupts occurred or timers expired. Above layer 0, the system consisted of sequential processes, each of which could be programmed without having to worry about the fact that multiple processes were running on a single processor. In other words, layer 0 provided the basic _______ of the CPU and ____ ____. 1) Layer 1 did the ____ management. It allocated space for processes in main memory and on a 512K word drum used for holding parts of processes (pages) for which there was no room in main memory. Above layer 1, processes did not have to worry about whether they were in memory or on the drum; the layer 1 software took care of making sure pages were brought into memory at the moment they were needed and removed when they were not needed. 2) Layer 2 handled _____ between each process and the operator console (that is, the user). On top of this layer each process effectively had its own operator console. 3) Layer 3 took care of ______ the ___ ____ and buffering the information streams to and from them. Above layer 3 each process could deal with abstract I/O devices with nice properties, instead of real devices with many peculiarities. 4) Layer 4 was where the ____ programs were found. They did not have to worry about process, memory, console, or I/O management. 5) The system _____ process A further generalization of the layering concept was present in the MULTICS system. Instead of layers, MULTICS was described as having a series of concentric rings, with the inner ones being more privileged than the outer ones (which is effectively the same thing). When a procedure in an outer ring wanted to call a procedure in an inner ring, it had to make the equivalent of a system call, that is, a TRAP instruction whose parameters were carefully checked for validity before the call was allowed to proceed.

monolithic operating system, procedures, binary, linker, trap, invokes, system calls, utility, loadable extensions, shared libraries

TYPE OF OPERATING SYSTEM STRUCTURE ____: the most common organization, the entire operating system runs as a single program in kernel mode. The operating system is written as a collection of ____, linked together into a single large executable ____ program. When this technique is used, each procedure in the system is free to call any other one, if the latter provides some useful computation that the former needs. A crash in any of these procedures will take down the entire operating system. To construct the actual object program of the operating system when this approach is used, one first compiles all the individual procedures (or the files containing the procedures) and then binds them all together into a single executable file using the system ____. Every procedure is visible to every other procedure. The services (system calls) provided by the operating system are requested by putting the parameters in a well-defined place (e.g., on the stack) and then executing a ____ instruction. This instruction switches the machine from user mode to kernel mode and transfers control to the operating system. The operating system then fetches the parameters and determines which system call is to be carried out. After that, it indexes into a table that contains in slot k a pointer to the procedure that carries out system call k. This organization suggests a basic structure for the operating system: 1) A main program that ____ the requested service procedure. 2) A set of service procedures that carry out the ____ ___. 3) A set of ____ procedures that help the service procedures. In this model, for each system call there is one service procedure that takes care of it and executes it. The utility procedures do things that are needed by several service procedures, such as fetching data from user programs. In addition to the core operating system that is loaded when the computer is booted, many operating systems support ___ ___, such as I/O device drivers and file systems. These components are loaded on demand. In UNIX they are called ____ ___.

microkernel, device, servers, reincarnation, mechanism, policy

TYPE OF OPERATING SYSTEM STRUCTURE a strong case can be made for putting as little as possible in kernel mode because bugs in the kernel can bring down the system instantly. In contrast, user processes can be set up to have less power so that a bug there may not be fatal. _____: achieve high reliability by splitting the operating system up into small, well-defined modules, only one of which—itself—runs in kernel mode and the rest run as relatively powerless ordinary user processes. In particular, by running each device driver and file system as a separate user process, a bug in one of these can crash that component, but cannot crash the entire system. With the exception of OS X, which is based on the Mach microkernel, common desktop operating systems do not use microkernels. However, they are dominant in real-time, industrial, avionics, and military applications that are mission critical and have very high reliability requirements. Example is MINIX 3 (a POSIX-conformant, open source system): The MINIX 3 microkernel is only about 12,000 lines of C and some 1400 lines of assembler for very low-level functions such as catching interrupts and switching processes. The C code manages and schedules processes, handles interprocess communication (by passing messages between processes), and offers a set of about 40 kernel calls to allow the rest of the operating system to do its work. These calls perform functions like hooking handlers to interrupts, moving data between address spaces, and installing memory maps for new processes. The process structure of MINIX 3 is shown in Fig. 1-26, with the kernel call handlers labeled Sys. The device driver for the clock is also in the kernel because the scheduler interacts closely with it. The other device drivers run as separate user processes. Outside the kernel, the system is structured as 3 layers of processes all running in user mode. 1) The lowest layer contains the ____ drivers. Since they run in user mode, they do not have physical access to the I/O port space and cannot issue I/O commands directly. Instead, to program an I/O device, the driver builds a structure telling which values to write to which I/O ports and makes a kernel call telling the kernel to do the write. This approach means that the kernel can check to see that the driver is writing (or reading) from I/O it is authorized to use. 2) Above the drivers is another user-mode layer containing the _____, which do most of the work of the operating system. One or more file servers manage the file system(s), the process manager creates, destroys, and manages processes, and so on. User programs obtain operating system services by sending short messages to the servers asking for the POSIX system calls. For example, a process needing to do a read sends a message to one of the file servers telling it what to read. One interesting server is the _____ server, whose job is to check if the other servers and drivers are functioning correctly. In the event that a faulty one is detected, it is automatically replaced without any user intervention. In this way, the system is self healing and can achieve high reliability. 3) User programs: at the highest level, includes shell The sum total of all these restrictions is that each driver and server has exactly the power to do its work and nothing more An idea somewhat related to having a minimal kernel is to put the _____ for doing something in the kernel but not the ____. To make this point better, consider the scheduling of processes. A relatively simple scheduling algorithm is to assign a numerical priority to every process and then have the kernel run the highest-priority process that is runnable. The mechanism—in the kernel—is to look for the highest-priority process and run it. The policy—assigning priorities to processes—can be done by user-mode processes. In this way, policy and mechanism can be decoupled and the kernel can be made smaller.

CPU, processor, CPU, CPU, CPUs

The ''brain'' of the computer is the ____, or _____. It fetches instructions from memory and executes them. The basic cycle of every ____ is to fetch the first instruction from memory, decode it to determine its type and operands, execute it, and then fetch, decode, and execute subsequent instructions. The cycle is repeated until the program finishes. In this way, programs are carried out. Each ____ has a specific set of instructions that it can execute. Because accessing memory to get an instruction or data word takes much longer than executing an instruction, all _____ contain some registers inside to hold key variables and temporary results. Thus the instruction set generally contains instructions to load a word from memory into a register, and store a word from a register into memory. Other instructions combine two operands from registers, memory, or both into a result, such as adding two words and storing the result in a register or in memory. In addition to the general registers used to hold variables and temporary results, most computers have several special registers that are visible to the programmer, such as the: 1) program counter 2) stack pointer 3) PSW (Program Status Word)

command interpreter (shell), process, system call, child processes, interprocess communication, memory, remote, notify, alarm signal, restarted, signals, signals

The key process-management system calls are those dealing with the creation and termination of processes. Consider a typical example. A process called the ___ ____ reads commands from a terminal. The user has just typed a command requesting that a program be compiled. The shell must now create a new ____ that will run the compiler. When that process has finished the compilation, it executes a ___ ___ to terminate itself. If a process can create one or more other processes (referred to as ____ ____) and these processes in turn can create other child processes, we quickly arrive at the process tree structure. Related processes that are cooperating to get some job done often need to communicate with one another and synchronize their activities. This communication is called ____ ____ Other process system calls are available to request more ____ (or release unused memory), wait for a child process to terminate, and overlay its program with a different one. Occasionally, there is a need to convey information to a running process that is not sitting around waiting for this information. For example, a process that is communicating with another process on a different computer does so by sending messages to the _____ process over a computer network. To guard against the possibility that a message or its reply is lost, the sender may request that its own operating system ____ it after a specified number of seconds, so that it can retransmit the message if no acknowledgement has been received yet. After setting this timer, the program may continue doing other work. When the specified number of seconds has elapsed, the operating system sends an ____ ____ to the process. The signal causes the process to temporarily suspend whatever it was doing, save its registers on the stack, and start running a special signal-handling procedure, for example, to retransmit a presumably lost message. When the signal handler is done, the running process is ____ in the state it was in just before the signal. _____ are the software analog of hardware interrupts and can be generated by a variety of causes in addition to timers expiring. Many traps detected by hardware, such as executing an illegal instruction or using an invalid address, are also converted into _____ to the guilty process.

read, write, random, pointer, byte, lseek, descriptor, position, relative, absolute, stat,

The most heavily used calls are undoubtedly ____ and ____ Although most programs read and write files sequentially, for some applications programs need to be able to access any part of a file at ____. Associated with each file is a ____ that indicates the current position in the file. When reading (writing) sequentially, it normally points to the next ___ to be read (written). The ____ call changes the value of the position pointer, so that subsequent calls to read or write can begin anywhere in the file. Lseek has 3 parameters: 1) the file ___ 2) file ____ 3) whether the file position is ____ to the beginning of the file, the current position, or the end of the file. The value returned by lseek is the ____ position in the file (in bytes) after changing the pointer. For each file, UNIX keeps track of the file mode (regular file, special file, directory, and so on), size, time of last modification, and other information. Programs can ask to see this information via the ____ system call. The first parameter specifies the file to be inspected; the second one is a pointer to a structure where the information is to be put. The fstat calls does the same thing for an open file.

not, shell, shell, command, child process, terminate, read, file, input, pipe, &, background, GUI,

The operating system is the code that carries out the system calls. Editors, compilers, assemblers, linkers, utility programs, and command interpreters definitely are not part of the operating system, even though they are important and useful. At the risk of confusing things somewhat, in this section we will look briefly at the UNIX command interpreter, the shell. Although it is ___ part of the operating system, it makes heavy use of many operating system features and thus serves as a good example of how the system calls are used. It is also the main interface between a user sitting at his terminal and the operating system, unless the user is using a graphical user interface. Many shells exist, including sh, csh, ksh, and bash. When any user logs in, a ___ is started up. The ____ has the terminal as standard input and standard output. It starts out by typing the prompt, a character such as a dollar sign, which tells the user that the shell is waiting to accept a ____. If the user now types "date" for example, the shell creates a ___ ____ and runs the date program as the child. While the child process is running, the shell waits for it to ____. When the child finishes, the shell types the prompt again and tries to ____ the next input line. The user can specify that standard output be redirected to a _____, for example, "date >file" Similarly, standard ____ can be redirected, as in "sort<file1 >file2" which invokes the sort program with input taken from file1 and output sent to file2. The output of one program can be used as the input for another program by connecting them with a ____. Thus "cat file1 file2 file3 | sort >/dev/lp" invokes the cat program to concatenate three files and send the output to sort to arrange all the lines in alphabetical order. The output of sort is redirected to the file /dev/lp, typically the printer. If a user puts ___ after a command, the shell does not wait for it to complete. Instead it just gives a prompt immediately. Consequently, "cat file1 file2 file3 | sort >/dev/lp &" starts up the sort as a ____ job, allowing the user to continue working normally while the sort is going on. the ____ is just a program running on top of the operating system, like a shell. In Linux systems, this fact is made obvious because the user has a choice of (at least) two GUIs: Gnome and KDE or none at all (using a terminal window on X11). In Windows, it is also possible to replace the standard GUI desktop (Windows Explorer) with a different program by changing some values in the registry, although few people do this.

time multiplexing, registers

The operating system must be fully aware of all the registers. When _____ the CPU, the operating system will often stop the running program to (re)start another one. Every time it stops a running program, the operating system must save all the ____ so they can be restored when the program runs later.

caching, MMU, context switch

The presence of ___and the ___ can have a major impact on performance. In a multiprogramming system, when switching from one program to another, sometimes called a ____, it may be necessary to flush all modified blocks from the cache and change the mapping registers in the MMU. Both of these are expensive operations.

virtual memory, main memory, disk, physical,

What happens if a process has more address space than the computer has main memory and the process wants to use it all? on many computers, addresses are 32 or 64 bits, giving an address space of 232 or 264 bytes, respectively. Normally, each process has some set of addresses it can use, typically running from 0 up to some maximum. In the simplest case, the maximum amount of address space a process has is less than the main memory. In this way, a process can fill up its address space and there will be enough room in main memory to hold it all. Nowadays, a technique called ___ ____ exists where the operating system keeps part of the address space in ____ ____ and part on ___ and shuttles pieces back and forth between them as needed. In essence, the operating system creates the abstraction of an address space as the set of addresses a process may reference. The address space is decoupled from the machine's ___ memory and may be either larger or smaller than the physical memory.

kernel, user, user, user, kernel

When running in ____ mode, the CPU can execute every instruction in its instruction set and use every feature of the hardware. On desktop and server machines, the operating system normally runs in this mode, giving it access to the complete hardware. On most embedded systems, a small piece runs in this mode, with the rest of the operating system running in ___ mode. User programs always run in ____ mode, which permits only a subset of the instructions to be executed and a subset of the features to be accessed. Generally, all instructions involving I/O and memory protection are disallowed in ___ mode. Setting the PSW mode bit to enter ____ mode is also forbidden, of course.

caching, cached, cached, caches, L1 cache, L2 cache

Whenever a resource can be divided into pieces, some of which are used much more heavily than others, ____ is often used to improve performance. Operating systems use it all the time. For example, most operating systems keep (pieces of) heavily used files in main memory to avoid having to fetch them from the disk repeatedly. Similarly, the results of converting long path names like /home/ast/projects/minix3/src/kernel/clock.c into the disk address where the file is located can be ____ to avoid repeated lookups. Finally, when the address of a Web page (URL) is converted to a network address (IP address), the result can be ___ for future use. modern CPUs have 2 ___: 1) _____: is always inside the CPU and usually feeds decoded instructions into the CPU's execution engine. Most chips have a second one of these for very heavily used data words. These are typically 16 KB each. 2) ____: holds several megabytes of recently used memory words. The difference between these 2 lie in the timing. Access to the first is done without any delay, whereas access to the second involves a delay of one or two clock cycles.

system, library procedures

With UNIX, there is almost a one- to-one relationship between the _____ calls (e.g., read) and the ___ ____ (e.g., read) used to invoke the system calls. In other words, for each system call, there is roughly one library procedure that is called to invoke it. Furthermore, POSIX has only about 100 procedure calls.

POSIX, POSIX system calls, not, performance, system, one,

____: a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems __ ___ ___: the library procedures that make those system calls, has about 100 procedure calls, the services offered by these calls determine most of what the operating system has to do, since the resource management on personal computers is minimal (at least compared to big machines with multiple users). The services include things like creating and terminating processes, creating, deleting, reading, and writing files, managing directories, and performing input and output. the mapping of POSIX procedure calls onto system calls is ___ one-to-one. The POSIX standard specifies a number of procedures that a conformant system must supply, but it does not specify whether they are system calls, library calls, or something else. If a procedure can be carried out without invoking a system call (i.e., without trapping to the kernel), it will usually be done in user space for reasons of ___. However, most of the POSIX procedures do invoke ____ calls, usually with one procedure mapping directly onto ___ system call. In a few cases, especially where several required procedures are only minor variations of one another, one system call handles more than one library call.

system call, system call, TRAP, system call, system call

____: a special kind of procedure call that has the additional property of switching from user mode to kernel mode. To obtain services from the operating system, a user program must make a ____, which traps into the kernel and invokes the operating system. The ___ instruction switches from user mode to kernel mode and starts the operating system. When the work has been completed, control is returned to the user program at the instruction following the _____ It is worth noting that computers have traps other than the instruction for executing a ______. Most of the other traps are caused by the hardware to warn of an exceptional situation such as an attempt to divide by 0 or a floating-point underflow. In all cases the operating system gets control and must decide what to do. Sometimes the program must be terminated with an error. Other times the error can be ignored (an underflowed number can be set to 0). Finally, when the program has announced in advance that it wants to handle certain kinds of conditions, control can be passed back to the program to let it deal with the problem.

link, i-number,

____: system call that allows the same file to appear under two or more names, often in different directories. A typical use is to allow several members of the same programming team to share a common file, with each of them having the file appear in his own directory, possibly under different names. Sharing a file is not the same as giving every team member a private copy; having a shared file means that changes that any member of the team makes are instantly visible to the other members—there is only one file. When copies are made of a file, subsequent changes made to one copy do not affect the others. What link does is simply create a brand new directory entry with a (possibly new) name, using the _____ of an existing file. For example, two entries have the same i-number (70) and thus refer to the same file. If either one is later removed, using the unlink system call, the other one remains. If both are removed, UNIX sees that no entries to the file exist (a field in the i-node keeps track of the number of directory entries pointing to the file), so the file is removed from the disk.

SATA (Serial ATA), disk driver, files

_____ (hard disk used on most computers) uses a _____ to deal with the hardware and provide an interface to read and write disk blocks, without getting into the details. Operating systems contain many of these for controlling I/O devices. operating systems provide yet another layer of abstraction for using disks: _____.

process, file, directory, path name, root, working, system call,

_____ hierarchies: trees that are usually not very deep (more than three levels is unusual). typically short-lived, generally minutes at most. Typically, only a parent process may control or even access a child process. ____ (___) hierarchies: commonly four, five, or even more levels deep. may exist for years. mechanisms nearly always exist to allow files and directories to be read by a wider group than just the owner. Every file within this hierarchy can be specified by giving its __ ___ from the top of this hierarchy, the ___ directory. At every instant, each process has a current ____ directory but processes can change this directory by issuing a ___ ___ specifying the new one

user interface program, shell, GUI (Graphical User Interface), not

_____: The program that users interact with, usually called the ___ when it is text based and the ____when it uses icons, is actually ___ part of the operating system, although it uses the operating system to get its work done. is the lowest level of user-mode software, and allows the user to start other programs, such as a Web browser, email reader, or music player.

fork, fork, different, waitpid, waitpid, user, execve

_____: the only way to create a new process in POSIX. It creates an exact duplicate of the original process, including all the file descriptors, registers—everything. After this, the original process and the copy (the parent and child) go their separate ways. All the variables have identical values at the time of this, but since the parent's data are copied to create the child, subsequent changes in one of them do not affect the other one. (The program text, which is unchangeable, is shared between parent and child.) The ___ call returns a value, which is zero in the child and equal to the child's PID (Process IDentifier) in the parent. Using the returned PID, the two processes can see which one is the parent process and which one is the child process. In most cases, after a fork, the child will need to execute ____ code from the parent. Consider the case of the shell. It reads a command from the terminal, forks off a child process, waits for the child to execute the command, and then reads the next command when the child terminates. To wait for the child to finish, the parent executes a ____ system call, which just waits until the child terminates (any child if more than one exists). _____ can wait for a specific child, or for any old child by setting the first parameter to −1. When this completes, the address pointed to by the second parameter, statloc, will be set to the child process' exit status (normal or abnormal termination and exit value). Various options are also provided, specified by the third parameter. For example, returning immediately if no child has already exited. Now consider how fork is used by the shell. When a command is typed, the shell forks off a new process. This child process must execute the ___ command. It does this by using the ____ system call, which causes its entire core image to be replaced by the file named in its first parameter.

mount, root, umount

_______: system call that allows 2 file systems to be merged into one. A common situation is to have the root file system, containing the binary (executable) versions of the common commands and other heavily used files, on a hard disk (sub)partition and user files on another (sub)partition. Further, the user can then insert a USB disk with files to be read By executing the mount system call, the USB file system can be attached to the ____ file system mount("/dev/sdb0", "/mnt", 0); where the first parameter is the name of a block special file for USB drive 0, the second parameter is the place in the tree where it is to be mounted, and the third parameter tells whether the file system is to be mounted read-write or read-only. After the mount call, a file on drive 0 can be accessed by just using its path from the root directory or the working directory, without regard to which drive it is on. In fact, second, third, and fourth drives can also be mounted anywhere in the tree. The mount call makes it possible to integrate removable media into a single integrated file hierarchy, without having to worry about which device a file is on. Although this example involves CD-ROMs, portions of hard disks (often called partitions or minor devices) can also be mounted this way, as well as external hard disks and USB sticks. When a file system is no longer needed, it can be unmounted with the ____ system call.

address space

a list of memory locations from 0 to some maximum, which the process can read and write. contains the executable program, the program's data, and its stack.

GPU (Graphics Processing Unit), not likely

a processor with, literally, thousands of tiny cores. They are very good for many small computations done in parallel, like rendering polygons in graphics applications. They are not so good at serial tasks. They are also hard to program. While they can be useful for operating systems (e.g., encryption or processing of network traffic), it is ____ that much of the operating system itself will run on them.

job

a program or set of programs

UNIX, POSIX, Linux

began as a stripped-down, one-user version of MULTICS 2 major versions were originally developed: System V, from AT&T, and BSD (Berkeley Software Distribution) from UCBerkeley To make it possible to write programs that could run on any UNIX system, IEEE developed a standard for UNIX, called ___, that most versions of UNIX now support and defines a minimal system-call interface that conformant UNIX systems must support. The desire for a free production (as opposed to educational) version of MINIX led a Finnish student, Linus Torvalds, to write ____.

BIOS (Basic Input Out- put System), BIOS, BIOS, BIOS,

booting the computer process: Every PC contains a motherboard and on it (held in a flash RAM) is the program ____which contains low-level I/O software, including procedures to read the keyboard, write to the screen, and do disk I/O, etc When the computer is booted, the ___ is started. It first checks to see how much RAM is installed and whether the keyboard and other basic devices are installed and responding correctly. It starts out by scanning the PCIe and PCI buses to detect all the devices attached to them. If the devices present are different from when the system was last booted, the new devices are configured. The _____ then determines the boot device by trying a list of devices stored in the CMOS memory. Typically, an attempt is made to boot from a CD-ROM (or sometimes USB) drive, if one is present. If that fails, the system boots from the hard disk. The first sector from the boot device is read into memory and executed. This sector contains a program that normally examines the partition table at the end of the boot sector to determine which partition is active. Then a secondary boot loader is read in from that partition. This loader reads in the operating system from the active partition and starts it. The operating system then queries the ____ to get the configuration information. For each device, it checks to see if it has the device driver. If not, it asks the user to insert a CD-ROM containing the driver (supplied by the device's manufacturer) or to download it from the Internet. Once it has all the device drivers, the operating system loads them into the kernel. Then it initializes its tables, creates whatever background processes are needed, and starts up a login program or GUI.

subsystem, independent, device drivers,

every operating system has an I/O ____ for managing its I/O devices. Some of the I/O software is device _____ (meaning it applies to many or all I/O devices equally well) Other parts of it, such as ___ ___, are specific to particular I/O devices.

pipeline

facility for executing more than one instruction at the same time. For example, a CPU might have separate fetch, decode, and execute units, so that while it is executing instruction n, it could also be decoding instruction n + 1 and fetching instruction n + 2. Longer ones are common In most of these designs, once an instruction has been fetched into this, it must be executed, even if the preceding instruction was a conditional branch that was taken.

pipe, advance, output, file, pipe

important concept in UNIX a sort of pseudofile that can be used to connect two processes If processes A and B wish to talk using this, they must set it up in ____. When process A wants to send data to process B, it writes on this as though it were an ____ file. In fact, the implementation of this is very much like that of a ___. Process B can read the data by reading from this as though it were an input file. Thus, communication between processes in UNIX looks very much like ordinary file reads and writes. Stronger yet, the only way a process can discover that the output file it is writing on is not really a file, but a _____, is by making a special system call.

special file, system calls, block, character,

important concept in UNIX provided in order to make I/O devices look like files. That way, they can be read and written using the same ______ ___ as are used for reading and writing files. Two kinds of special files exist: 1) ___ special files: used to model devices that consist of a collection of randomly addressable blocks, such as disks. By opening a block special file and reading, say, block 4, a program can directly access the fourth block on the device, without regard to the structure of the file system contained on it. 2) ___ special files. used to model printers, modems, and other devices that accept or output a character stream. By convention, the special files are kept in the /dev directory. For example, /dev/lp might be the printer (once called the line printer).

mounted file system, main, mount, mount, root, single

important concept in UNIX To provide an elegant way to deal with removable media, UNIX allows the file system on the optical disc to be attached to the ____ tree. Before the ____ call, the root file system, on the hard disk, and a second file system, on a CD-ROM, are separate and unrelated. However, the file system on the CD-ROM cannot be used, because there is no way to specify path names on it. UNIX does not allow path names to be prefixed by a drive name or number; that would be precisely the kind of device dependence that operating systems ought to eliminate. Instead, the ____ system call allows the file system on the CD-ROM to be attached to the ____ file system wherever the program wants it to be. In Fig. 1-15(b) the file system on the CD-ROM has been mounted on directory b, thus allowing access to files /b/x and /b/y. If directory b had contained any files, they would not be accessible while the CD-ROM was mounted, since /b would refer to the root directory of the CD-ROM. (Not being able to access these files is not as serious as it at first seems: file systems are nearly always mounted on empty directories.) If a system contains multiple hard disks, they can all be mounted into a _____ tree as well.

process, address space, resources, registers

is basically a program in execution is fundamentally a container that holds all the information needed to run a program. Associated with each of these is its ______, a list of memory locations from 0 to some maximum, which it can read and write and contains the executable program, the program's data, and its stack. Also associated with each of these is a set of ____, commonly including ____ (including the program counter and stack pointer), a list of open files, outstanding alarms, lists of related processes, and all the other information needed to run the program.

operating system, abstract, managing

layer of software whose job is to provide user programs with a better, simpler, cleaner, model of the computer and to handle managing all the resources is there to manage all the pieces of a complex system provides for an orderly and controlled allocation of the processors, memories, and I/O devices among the various programs wanting them. primary task is to keep track of which programs are using which resource, to grant resource requests, to account for usage, and to mediate conflicting requests from different programs and users. provide 2 functions: give application programmers a clean ___ set of resources instead of the messy hardware ones and _____ these hardware resources.

virtual memory

makes it possible to run programs larger than physical memory by placing them on the disk and using main memory as a kind of cache for the most heavily executed parts. This scheme requires remapping memory addresses on the fly to convert the address the program generated to the physical address in RAM where the word is located. This mapping is done by a part of the CPU called the MMU (Memory Management Unit)

registers, cache, main memory (RAM, core memory), magnetic disk

memory hierarchy? organized from small size but fast to large size but slow

PSW (Program Status Word)

one of the several special registers that are visible to the programmer contains the condition code bits, which are set by comparison instructions, the CPU priority, the mode (user or kernel), and various other control bits. User programs may normally read all of this but typically may write only some of its fields. This plays an important role in system calls and I/O.

program counter

one of the several special registers that are visible to the programmer contains the memory address of the next instruction to be fetched. After that instruction has been fetched, the ____ is updated to point to its successor.

stack pointere

one of the several special registers that are visible to the programmer points to the top of the current stack in memory. The stack contains one frame for each procedure that has been entered but not yet exited. A procedure's stack frame holds those input parameters, local variables, and temporary variables that are not kept in registers.

registers, interrupt controller, pin, bus

process for I/O: 1) the driver tells the controller what to do by writing into its device ____. The controller then starts the device. 2) When the controller has finished reading or writing the number of bytes it has been told to transfer, it signals the _____ ____ chip using certain bus lines. 3) If the interrupt controller is ready to accept the interrupt (which it may not be if it is busy handling a higher-priority one), it asserts a ____ on the CPU chip telling it 4) the interrupt controller puts the number of the device on the ____ so the CPU can read it and know which device has just finished (many devices may be running at the same time).

extended machine

provide the users with abstractions that are more con- venient to use than the actual machine

mainframe

room-sized computers still found in major corporate data centers. has a high I/O capacity, can have 1000 disks and millions of gigabytes of data are now used as high-end Web servers, servers for large-scale electronic commerce sites, and servers for business-to-business transactions.

protection code, rwx, search permission, absent

the OS must manage the system security so that files, for example, are accessible only to authorized users. Files in UNIX are protected by assigning each one a 9-bit binary ____ ____ which consists of three 3-bit fields, one for the owner, one for other members of the owner's group (users are divided into groups by the system administrator), and one for everyone else. Each field has a bit for READ access, a bit for WRITE access, and a bit for EXECUTE access. These 3 bits are known as the ___ bits. For example, the protection code rwxr-x--x means that the owner can read, write, or execute the file, other group members can read or execute (but not write) the file, and everyone else can execute (but not read or write) the file. For a directory, a letter there indicates _____ ____. A dash means that the corresponding permission is ____. In addition to file protection, there are many other security issues. Protecting the system from unwanted intruders, both human and nonhuman (e.g., viruses) is one of them

multithreading (hyperthreading), multithreaded, less efficient

the x86 processor and several other CPU chips such as the SPARC, the Power5, the Intel Xeon and the Intel Core family have this allows the CPU to hold the state of two different threads and then switch back and forth on a nanosecond time scale. For example, if one of the processes needs to read a word from memory (which takes many clock cycles), a ____ CPU can just switch to another thread. This does not offer true parallelism. Only one process at a time is running, but thread-switching time is reduced to the order of a nanosecond. This has implications for the operating system because each thread appears to the operating system as a separate CPU. Consider a system with two actual CPUs, each with two threads. The operating system will see this as four CPUs. If there is only enough work to keep two CPUs busy at a certain point in time, it may inadvertently schedule two threads on the same CPU, with the other CPU completely idle. This choice is far _____ than using one thread on each CPU.

busy waiting, interrupt, DMA (Direct Memory Access) chip

what are the 3 methods for doing I/O? 1) ____: a user program issues a system call, which the kernel then translates into a procedure call to the appropriate driver. The driver then starts the I/O and sits in a tight loop continuously polling the device to see if it is done (usually there is some bit that indicates that the device is still busy). When the I/O has completed, the driver puts the data (if any) where they are needed and returns. The operating system then re- turns control to the caller. Has the disadvantage of tying up the CPU polling the device until it is finished. 2)_____: the driver starts the device and asks it to give it THIS when it is finished. At that point the driver returns. The operating system then blocks the caller if need be and looks for other work to do. When the controller detects the end of the transfer, it generates THIS to signal completion. 3) ___: makes use THIS special hardware that can control the flow of bits between memory and some controller without constant CPU intervention. The CPU sets up THIS, telling it how many bytes to transfer, the device and memory addresses involved, and the direction, and lets it go. When THIS is done, it causes an interrupt, which is handled as described above.

prompt, terminal, child, wait, command

what the shell does: 1) display ____ on the screen 2) read input from ____ 3) fork off ___ process 4) ___ for child to exit 5) execute ____ 6) repeat forever


Ensembles d'études connexes

CHP 12: Small Business Accounting: Projecting and Evaluating Performance

View Set

chapter 4 quiz: taxes, retirement plans, and Social Security

View Set

chapter 26- Safety , Emergency preparedness

View Set

930 Unit 6 Part 2 Module 16 Lesson 1-3 Review

View Set

Life Insurance - Section 1 - General Insurance

View Set

Strategic Management: Chapter 13

View Set