C191-Terms-Chapter-1-2 Flashcards

1
Q

Operating System (OS)

A

The software runs on the bare hardware of a computer and provides essential support for users to develop and use applications in the most efficient and safe manner.

An OS provides an environment for the execution of programs. It makes certain services available to programs and to the users of those programs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the goals of the OS?

A

Execute user programs and make solving user problems easier.

Make the computer system convenient to use.

Use the computer hardware in an efficient manner.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the four components of a computer system?

A
  1. Hardware (lowest level) - provides basic computing resources such as CPU, memory, and I/O devices.
  2. OS - controls and coordinates the use of the hardware among applications and users.
  3. Application Programs - define the ways in which the system resources are used to solve the computing problems of the users. These include Word processors, compilers, web browsers, database systems, and video games.
  4. Users - people, machines, and other computers.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The OS as a resource manager

A
  1. Manages all resources.
  2. Decide between conflicting requests for efficient and fair resource use.

One of the main tasks of an OS is to optimize the use of all computational resources to ensure good overall performance, while satisfying the requirements of specific applications, including guaranteeing acceptable response times for interactive processes, meeting deadlines of time-critical tasks, and allowing safe communication among different tasks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The OS is a control program

A

The OS controls the execution of programs to prevent errors and improper use of the computer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Bootstrap Program

A

It’s loaded at power-up or reboot.
- First program to run when the computer
powers on, which then loads the OS.
- Typically stored in ROM or EPROM, generally known as firmware.
- Initializes all aspects of the system.
- Loads the OS kernel and starts execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Computer-system operation

A

One or more CPUs and device controllers connect through a common bus providing access to shared memory.

Concurrent execution of CPUs and devices competing for memory cycles.

The CPU and device controllers can run concurrently and compete for memory cycles.

I/O devices and the CPU can execute concurrently.

Each device controller is in charge of a specific device type.

Each device controller has a local buffer.

The CPU moves data from/to main memory to/from local buffers.

I/O is from the device to the local buffer of the controller.

The device controller informs the CPU that it has finished its operation by causing an
interrupt.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Interrupts

A

An interrupt is an event that diverts the current execution of a program to a predefined location in the kernel in order to respond to an event.

An interrupt is triggered by a hardware signal sent to the CPU from an external device.

The two most common uses of interrupts are as follows:

  1. Signal to the OS for the completion of an I/O operation. The interrupt is generated by the I/O device.
  2. Implement time-sharing by periodically switching the CPU among multiple concurrent computations. The interrupt is generated by a countdown timer.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Common Functions of Interrupts

A

Interrupt transfers control to the interrupt service routine generally, through the interrupt vector, which contains the addresses of all the service routines.

Interrupt architecture must save the address of the interrupted instruction.

Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt.

A trap is a software-generated interrupt caused either by an error or a user request.

An OS is interrupt driven.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Interrupt Handler

A

A kernel function invoked whenever an interrupt occurs determines the cause of the interrupt and invokes the appropriate kernel function to provide the response.

When the kernel function completes the requested service, the state of the interrupted computation is restored and control is returned to the instruction following the interrupt.

The handling of an interrupt is thus completely transparent to the interrupted computation and provides an immediate response to asynchronous events.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Interrupt Handling

A

The OS preserves the state of the CPU by storing registers and the program counter.

Determines which type of interrupt has occurred:
- Polling
- Vectored interrupt system

Separate segments of code determine what action should be taken for each type of interrupt.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

I/O Structure

A

After I/O starts, control returns to the user program only upon I/O completion. This I/O method is called synchronous.
- Wait instruction idles the CPU until the next attempt.
- Wait loop (contention for memory access).
- At most one I/O request is outstanding at a time, no simultaneous I/O processing.

After I/O starts, control returns to the user program without waiting for I/O completion. This I/O method is called asynchronous.
- System call: request to the OS to allow the user (to do something) to wait for I/O completion.
- Device- status table: contains an entry for each I/O device indicating its type, address, and state.
- The OS indexes into the I/O device table to determine device status and to modify table entry to include interrupt.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

I/O Storage

A

Main memory - the only large storage media that the CPU can access directly.

Secondary storage - an extension of the main memory that provides large nonvolatile storage capacity.

Magnetic disks - rigid metal or glass platters covered with magnetic recording material.
- Disk surface is logically divided into tracks, which are subdivided into sectors.
- The disk controller determines the logical interaction between the device and the computer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

CPU

A

Hardware capabilities - machine instructions perform operations on contents of registers and memory locations.

User needs - The user thinks in terms of
arrays, lists, and other high-level data structures accessed and
manipulated by corresponding high-level operations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Main memory

A

Hardware capabilities - physical memory is a linear sequence of addressable bytes or words that hold programs and data.

User needs - the user must manage a heterogeneous collection of entities of various types and sizes, including source and executable programs, library functions, and dynamically allocated data structures, each accessed by different operations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Secondary storage

A

Hardware capabilities - disks and other secondary storage devices are multi-dimensional structures, which require complex sequences of low-level operations to store and access data organized in discrete blocks.

User needs - the user needs to access and
manipulate programs and data sets of various sizes as individual named entities without any knowledge of the disk organization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

I/O devices

A

Hardware capabilities - I/O devices are operated by reading and writing registers of the device controllers.

User needs - the user needs simple, uniform interfaces to access different devices without detailed knowledge of the access and communication protocols.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Abstraction

A

Abstraction is the act of removing unimportant details or attributes of objects in order to construct more general and less complex objects.

OSs make extensive use of abstraction by creating hierarchies of objects where multiple operations at one level are
combined into a single operation at a higher level, thus hiding the details of the implementation and making the operation easier to use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Virtualization

A

Virtualization is the act of creating the illusion of having one or more objects with more desirable characteristics than the real object.

OSs rely on virtualization to create virtual CPUs, memory, I/O devices, and other system components that facilitate the work of programmers and users.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Abstraction and Virtualization

A

The concepts of abstraction and virtualization are closely related. Abstraction emphasizes combining simpler objects or operations to create objects with expanded functionality.

Virtualization may use abstraction but emphasizes diversifi cation and replication by creating illusions of objects with more favorable characteristics.

An OS is thus an extended machine, which provides e fficient high-level functions and virtual entities that liberate the programmer and the user from having to understand details of memory, disk, I/O management, and other internal processes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Multiprogramming

A

A technique that keeps several programs active in memory and switches execution among the different programs to maximize the use of the CPU and other resources.

Whenever a program enters an I/O-bound phase where little CPU time is needed, other programs can resume and utilize the CPU in the meantime.

Similarly, whenever a device completes an operation, the OS activates computations that can utilize the now available device.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Time-sharing (multitasking)

A

An extension of multiprogramming where the CPU is switched periodically among all active computations to guarantee acceptable response times to each user.

Time-sharing employs the concept of virtualization by creating the illusion of having a separate virtual CPU for each computation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Kernel

A

The min set of functions that is necessary to manage the system resources safely and efficiently.

The kernel provides the most essential services for memory and device management, creating and managing units of computation, and communication among the different concurrent activities within the system.

The functionality of the kernel is extended by a set of libraries, which use kernel functions to implement higher-level system functions.

Additional libraries provide a wide range of other services to the users by supporting abstractions above the system calls. Applications and system software, including editors, compilers, and interpreters, form the highest layer of software.

Depending on the type of application or service, software at the top level may use library services, issue system calls, or invoke kernel services directly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Privileged instruction

A

Performs critical operations that access I/O devices and the CPU’s status and control registers. Thus only the OS kernel is allowed to execute privileged instructions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Kernel mode

A

The CPU state where both privileged and non-privileged instructions may be used.

Any attempt to execute a privileged instruction in user mode automatically transfers control to the kernel.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

User mode

A

The CPU state where only non-privileged instructions may be used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

GUI or Graphical User Interface

A

Presets various icons on the screen, which the user can click on in different ways to invoke services associated with the icons, or to reveal pull-down menus for additional tasks.

The main advantage of a GUI is the intuitive visual representation of objects. A user is able to manipulate objects and invoke operations using a mouse without much training and without any knowledge of the underlying commands.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

OS Shell

A

A command interpreter that accepts and interprets textual commands issued by the user via a keyboard.

Any shell offers dozens of commands, each having various optional parameters, fags, and other modifiers to provide a wide spectrum of operations.

Common Windows commands:
DIR - displays a list of files and subdirectories in a directory (folder).
COPY - Copy one or more files to another location.
WC - Count the number of words, lines, and characters in a text file.
DEL - Delete one or more files

A shell is preferred by programmers and expert users because text-based commands are more flexible than icons by providing a range of parameters and control flags to modify each command.

Multiple commands can be combined using conditional, iterative, and logic constructs to handle complex tasks e efficiently. Ex: any number of files of different types can be moved, renamed, or selectively copied in a single loop.

The user can create and save higher-level operations following the principles of abstraction.
- A shell script is a program that implements a new operation by combining multiple commands and control statements into one named unit interpreted by the shell.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Shell script

A

A program that implements a new operation by combining multiple commands and control statements into one named unit interpreted by the shell.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

System call

A

A request from an application for an OS service. A system call is implemented as a library function, which sets up the necessary parameters for the requested operation and issues a corresponding supervisor call.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Supervisor call or kernel call

A

A privileged instruction that automatically transfers execution control to a well-de ned location within the OS kernel. Thus supervisor calls provide the interface between the OS kernel and the higher-level software.

A supervisor call is similar to a function call with two special features:
1. The call switches execution from user mode to kernel mode by setting the mode bit in the CPU.

2.To prevent a call from branching to arbitrary locations within the kernel, the function to be invoked is not specified by an address but indirectly using an index into a
branch vector.

Thus kernel-mode execution is limited to only well-de ned entry points within the kernel.

When the kernel function terminates, control is returned to the invoking library function in user mode. Control may return immediately or may be delayed by blocking the invoking computation to await the completion of some event.

The system call library function then returns control to the application, also in user mode.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Execution of a system call

A
  1. An application, running in user mode, executes a system call S() to request a service from the OS.
  2. Execution transfers to the library function S(), still in user mode.
  3. S sets up the parameters for the service and executes the privileged
    instruction supervisor_call. The parameter k identifies the kernel function using a branch vector in the kernel.
  4. Execution transfers to the kernel function in kernel mode, which allows the
    CPU to use privileged instructions.
  5. When the kernel function completes the requested service, execution
    returns to the system call function S in user mode.
  6. The system call function completes the request and returns to the
    application at the instruction following S().
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Trap or internal interrupt

A

An interrupt triggered by the currently executing instruction. Dividing by zero, executing an invalid opcode, or causing an arithmetic overflow are all errors, which result in a trap and cause the OS to abort the current program execution.

Executing a supervisor call instruction is not an error but also causes a trap since the main purpose is to transfer control to the kernel when requesting a service.

An interrupt, both external and internal, stops the execution of the current program, saves the state of the computation, and transfers control to the kernel.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Moore’s law

A

Formulated by the scientist Gordon Moore, is the observation that the number of transistors in an integrated circuit doubles about every two years. This prediction has held steady since the mid-1960s until today.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

First-generation-computers

A

Used vacuum tubes.
No OS type.
All programming was done by experts in machine language without any support from an OS or any other system software.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

Second-generation-computers

A

Transistors replaced vacuum tubes as smaller and faster switches.

Batch OS.

Programs were submitted in batches of punch cards. The role of the OS was to automate the compilation, loading, and execution of programs.

Multiprogramming was developed, which allows the OS to schedule the execution of jobs to make more efficient use of the CPU and other resources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

Third-generation-computers

A

Integrated circuits allowed the development of microchips to replace individual transistors.

Interactive multi-user OS.

Interrupts were developed to allow the OS to enforce time-sharing and to interact with keyboards and display terminals, also developed during the same period.

Increased capacity and speed of memory and secondary storage devices imposed additional management tasks on the OS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

Fourth-generation-computers

A

Very-large-scale integration (VLSI) allowed the placement of a complete microprocessor on a single chip, leading to the development of personal computers (PCs).

Desktops and laptops OS.

The OS was responsible for all operations, starting from the initial booting to multitasking, scheduling, interactions with various peripheral devices, and keeping all information safe.

The emphasis was on user-friendliness, including the introduction of the GUI.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

Fifth-generation-computers

A

Networking hardware enabled the harnessing of the power of multiple computers.

OSs for supercomputers, distributed systems, and mobile devices.

The ability to create powerful chips led to several directions of development. Supercomputers combined large numbers of processors and made the OS and other software responsible for exploiting the increased computation power through parallel processing.

Computer networks gave rise to the Internet, which imposed privacy and safety requirements along with efficient communication.

Wireless networks led to the development of hand-held devices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

Mainframe

A

A large central computer used by large organizations.

High-volume data processing in administration, banking, and government.

High throughput, management of large storage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

Server

A

A large computer that responds to requests from individual clients.

Web and email processing, Internet commerce.

Fast response, security.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

Multiprocessor

A

A system of multiple CPUs and memories interconnected by a fast network into a single parallel computer.

Scienti c and other high-performance computations.

Fast interprocess communication and memory access. Data consistency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

Distributed system (multi-computer)

A

A network of independent computers interconnected via a communication network.

Sharing of data and services, internet commerce.

Efficient and secure communication. Support for many types of applications and services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

Desktop or laptop

A

A personal computer.

Word processing, personal nance, access to the Internet, games.

User-friendly interface. Intuitive organization of data and applications. Support for a variety of tasks without much technical knowledge of the inner functioning of the computer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

Hand-held device

A

Small, portable, wireless-capable device for personal use.

Smartphones, tablets.

User-friendly interface.Easy integration of new applications. Support for microphone, speaker, camera, GPS, motion sensor, and other components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

Real-time system

A

A computer, frequently embedded in a larger electro-mechanical system, must respond rapidly to external events.

Control of industrial processes, vehicle and aircraft control, and audio and video transmission.

Scheduling to meet all deadlines. Reliability in life-critical applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

Sensor network

A

A collection of small, spatially distributed dedicated sensors communicating by wired or wireless connections.

Industrial, environmental, or military monitors. Wearable devices.

Minimize power consumption. Form ad- hoc connections and tolerate node failures.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

System bus

A

Provides access between different system components and shared memory.

In a communication system; e.g., within a computer, a bus connects various components, such as the CPU and I/O devices, allowing them to transfer data and commands.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

Device driver

A

An OS component that provides uniform access to various devices and manages I/O to those devices.

OSs have a device driver for each device controller. This device driver understands the device controller and provides the rest of the operating system with a uniform interface to the device.

The CPU and the device controllers can execute in parallel, competing for memory cycles.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

Device controller

A

Each device controller is in charge of a specific type of device (for example, a disk drive, audio device, or graphics display).

Depending on the controller, more than one device may be attached. For instance, one system USB port can connect to a USB hub, to which several devices can connect.

A device controller maintains some local buffer storage and a set of special-
purpose registers.

The device controller is responsible for moving the data between the peripheral devices that it controls and its local buffer storage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

A program performing I/O

A

To start an I/O operation, the device driver loads the correct registers in the device controller.

The device controller, in turn, examines the contents of these registers to determine what action to take (such as “read a character from the keyboard”).

The controller starts the transfer of data from the device to its local buffer. Once the transfer of data is complete, the device controller informs the device driver that it has finished its operation.

The device driver then gives control to other parts of the operating system, possibly returning the data or a pointer to the data if the operation was a read.

The device controller informs the device driver it has finished its operation via an interrupt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

Interrupt overview

A

Hardware may trigger an interrupt at any time by sending a signal to the CPU, usually by way of the system bus.

(There may be many buses within a computer system, but the system bus is the main communication path between the major components.)

Interrupts are used for many other purposes as well and are a key part of how operating systems and hardware interact.

When the CPU is interrupted, it stops what it is doing and immediately transfers execution to a fixed location.

The fixed location usually contains the starting address where the service routine for the interrupt is located.

The interrupt service routine executes; on completion, the CPU resumes the interrupted computation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

Common interrupt mechanisms

A

The interrupt must transfer control to the correct interrupt service routine. The simple method for managing this transfer would be to invoke a generic routine to examine the interrupt information.

The routine would then call the interrupt-specific handler. But interrupts occur very often so they must be handled quickly.

A table of pointers to interrupt routines can be used instead to provide the needed speed. The interrupt routine is called indirectly through the table, with no intermediate routine needed.

These locations hold the addresses of the interrupt service routines for the various devices.

This array, or interrupt vector, of addresses is then indexed by a unique number, given with the interrupt request, to provide the address of the interrupt service routine for the interrupting device.

Operating systems as different as Windows and UNIX dispatch interrupts in this manner.

The interrupt architecture must also save the state info of whatever was interrupted so that it can restore it after servicing the interrupt.

If the interrupt routine needs to modify the processor state—for instance, by modifying register values—it must save the current state and then restore that state before returning.

After the interrupt is serviced, the saved return address is loaded into the program counter, and the interrupted computation resumes as though the interrupt had not occurred.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

Interrupt-request line

A

The hardware connection to the CPU on which interrupts are signaled.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

Interrupt-handler routine

A

An operating system routine that is called when an interrupt signal is received.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

Basic interrupt mechanism

A

The CPU hardware senses the interrupt-request line after executing every instruction.

When it detects that a controller has asserted a signal on the request line, it reads the interrupt and jumps to the interrupt-handler routine by using the interrupt number as an index into the interrupt vector.

It then starts execution at the address associated with that index. The interrupt handler saves any state that it’ll change during its operation, determines the cause of the interrupt, performs the needed processing, performs a state restore, and executes a return_from_interrupt instruction to return the CPU to the execution state prior to the interrupt.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

Interrupt-handling features for modern computers

A
  1. We need the ability to defer interrupt handling during critical processing.
  2. We need an efficient way to dispatch to the proper interrupt handler for a device.
  3. We need multilevel interrupts so that the operating system can distinguish between high- and low-priority interrupts and can respond with the appropriate degree of urgency.

In modern computer hardware, these three features are provided by the CPU and the
interrupt-controller hardware.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

Nonmaskable interrupt

A

Reserved for events such as unrecoverable memory errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

Maskable interrupt

A

It can be turned off by the CPU before the execution of critical instruction sequences that must not be interrupted.

The maskable interrupt is used by device controllers to request service.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

Interrupt chaining

A

A mechanism by which each element in an interrupt vector points to the head of a list of interrupt handlers, which are called individually until one is found to service the interrupt request.

This structure is a compromise between the overhead of a huge interrupt table and the inefficiency of dispatching to a single interrupt handler.

Computers have more devices (and, hence, interrupt handlers) than they have address elements in the interrupt vector. A common way to solve this problem is to use interrupt chaining

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

Interrupt priority levels

A

These levels enable the CPU to defer the handling of low-priority interrupts without masking all interrupts and make it possible for a high-priority interrupt to preempt the execution of a low-priority interrupt.

Interrupts are used throughout modern operating systems to handle asynchronous events.

Device controllers and hardware faults raise interrupts. To enable the most urgent work to be done first, modern computers use a system of interrupt priorities.

Because interrupts are used so heavily for time-sensitive processing, efficient interrupt handling is required for good system performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

RAM or random-access memory

A

The CPU can load instructions only from memory, so any programs must first be loaded into memory to run.

General-purpose computers run most of their programs from rewritable memory, called main memory (also called random-access memory, or RAM).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

DRAM or dynamic-access memory

A

Main memory commonly is implemented in a semiconductor technology called DRAM.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

Volatile

A

Memory storage that loses its content when power is turned off or otherwise lost.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

Firmware

A

Storage that is infrequently written to and is nonvolatile. EEPROM can be changed but cannot be changed frequently. Additionally, it’s slow speed, so it contains mostly static programs and data that aren’t frequently used.

For example, the iPhone uses EEPROM to store serial numbers and hardware information about the device.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

Bit

A

The basic unit of computer storage. A bit can contain one of two values, 0 and 1. All other storage in a computer is based on collections of bits.

Given enough bits, it is amazing how many things a computer can represent: numbers, letters, images, movies, sounds, documents, and programs, to name a few.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
67
Q

Byte

A

8 bits, and on most computers, it is the smallest convenient chunk of storage. Each byte has its own address.

Interaction is achieved through a sequence of load or store instructions to specific memory addresses.

For example, most computers don’t have an instruction to move a bit but do have one to move a byte.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
68
Q

Word

A

A given computer architecture’s native unit of data. A word is made up of one or more bytes.

For example, a computer that has 64-bit registers and 64-bit memory addressing typically has 64-bit (8-byte) words.

A computer executes many operations in its native word size rather than a byte at a time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
69
Q

Load instruction

A

Moves a byte or word from main memory to an internal register within the CPU.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
70
Q

Store instruction

A

Moves the content of a register to the main memory.

Aside from explicit loads and stores, the CPU automatically loads instructions from main memory for execution from the location stored in the program counter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
71
Q

von Neumann architecture

A

The structure of most computers, which both process instructions and data are stored in the same main memory.

An instruction-execution cycle, as executed on a system with a von Neumann architecture, first fetches an instruction from memory and stores that instruction in the instruction register.

The instruction is then decoded and may cause operands to be fetched from memory and stored in some internal register. After the instruction on the operands has been executed, the result may be stored back in memory.

The memory unit sees only a stream of memory addresses. It doesn’t know how they’re generated or what they’re for.

Thus, we can ignore how a memory address is generated by a program. We’re only interested in the sequence of memory addresses generated by the running program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
72
Q

Secondary storage

A

An extension of main memory. The main requirement for secondary storage is that it is able to hold large quantities of data permanently.

The most common secondary-storage devices are hard-disk drives (HDDs) and nonvolatile memory (NVM) devices, which provide storage for both programs and data.

Most programs (system and application) are stored in secondary storage until they are loaded into memory.

Secondary storage is also much slower than main memory. Hence, the proper management of secondary storage is of central importance to a computer system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
73
Q

Tertiary storage

A

A type of storage that is slower and cheaper than main memory or secondary storage; frequently magnetic tape or optical disk.

Often used for special purposes such as storing backup copies of material stored on other devices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
74
Q

Semiconductor memory

A

The top four levels of memory including registers, cache, main memory, and NVM are constructed using semiconductor memory, which consists of semiconductor-based electronic circuits.

NVM devices, at the fourth level, have several variants but in general, are faster than hard disks.

The most common form of NVM device is flash memory, which is popular in mobile devices such as smartphones and tablets. Increasingly, fl ash memory is being used for long-term storage on laptops, desktops, and servers as well.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
75
Q

NVM or nonvolatile memory

A

Nonvolatile storage retains its contents when power is lost. This type of storage can be classified into two distinct types:

Mechanical. Examples of such storage systems are HDDs, optical disks, holographic storage, and magnetic tape.

Electrical. Examples of such storage systems are flash memory, FRAM, NRAM, and SSD.

Mechanical storage is generally larger and less expensive per byte than electrical storage. Conversely, electrical storage is typically costly, smaller, and faster than mechanical storage.

The design of a complete storage system must balance all the factors just discussed: it must use only as much expensive memory as necessary while providing as much inexpensive, nonvolatile storage as possible.

Caches can be installed to improve performance where a large disparity in access time or transfer rate exists between two components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
76
Q

Direct memory access (DMA)

A

A resource-conserving and performance-improving operation for device controllers allowing devices to transfer large amounts of data directly to and from main memory.

The form of interrupt-driven I/O described in Section Interrupts is fine for moving small amounts of data but can produce high overhead when used for bulk data movement such as NVS I/O.

To solve this problem, direct memory access (DMA) is used. After setting up buffers, pointers, and counters for the I/O device, the device controller transfers an entire block of data directly to or from the device and main memory, without CPU intervention.

Only one interrupt is generated per block, to tell the device driver that the operation has completed, rather than the one interrupt per byte generated for low-speed devices.

While the device controller is performing these operations, the CPU is available to accomplish other work.

Some high-end systems use switch rather than bus architecture. On these systems, multiple components can talk to other components concurrently, rather than competing for cycles on a shared bus. In this case, DMA is even more effective.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
77
Q

Interrupt vector

A

An operating-system data structure indexed by interrupt address and pointing to the interrupt handlers.

A kernel memory data structure that holds the addresses of the interrupt service routines for the various devices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
78
Q

Hard disk drive (HDD)

A

A secondary storage device based on mechanical components, including spinning magnetic media platters and moving read-write heads.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
79
Q

Devices

A

Persistent storage based on circuits and electric charges.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
80
Q

Nonvolatile memory (NVM)

A

Persistent storage based on circuits and electric charges.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
81
Q

Portals

A

Gateways between requestors and services running on provider computers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
82
Q

Network computer

A

A limited computer that understands only web- based computing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
83
Q

Thin client

A

A limited computer (terminal) used for web-based computing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
84
Q

Wireless network

A

A communication network composed of radio signals rather than physical wires.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
85
Q

Firewall

A

A computer, appliance, process, or network router that sits between trusted and untrusted systems or devices. It protects a network from security breaches by managing and blocking certain types of communications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
86
Q

Mobile computing

A

A mode of computing involving small portable devices like smartphones and tablet computers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
87
Q

Apple iOS

A

The mobile operating system created by Apple Inc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
88
Q

Google Android

A

The mobile operating system created by Google Inc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
89
Q

Server system

A

A system providing services to other computers (e.g., a web server).

90
Q

Client system

A

A computer that uses services from other computers (such as a web client).

91
Q

Client-server model

A

A mode of computing in which a server provides services to one or more clients. In distributed computing, a model in which a computer acts as a resource server to other computers that are clients of those resources.

92
Q

Compute-server system

A

A server that provides an interface to which a client can send a request for an action (e.g., read data). In response, the server executes the action and sends the results to the client.

93
Q

Cloud computing

A

A computing environment in which hardware, software, or other resources are made available to customers across a WAN, such as the Internet, usually with APIs for management.

A type of computing that delivers computing, storage, and even applications “as a service” across a network.

94
Q

Cloud computing

A

A computing environment in which hardware, software, or other resources are made available to customers across
a WAN, such as the Internet, usually with APIs for management.

A type of computing that delivers computing, storage, and even applications “as a service” across a network.

95
Q

Amazon Elastic Compute Cloud (ec2)

A

An instance of cloud computing implemented by Amazon.

96
Q

Public cloud

A

Cloud computing available via the Internet to anyone willing to pay for the services offered.

97
Q

Private cloud

A

Cloud computing run by a company for that company’s own use.

98
Q

Hybrid cloud

A

A type of cloud computing that includes both public and private cloud components.

99
Q

Software as a Service (SaaS)

A

A type of computing in which one or more applications (such as word processors or spreadsheets) are available as a service via the Internet.

100
Q

Platform as a service (PaaS)

A

A software stack ready for application use via the Internet (e.g., a database server).

101
Q

Infrastructure as a service (IaaS)

A

A type of computing in which servers or storage are available over the Internet (e.g, storage available for making backup copies of production data).

102
Q

ASIC or Application-specific integrated circuit

A

An application-speci fic integrated circuit (hardware chip) that performs its tasks without an operating system.

103
Q

Real-time operating systems (RTOS)

A

Systems used when rigid time requirements have been placed on the operation of a processor or the ow of data; often used as control devices in dedicated applications.

104
Q

open-source operating system

A

An operating system or other programs available in source-code format rather than as compiled binary code.

105
Q

closed-source

A

An operating system or other program available only in compiled binary code format.

106
Q

reverse engineering

A

The procedure of converting a compiled binary file into a human-readable format.

107
Q

GNU General Public License (GPL)

A

A license agreement that codifies copylefting (allowing and requiring open sourcing of the associated programs); a common license under which free software is released.

108
Q

GNU/Linux (aka Linux)

A

An open-source operating system composed of components contributed by the GNU foundation and Linus Torvalds, as well as many others.

109
Q

distribution

A

A release of a version of an operating system.

110
Q

LiveCD

A

An operating system that can be booted and run from a CD- ROM (or more generally from any media) without being installed on a system’s boot disk(s).

111
Q

LiveDVD

A

An operating system that can be booted and run from a DVD (or more generally from any media) without being installed on a system’s boot disk(s).

112
Q

UnixBSD

A

A UNIX derivative based on work done at the University of California at Berkeley (UCB).

113
Q

version control system

A

Software that manages software distributions by allowing contributors to “push” changes into a repository and “pull” a version of the software source-code tree to a system (e.g., for compilation).

114
Q

git

A

A version control system used for GNU/Linux and other programs.

115
Q

Solaris

A

A UNIX derivative that is the main operating system of Sun Microsystems (now owned by Oracle Corporation). There is an active open-source version called Illumos.

116
Q

SunOS

A

The predecessor of Solaris by Sun Microsystems Inc.

117
Q

Benefits of virtualization

A

The ability to share the same hardware yet run several diff execution environments (diff OSs) concurrently.

One benefit is that the host system is protected from the VMs, and the VMs are protected from each other. Each VM is almost entirely isolated from all other VMs, there are also no protection issues.

A potential disadvantage of isolation is that it prevents sharing of resources. Two approaches to providing sharing have been implemented. First, it is possible to share a file-system volume and thus to share files.

Second, it is possible to define a network of VMs, each of which can send information over the virtual communications network. The network is modeled after physical communication networks but is implemented in software.

The VMM is free to allow any number of its guests to use physical resources, such as a physical network connection (with sharing provided by the VMM), in which case the allowed guests could communicate with each other via the physical network.

118
Q

suspend

A

One feature common to most virtualization implementations is the ability to freeze, or
suspend, a running virtual machine.

Many operating systems provide that basic feature for processes, but VMMs go one step further and allow copies and snapshots to be made of the guest.

The copy can be used to create a new VM or to move a VM from one machine to another with its current state intact. The guest can then resume where it was, as if on its original machine, creating a clone.

119
Q

snapshot

A

In file systems, a read-only view of a file system at a particular point in time; later changes do not affect the snapshot view.

The snapshot records a point in time, and the guest can be reset to that point if necessary (for example, if a change was made but is no longer wanted).

Often, VMMs allow many snapshots to be taken. For example, snapshots might record a guest’s state every day for a month, making restoration to any of those snapshot states possible. These abilities are used to good advantage in virtual environments.

120
Q

consolidation

A

In virtualization, the practice of running multiple guests per host, reducing the number of physical servers needed for a given workload.

A major advantage of virtual machines in production data-center use is system consolidation, which involves taking two or more separate systems and running them in virtual machines on one system.

Such physical-to-virtual conversions result in resource optimization since many lightly used systems can be combined to create one more heavily used system

121
Q

resume

A

In virtualization, the continuation of execution after a guest’s suspension.

122
Q

clone

A

In file systems, a snapshot that is read-write and modifi able. In virtualization, a copy of a guest that enables another instance of the guest to run in a separate virtual machine.

123
Q

system-development time

A

The time during which an operating system is developed before it is made available in final “release” form.

124
Q

templating

A

In virtualization, using one standard virtual-machine image as a source for multiple virtual machines.

Management tools that are part of the VMM allow system administrators to manage many more systems than they otherwise could.

One of the tools that make this possible is templating, in which one standard VM image, including installed and configured guest OS and applications, is saved and used as a source for multiple running VMs.

Other features include managing the patching of all guests, backing up and restoring the guests, and monitoring their resource use.

125
Q

live migration

A

In virtualization, the movement of a running guest between two separate physical hosts.

126
Q

cloud computing

A

A computing environment in which hardware, software, or other resources are made available to customers across a WAN, such as the Internet, usually with APIs for management.

A type of computing that delivers computing, storage, and even applications “as a service” across a network.

127
Q

remote desktop protocol (RDP)

A

A network protocol to allow remote access to a computer’s display contents and keyboard and mouse input devices.

128
Q

Linux history

A

Linux looks and feels much like any other UNIX system; indeed, UNIX compatibility has been a major design goal of the Linux project.

However, Linux is much younger than most UNIX systems. Its development began in 1991, when a Finnish university student, Linus Torvalds, began creating a small but self-contained kernel for the 80386 processor, the first true 32-bit processor in Intel’s range of PC-compatible CPUs.

Early in its development, the Linux source code was made available free—both at no cost and with minimal distributional restrictions—on the Internet.

As a result, Linux’s history has been one of collaboration by many developers from all around the world, corresponding almost exclusively over the Internet.

129
Q

Linux kernel

A

The operating-system kernel of a Linux system.

Forms the core of the Linux project. it’s composed entirely of code written from scratch specifically for the Linux project.

Much of the supporting software that makes up the Linux system is not exclusive to Linux but is common to a number of UNIX-like operating systems.

In particular, Linux uses many tools developed as part of Berkeley’s BSD operating system, MIT’s X Window System, and the Free Software Foundation’s GNU project.

130
Q

Linux system

A

The kernel, programs, and files that comprise a complete, runnable Linux system.

131
Q

Linux distribution

A

A Linux system plus administrative tools to simplify the installation, upgrading, and management of the system.

132
Q

interprocess communication (IPC)

A

Communication between processes.

133
Q

development kernel

A

A kernel released for developers to use, rather than for production use.

134
Q

production kernels

A

Kernels released for production use (as opposed to development use).

135
Q

GNU C compiler (gcc)

A

The standard C compiler of the GNU project, used throughout the industry on Linux and many other system.

136
Q

File System Hierarchy Standard

A

A standard document specifying the overall layout of the standard Linux fi le systems.

137
Q

Slackware

A

An early but still widely used Linux distribution.

138
Q

Red Hat

A

A popular Linux distribution.

139
Q

Debian

A

A popular Linux distribution.

140
Q

Canonical

A

A popular Linux distribution.

141
Q

SuSE

A

A popular Linux distribution.

142
Q

public domain

A

The total absence of copyright protection. Software in the public domain can be used as desired by anyone, with no limits.

143
Q

User interface

A

An OS service that provides functions that are helpful to the user.

Almost all OSs have a user interface (UI). This interface can take several forms. Most commonly, a graphical user interface (GUI) is used.

Here, the interface is a window system with a mouse that serves as a pointing device to direct I/O, choose from menus, and make selections, and a keyboard to enter text.

Mobile systems such as phones and tablets provide a touch-screen interface, enabling users to slide their fingers across the screen or press buttons on the screen to select choices.

Another option is a command-line interface (CLI), which uses text commands and a method for entering them (say, a keyboard for typing in commands in a specific format with specific options). Some systems provide two or all three of these variations.

144
Q

Program execution

A

An OS service that provides functions that are helpful to the user.

The system must be able to load a program into memory and to run that program. The program must be able to end its execution, either normally or abnormally (indicating error).

145
Q

I/O operations

A

An OS service that provides functions that are helpful to the user.

A running program may require I/O, which may involve a file or an I/O device. For specific devices, special functions may be desired (such as reading from a network interface or writing to a le system).

For efficiency and protection, users usually cannot control I/O devices directly. Therefore, the operating system must provide a means to do I/O.

146
Q

File-system manipulation

A

An OS service that provides functions that are helpful to the user.

The file system is of particular interest. Programs need to read and write files and directories. They also need to create and delete them by name, search for a given file, and list file information.

Some OSs include permission management to allow or deny access to files or directories based on file ownership.

Many OSs provide a variety of file systems, sometimes to allow personal choice and sometimes to provide specific features or performance characteristics.

147
Q

Communications

A

An OS service that provides functions that are helpful to the user.

There are many circumstances in which one process needs to exchange information with another process.

Such communication may occur between processes that are executing on the same computer or between processes that are executing on different computer systems tied together by a network.

Communications may be implemented via shared memory, in which two or more processes read and write to a shared section of memory, or message passing, in which packets of information in predefined formats are moved between processes by the operating system.

148
Q

Error detection

A

An OS service that provides functions that are helpful to the user.

The operating system needs to be detecting and correcting errors constantly.

Errors may occur in the CPU and memory hardware (such as a memory error or a power failure), in I/O devices (such as a parity error on disk, a connection failure on a network, or a lack of paper in the printer), and in the user program (such as an arithmetic over ow or an attempt to access an illegal memory location).

For each type of error, the operating system should take the appropriate action to ensure correct and consistent computing

149
Q

Resource allocation

A

An OS function for ensuring the efficient operation of the system itself.

The operating system manages many different types of resources. Some (such as CPU cycles, main memory, and le storage) may have special allocation code, whereas others (such as I/O devices) may have much more general requests and release code.

150
Q

Logging

A

An OS function for ensuring the efficient operation of the system itself.

We want to keep track of which programs use how much and what kinds of computer resources.

This record-keeping may be used for accounting (so that users can be billed) or simply for accumulating usage statistics.

Usage statistics may be a valuable tool for system administrators who wish to recon figure the system to improve computing services.

151
Q

Protection and security

A

An OS function for ensuring the efficient operation of the system itself.

The owners of info stored in a multiuser or networked computer system may want to control the use of that information.

When several separate processes execute concurrently, it shouldn’t be possible for one process to interfere with the others or with the OS itself.

Protection involves ensuring that all access to system resources is controlled. Security of the system from outsiders is also important.

Such security starts with requiring each user to authenticate himself or herself to the system, usually by means of a password, to gain access to system resources.

It extends to defending external I/O devices, including network adapters, from invalid access attempts and recording all such connections for detection of break-ins.

152
Q

shared memory

A

In interprocess communication, a section of memory shared by multiple processes and used for message passing.

153
Q

message passing

A

In interprocess communication, a method of sharing data in which messages are sent and received by processes.

Packets of information in predefined formats are moved between processes or between computers.

154
Q

command interpreter

A

The operating system component that interprets user commands and causes actions based on them.

155
Q

shell

A

One of the command interpreters on a system with multiple command interpreters to choose from.

156
Q

desktop

A

In a GUI, the standard workspace represented by the GUI on the screen, in which a user executes tasks.

157
Q

folder

A

A file system component that allows users to group files together.

158
Q

gestures

A

A user interface component in which motions cause computer actions (e.g., “pinching” the screen).

159
Q

springboard

A

The iOS touch-screen interface.

160
Q

system administrators

A

Computer users that configure, monitor, and manage systems.

161
Q

shell script

A

A file containing a set series of commands (similar to a batch file) that are specific to the shell being used.

162
Q

command interpreters

A

Allows users to directly enter commands to be performed by the OS.

On systems with multiple command interpreters to choose from, the interpreters are known as shells.

For example, on UNIX and Linux systems, a user may choose among several different shells, including the C shell, Bourne-Again shell, Korn shell, and others.

The main function of the command interpreter is to get and execute the next user-specified command.

Many of the commands given at this level manipulate files: create, delete, list, print, copy, execute, and so on.

163
Q

User-specified command first implementation approach

A

In one approach, the command interpreter itself contains the code to execute the command.

For example, a command to delete a file may cause the command interpreter to jump to a section of its code that sets up the parameters and makes the appropriate system call.

In this case, the number of commands that can be given determines the size of the command interpreter, since each command requires its own implementing code.

164
Q

User-specified command second implementation approach

A

An alternative approach—used by UNIX, among other OSs, implements most commands through system programs.

In this case, the command interpreter doesn’t understand the command in any way; it merely uses the command to identify a file to be loaded into memory and executed. Thus, the UNIX command to delete a file

rm file.txt

would search for a file called rm, load the file into memory, and execute it with the parameter file.txt.

The logic associated with the rm command would be defined completely by the code in the file rm.

In this way, programmers can add new commands to the system easily by creating new files with the proper program logic.

The command-interpreter program, which can be small, does not have to be changed for new commands to be added.

165
Q

System calls

A

Provide an interface to the services made available by an operating system.

Operating systems make their services available to application programmers by system calls.

These calls are generally available as functions written in C and C++, although certain low-level tasks (for example, tasks where hardware must be accessed directly) may have to be written using assembly-language instructions.

166
Q

application programming interface or API

A

The API specifies a set of functions that are available to an application programmer, including the parameters that are passed to each function and the return values the programmer can expect.

Three of the most common APIs available to application programmers are the Windows API for Windows systems, the POSIX API for POSIX-based systems (which include virtually all versions of UNIX, Linux, and macOS), and the Java API for programs that run on the Java virtual machine.

A programmer accesses an API via a library of code provided by the operating system. In the case of UNIX and Linux for programs written in the C language, the library is called libc.

Behind the scenes, the functions that make up an API typically invoke the actual system calls on behalf of the application programmer.

For example, the Windows function CreateProcess() (which, unsurprisingly, is used to create a new process) actually invokes the NTCreateProcess() system call in the Windows kernel.

167
Q

Benefits of using APIs vs actual system calls

A

One benefit is program portability. An app programmer designing a program using an API can expect the program to compile and run on any system that supports the same API (in reality, architectural differences often make this more difficult than it may appear).

Furthermore, actual system calls can often be more detailed and difficult to work with than the API available to an app programmer. There often exists a strong correlation between a function in the API and its connected system call within the kernel.

Many of the POSIX and Windows APIs are alike the native system calls provided by the UNIX, Linux, and Windows OSs.

The call doesn’t need to know about how the system call is implemented or what it does during execution.

Rather, the call needs only to obey the API and understand what the OS will do as a result of the execution of that system call. Thus, most of the details of the OS interface are hidden from the programmer by the API and are managed by the RTE.

168
Q

run-time environment (RTE)

A

Another important factor in handling system calls. The full suite of software needed to execute applications written in a given programming language, including its compilers or interpreters as well as other software, such as libraries and loaders.

The RTE provides a system-call interface that serves as the link to system calls made available by the operating system.

The system-call interface intercepts function calls in the API and invokes the necessary system calls within the operating system.

A number is associated with each system call, and the system-call interface maintains a table indexed according to these numbers.

The system-call interface then invokes the intended system call in the operating-system kernel and returns the status of the system call.

169
Q

system-call interface

A

Serves as the link to system calls made available by the OS.

The system-call interface intercepts function calls in the API and invokes the necessary system calls within the OS.

Often, a number is associated with each system call, and the system-call interface maintains a table indexed according to these numbers.

The system-call interface then invokes the intended system call in the operating-system kernel and returns the status of the system call.

170
Q

The Handling of a User Application Invoking the open() System Call

A

Application invokes the system call.

The system uses a CPU-specific method to transition from user to kernel mode and pass the system-call information to the kernel.

Each system call has a number, and that number is used as an index in the system call table, to invoke the appropriate routine.

The routine executes and returns when complete or indicating an error.

The return transitions the thread from kernel to user mode.

171
Q

Three methods used to pass parameters to the OS

A

The simplest approach is to pass the parameters in registers.

There may be more parameters than registers. In these cases, the parameters are stored in a block, or table, in memory, and the address of the block is passed as a parameter in a register.

Linux uses a combo of these approaches. If there are five or fewer parameters, registers are used. If there are more than five parameters, the block method is used.

Parameters also can be placed, or pushed, onto a stack by the program and popped off the stack by the operating system.

Some OSs prefer the block or stack method because those approaches do not limit the number or length of parameters being passed.

172
Q

Process control

A

A category of system calls.

  • create process, terminate process
  • load, execute
  • get process attributes, set process attributes
  • wait event, signal event
    allocate and free memory
173
Q

File management

A

A category of system calls.

  • create file, delete file
  • open, close
  • read, write, reposition
  • get file attributes, set file attributes
174
Q

Device management

A

A category of system calls.

  • request device, release device
  • read, write, reposition
  • get device attributes, set device attributes
  • logically attach or detach devices
175
Q

Information maintenance

A

A category of system calls.

  • get time or date, set time or date
  • get system data, set system data
  • get process, file, or device attributes
  • set process, file, or device attributes
176
Q

Communications

A

A category of system calls.

  • create, delete communication connection
  • send, receive messages
  • transfer status information
  • attach or detach remote devices
177
Q

Protection

A

A category of system calls.

  • get file permissions
  • set file permissions
178
Q

lock

A

Quite often, two or more processes may share data. To ensure the integrity of the data being shared, operating systems often provide system calls allowing a process to lock shared data.

Then, no other process can access the data until the lock is released.

Typically, such system calls include acquire_lock() and release_lock().

179
Q

The Arduino

A

The Arduino is a simple hardware platform consisting of a microcontroller along with input sensors that respond to a variety of events like changes to light, temperature, and barometric pressure, to just name a few.

To write a program for the Arduino, we first write the program on a PC and then upload the compiled program (known as a sketch) from the PC to the Arduino’s flash memory via a USB connection.

The standard Arduino platform doesn’t provide an OS; instead, a small piece of software known as a boot loader loads the sketch into a specific region in the Arduino’s memory. Once the sketch has been loaded, it begins running, waiting for the events that it is programmed to respond to.

An Arduino is considered a single-tasking system, as only one sketch can be present in memory at a time; if another sketch is loaded, it replaces the existing sketch.

Furthermore, the Arduino provides no user interface beyond hardware input sensors.

180
Q

FreeBSD (derived from Berkeley UNIX)

A

An example of a multitasking system. When a user logs on to the system, the shell of the user’s choice is run, awaiting commands and running programs the user requests. However, since FreeBSD is a multitasking system, the command interpreter may continue running while another program is executed.

To start a new process, the shell executes a fork() system call. Then, the selected program is loaded into memory via an exec() system call, and the program is executed.

Depending on how the command was issued, the shell then either waits for the process to finish or runs the process “in the background.”

In the latter case, the shell immediately waits for another command to be entered. When a process is running in the background, it cannot receive input directly from the keyboard, because the shell is using this resource.

I/O is therefore done through files or through a GUI interface. Meanwhile, the user is free to ask the shell to run other programs, monitor the progress of the running process, change that program’s priority, and so on.

When the process is done, it executes an exit() system call to terminate, returning to the invoking process a status code of 0 or a nonzero error code. This status or error code is then available to the shell or other programs.

181
Q

File management

A

To create() and delete() files. Either system call requires the name of the file and some of the file’s attributes.

Once the file is created, we need to open() it and use it. We may also read(), write(), or reposition() (rewind or skip to the end of the file, for example). Finally, we need to close() the file.

We may need these same sets of operations for directories if we have a directory structure for organizing files in the file system.

In addition, for either files or directories, we need to determine the values of various attributes and perhaps set them if needed.

File attributes include the file name, file type, protection codes, accounting information, and so on.

At least two system calls, get_file_attributes() and set_file_attributes(), are required for this function.

Some OSs provide many more calls, such as calls for file move() and copy(). Others provide an API that performs those operations using code and other system calls, and others might provide system programs to perform the tasks.

If the system programs are callable by other programs, then each can be considered an API by other system programs.

182
Q

Device management

A

The various resources controlled by the OS can be thought of as devices.

Some are physical devices (for example, disk drives), while others can be thought of as abstract or virtual devices (for example, files).

A system with multiple users may require us to first request() a device, to ensure exclusive use of it. After we are finished with the device, we release() it.

These functions are similar to the open() and close() system calls for files. Other OSs allow unmanaged access to devices.

Once the device has been requested (and allocated to us), we can read(), write(), and (possibly) reposition() the device, just as we can with files.

The similarity between I/O devices and files is so great that many OSs, including UNIX, merge the two into a combined file-device structure.

In this case, a set of system calls is used on both files and devices. Sometimes, I/O devices are identified by special file names, directory placement, or file attributes.

183
Q

Information maintenance

A

Many system calls exist to transfer information between the user program and the OS. For example, most systems have a system call to return the current time() and date(). Other system calls may return info about the system, such as the version number of the OS, the amount of free memory or disk space, and so on.

Another set of system calls is helpful in debugging a program. Many systems provide system calls to dump() memory. This provision is useful for debugging.

The program strace, available on Linux systems, lists each system call as it is executed. Even microprocessors provide a CPU mode, known as single step, in which a trap is executed by the CPU after every instruction. The trap is usually caught by a debugger.

The OS keeps info about all its processes, and system calls are used to access this info.

Calls are also used to get and set the process information (get_process_attributes() and set_process_attributes()).

184
Q

Protection

A

Protection provides a mechanism for controlling access to the resources provided by a computer system.

Typically, system calls providing protection include set_permission() and get_permission(), which manipulate the permission settings of resources such as files and disks.

The allow_user() and deny_user() system calls specify whether particular users can—or cannot—be allowed access to certain resources.

185
Q

system call

A

Software-triggered interrupt allowing a process to request a kernel service.

186
Q

application programming interface (API)

A

A set of commands, functions, and other tools that can be used by a programmer in developing a program.

187
Q

C library (libc)

A

The standard UNIX/Linux system API for programs written in the C programming language.

188
Q

run-time environment (RTE)

A

The full suite of software needed to execute applications written in a given programming language, including its compilers, libraries, and loaders.

189
Q

system-call interface

A

An interface that serves as the link to system calls made available by the operating system and that is called by processes to invoke system calls.

190
Q

push

A

The action of placing a value on a stack data structure.

191
Q

stack

A

A sequentially ordered data structure that uses the last-in, first-out (LIFO) principle for adding and removing items; the last item placed onto a stack is the first item removed.

192
Q

sketch

A

An Arduino program.

193
Q

single step

A

A CPU mode in which a trap is executed by the CPU after every instruction (to allow examination of the system state after every instruction); useful in debugging.

194
Q

message-passing model

A

A method of interprocess communication in which messages are exchanged.

195
Q

host name

A

A human-readable name for a computer

196
Q

process name

A

A human-readable name for a process.

197
Q

daemon

A

A service that is provided outside of the kernel by system programs that are loaded into memory at boot time and run continuously.

198
Q

client

A

A computer that uses services from other computers (such as a web client). The source of a communication.

199
Q

server

A

In general, any computer, no matter the size, that provides resources to other computers.

200
Q

shared-memory model

A

An interprocess communication method in which multiple processes share memory and use that memory for message passing.

201
Q

System services, also known as system utilities

A

Provide a convenient environment for program development and execution. Some of them are simply user interfaces to system calls. Others are considerably more complex.

They can be divided into these categories: file management, status info, file modification, programming-language support, programing loading and execution,, communications, and background services.

202
Q

application programs

A

Programs that are useful in solving common problems or performing common operations.

Such application programs include web browsers, word processors and text formatters, spreadsheets, database systems, compilers, plotting and statistical-analysis packages, and games.

203
Q

system service

A

A collection of applications included with or added to an operating system to provide services beyond those provided by the kernel.

204
Q

system utility

A

A collection of applications included with or added to an operating system to provide services beyond what are provided by the kernel.

205
Q

registry

A

A file, set of files, or service used to store and retrieve configuration information. In Windows, the manager of hives of data.

206
Q

service

A

A software entity running on one or more machines and providing a particular type of function to calling clients. In Android, an application component with no user interface; it runs in the background while executing long-running operations or performing work for remote processes.

207
Q

subsystem

A

A subset of an operating system responsible for a specific function (e.g., memory management).

208
Q

operating system is a resource manager

A

The system’s CPU, memory space, file-storage space, and I/O devices are among the resources that the operating system must manage.

209
Q

The operating system is responsible for the following activities in connection with process management:

A
  • Creating and deleting both user and system processes.
  • Scheduling processes and threads on the CPUs.
  • Suspending and resuming processes.
  • Providing mechanisms for process synchronization.
  • Providing mechanisms for process communication.
210
Q

The operating system is responsible for the following activities in connection with memory management:

A

Keeping track of which parts of memory are currently being used and which process is using them.

Allocating and deallocating memory space as needed.

Deciding which processes (or parts of processes) and data to move into and out of memory.

211
Q

The operating system is responsible for the following activities in connection with file management:

A

Creating and deleting files.

Creating and deleting directories to organize files.

Supporting primitives for manipulating files and directories.

Mapping files onto mass storage.

Backing up files on stable (nonvolatile) storage media.

212
Q

The operating system is responsible for the following activities in connection with secondary storage management:

A

Mounting and unmounting.

Free-space management.

Storage allocation.

Disk scheduling.

Partitioning.

Protection.

213
Q

I/O subsystem

A

The I/O subsystem consists of several components:

A memory-management component that includes buffering, caching, and spooling.

A general device-driver interface.

Drivers for specific hardware devices.

214
Q

resource manager

A

The role of an operating system in managing the computer’s resources.

215
Q

program counter

A

A CPU register indicating the main memory location of the next instruction to load and execute.

216
Q

file

A

The smallest logical storage unit; a collection of related information defined by its creator.

217
Q

caching

A

The use of temporary data storage areas to improve performance.

218
Q

cache management

A

The management of a cache’s contents.

219
Q

cache coherency

A

The coordination of the contents of caches such that an update to a value stored in one cache is immediately reflected in all other caches that hold that value.

220
Q

I/O subsystem

A

The I/O devices and the part of the kernel that manages I/O.