Section 1

Preview this deck

Error detection

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (86)

Section 1

(50 cards)

Error detection

Front

OS needs to be constantly aware of possible errors.

Back

Dual-mode operation

Front

Allows OS to protect itself and other system components User mode and kernel mode

Back

Operating System goals

Front

-execute user programs and make solving user problems easier -make the computer system convenient to use -use the computer hardware in an efficient manner

Back

Clustered Systems

Front

Provides a high-availability service which survives failures Asymmetric clustering has one machine in hot-standby mode Symmetric clustering has multiple nodes running applications, monitoring each other

Back

Communications (OSS)

Front

Processes may exchange information, on the same computer or between computers over a network.

Back

I/O Subsystem

Front

One purpose of OS is to hide peculiarities of hardware devices from the user

Back

Process State: Running

Front

Instructions are being executed

Back

Operating System Services (OSS)

Front

Operating systems provide an environment for execution of programs and services to programs and users.

Back

System Call Parameter Passing

Front

Parameters stored in a block, or table, in memory, and address of block passed as a parameter in a register.

Back

Program execution

Front

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

Back

Process in Memory

Front

Each process has its own memory space, which only it (and the OS) can access.

Back

Multi-threaded Process

Front

Multi-threaded process has one program counter per thread.

Back

Advantages of multiprocessing

Front

Increased throughput Economy of scale Increased reliability

Back

Parts of a Process

Front

-The program code, also called text section -Current activity including program counter, processor registers -Stack containing temporary data -Function parameters, return addresses, local variables -Data section containing global variables -Heap containing memory dynamically allocated during run time

Back

System Call Implementation

Front

Typically, a number associated with each system call. The system call interface invokes the intended system call in OS kernel and returns status of the system call and any return values. Separation of interface from implementation.

Back

Resource allocation

Front

When multiple users or multiple jobs running concurrently, resources must be allocated to each of them.

Back

Timesharing (multitasking)

Front

Extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing. Each user has at least one program executing in memory ⇨ process.

Back

What is an OS?

Front

Intermediary between user and computer hardware

Back

Process (Chapter 1)

Front

A process is a program in execution. It is a unit of work within the system. Program is a passive entity; process is an active entity.

Back

Operating System Structure

Front

General-purpose OS is very large program Various ways to structure ones Simple structure - MS-DOS More complex - UNIX Layered - an abstraction Microkernel - Mach

Back

Process State: New

Front

The process is being created

Back

I/O devices and the CPU can execute ____

Front

concurrently

Back

User interface

Front

Almost all operating systems have a user interface (UI).

Back

How is an operating system driven?

Front

an operating system is interrupt driven

Back

The one "program" running at all times and what it does

Front

The kernel. Kernel functions linked in to all programs via libraries. Everything else is a system program or application program

Back

Accounting

Front

To keep track of which users use how much and what kinds of computer resources.

Back

4 components of computer system

Front

Hardware Operating System Application Programs Users

Back

How does the device controller inform the CPU that it has finished its operation?

Front

causes an interrupt

Back

Single-threaded Process

Front

Single-threaded process has one program counter specifying location of next instruction to execute.

Back

OS as a control program

Front

-controls execution of programs to prevent errors and improper use of the computer

Back

Use of Timer

Front

Set up before scheduling process to regain control or terminate program that exceeds allotted time.

Back

Protection and security

Front

The owners of information stored in a multiuser or networked computer system may want to control use of that information, concurrent processes should not interfere with each other.

Back

User Operating System Interface - CLI

Front

CLI or command interpreter allows direct command entry.

Back

Process (Chapter 3)

Front

a program in execution; process execution must progress in sequential fashion

Back

Types of Multiprocessing

Front

Asymmetric multiprocessing: each processor is assigned to a specific task. Symmetric multiprocessing: each processor performs all tasks

Back

System Boot

Front

-When power initialized on system, execution starts at a fixed memory location. -Firmware ROM used to hold initial boot code BIOS or Monitor. -Operating system must be made available to hardware so hardware can start it -Small piece of code - bootstrap loader, stored in ROM or EEPROM locates the kernel, loads it into memory, and starts it -Sometimes two-step process where boot block at fixed location loaded by ROM code, which loads bootstrap loader from disk -Common bootstrap loader, GRUB, allows selection of kernel from multiple disks, versions, kernel options -Kernel loads and system is then running

Back

System Programs

Front

System programs provide a convenient environment for program development and execution. Provide a convenient environment for program development and execution Some of them are simply user interfaces to system calls; others are considerably more complex

Back

OS Implementation

Front

Much variation -Early OSes in assembly language -Then system programming languages like Algol, PL/1 -Now C, C++ Actually usually a mix of languages -Lowest levels in assembly -Main body in C -Systems programs in C, C++, scripting languages like PERL, Python, shell scripts More high-level language easier to port to other hardware But slower Emulation can allow an OS to run on non-native hardware

Back

How does an interrupt transfer control to the interrupt service routine?

Front

Interrupt transfers control through the interrupt vector which contains the addresses of all the service routines

Back

Interrupt driven (hardware and software)

Front

Hardware interrupt by one of the devices Software interrupt (exception or trap): Software error (e.g., division by zero) Request for operating system service Other process problems include infinite loop, processes modifying each other or the operating system

Back

Program loaded at computer start up or reboot

Front

-bootstrap program -stored in ROM or EROM, known as firmware -initializes all aspects of system -Loads operating system kernel and starts execution

Back

I/O operations

Front

A running program may require I/O, which may involve a file or an I/O device.

Back

OS as a resource allocator

Front

-manages all (limited) resources -decides between conflicting requests for efficient and fair resource use

Back

System-call Interface

Front

maintains a table indexed according to these numbers

Back

Resident Monitor System

Front

Minimal OS in ROM Allows users to: put values in memory, load from tape, store to tape, inspect memory, run program at a location in memory, call functions to do I/O One job at a time in memory

Back

Multiprogramming (Batch system)

Front

Needed for efficiency Single user cannot keep CPU and I/O devices busy at all times Multiprogramming organizes jobs (code and data) so CPU always has one to execute A subset of total jobs in system is kept in memory

Back

Process: passive vs. active

Front

Program is passive entity stored on disk (executable file), process is active Program becomes process when executable file loaded into memory

Back

System Calls

Front

Programming interface to the services provided by the OS. Mostly accessed by programs via a high-level Application Programming Interface (API) rather than direct system call use.

Back

A software-generated interrupt caused either by an error or user request

Front

Trap or exception

Back

What does interrupt architecture need to save?

Front

Interrupt architecture must save the address of the interrupted instruction

Back

Section 2

(36 cards)

Cascading Termination

Front

-All children, grandchildren, etc., are terminated. -If no parent waiting (did not invoke wait()) process is a zombie. -If parent terminated without invoking wait , process is an orphan.

Back

Process Creation

Front

A Parent process creates children processes, which, in turn create other processes, forming a tree of processes. Generally, process identified and managed via a process identifier (pid).

Back

Interprocess Communication

Front

-Processes within a system may be independent or cooperating -Cooperating processes need interprocess communication (IPC)

Back

Short-term Scheduler (or CPU scheduler)

Front

Selects which process should be executed next and allocates CPU Sometimes the only scheduler in a system Short-term scheduler is invoked frequently (milliseconds) ⇒ must be fast

Back

Process State: Ready

Front

The process is waiting to be assigned to a processor

Back

CPU Scheduling Information

Front

priorities, scheduling queue pointers

Back

Interprocess Communication - Message Passing

Front

Message system - processes communicate with each other without resorting to shared variables IPC facility provides two operations: -send(message) -receive(message) The message size is either fixed or variable

Back

Process Scheduling: Device Queues

Front

set of processes waiting for an I/O device

Back

I/O-bound Process

Front

Spends more time doing I/O than computations, many short CPU bursts - Scheduler wants a good mix

Back

If processes P and Q wish to communicate, they need to:

Front

-Establish a communication link between them -Exchange messages via send/receive

Back

Medium-term Scheduler

Front

Can be added if degree of multiple programming needs to decrease Remove process from memory, store on disk, bring back in from disk to continue execution: swapping

Back

Message Passing: Implementation Issues

Front

How are links established? Can a link be associated with more than two processes? How many links can there be between every pair of communicating processes? What is the capacity of a link? Is the size of a message that the link can accommodate fixed or variable? Is a link unidirectional or bi-directional?

Back

Producer-Consumer Problem

Front

Paradigm for cooperating processes, producer process produces information that is consumed by a consumer process -unbounded-buffer places no practical limit on the size of the buffer -bounded-buffer assumes that there is a fixed buffer size

Back

Threads

Front

Consider having multiple program counters per process Multiple locations can execute at once Multiple threads of control -> threads

Back

Mailbox sharing (Indirect communication problem) - P_1, P_2, and P_3 all share the same mailbox. - p_1 sends, P-2 and p_3 receive. - who gets the message?

Front

Solution: - Allow the link to be associated with at most 2 processes. - Allow only one process at a time to be able to execute a receive operation. - Allow the system to select arbitrarily the receiver. Sender is notified -

Back

CPU Registers

Front

contents of all process-centric registers

Back

Properties of a communication link (Direct)

Front

- Links are established automatically. - Link is associated with exactly one pair of communicating processes. - between each pair there exists exactly 1 link. - Link may be unidirectional, but is usually bi-directional (Two unidirectional links).

Back

Processes: Cooperating

Front

A Cooperating process can affect or be affected by the execution of another process.

Back

Properties of a Communication Link (Indirect)

Front

- Link established only if processes have the same mailbox (Port). - A link may be associated with many processes. - Each pair of processes can share multiple communication links. - Links may be unidirectional or bi-directional.

Back

Program Counter

Front

location of instruction to execute next

Back

Memory-management Information

Front

memory allocated to the process

Back

Two Models of IPC

Front

Shared memory Message passing

Back

Accounting Information

Front

CPU used, clock time elapsed since start, time limits

Back

Process State: Waiting

Front

The process is waiting for some event to occur

Back

Process State: Terminated

Front

The process has finished execution

Back

CPU-bound Process

Front

Spends more time doing computations; few very long CPU bursts - Scheduler wants a good mix

Back

I/O status Information

Front

I/O devices allocated to process, list of open files

Back

Advantages of Process Cooperation

Front

-Information sharing -Computation speed-up -Modularity -Convenience

Back

Process Scheduling

Front

To maximize CPU use, quickly switch processes onto CPU for time sharing Process scheduler selects among available processes for next execution on CPU

Back

Process Scheduling: Ready Queue

Front

set of all processes residing in main memory, ready and waiting to execute

Back

Logical Communication Links

Front

direct or indirect synchronous and anchronous automatic or explicit buffering fixed-sized or variable-sized messages

Back

Indirect communication

Front

Messages are directed and received from mailboxes (Ports)

Back

Processes: Independent

Front

An Independent process cannot affect or be affected by the execution of another process.

Back

Long-term Scheduler (or job scheduler)

Front

Selects which processes should be brought into the ready queue Long-term scheduler is invoked infrequently (seconds, minutes) ⇒ may be slow The long-term scheduler controls the degree of multiprogramming

Back

Interprocess Communication - Shared Memory

Front

An area of memory shared among the processes that wish to communicate. The communication is under the control of the user processes not the operating system.

Back

Context Switch

Front

-When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process via a context switch. -Context-switch time is overhead; the system does no useful work while switching. -The more complex the OS and the PCB ➔ the longer the context switch.

Back