OS Chapter 2

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

File management

A program on a computer that allows the user to create, edit, view, print, rename, copy, or delete files, folders, or an entire file system

I/O operations

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

Status information

A system programs that simply ask the system for the date, time, amount of available memory or disk space, number of users, or similar status information.

Touch-Screen Interface

A type of user interface that uses the screen as the input device rather than a keyboard or mouse.Both the iPad and the iPhone use the Springboard touch-screen interface.

Program loading and execution

Absolute loaders, relocatable loaders, linkage editors, and overlay-loaders, debugging systems for higher-level and machine language

command interpreter

Allows users to directly enter commands to be performed by the operating system

What is the main advantage of the layered approach to system design? What are the disadvantages of using the layered approach?

As in all cases of modular design, designing an operating system in a modular way has several advantages. The system is easier to debug and modify because changes affect only limited sections of the system rather than touching all sections of the operating system. Information is kept only where it is needed and is accessible only within a defined and restricted area, so any bugs affecting that data must be limited to a specific module or layer.

message-passing model

Communicating processes exchange messages with one another to transfer information.

Programming-language support

Compilers, assemblers, debuggers and interpreters sometimes provided

Challenges of Application Mobility

Each operating system has a binary format for applications CPUs have varying instruction sets System calls vary among operating systems in many respects

System Services

File management Status information File modification Programming-language support Program loading and execution Communications Background services

Why do some systems store the operating system in firmware, while others store it on disk?

For certain devices, such as handheld PDAs and cellular telephones, a disk with a file system may be not be available for the device. In this situation, the operating system must be stored in firmware.

What system calls have to be executed by a command interpreter or shell in order to start a new process?

In Unix systems, a fork system call followed by an exec system call need to be performed to start a new process. The fork call clones the currently executing process, while the exec call overlays a new process based on a different executable over the calling process.

Background services

It is a system program that launches certain system-program processes at boot time. Some of these processes terminate after completing their tasks, while others continue to run until the system is halted.

What is the purpose of the command interpreter? Why is it usually separate from the kernel?

It reads commands from the user or from a file of commands and executes them, usually by turning them into one or more system calls. It is usually not part of the kernel since the command interpreter is subject to changes.

What are the three major activities of an operating system with regard to memory management?

Keep track of which parts of memory are currently being used and by whom. Decide which processes are to be loaded into memory when memory space becomes available. Allocate and deallocate memory space as needed.

shared-memory model

Model in which two or more processes read and write to a shared section of memory

Layered approach (to OS structure)

OS System broken into a number of layers. Bottom layer is 0 is hardware, layer N is the user interface

Goal of operating system

OS provides an environment for the execution of programs by providing services to the user and programs.

shells

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

Counters

Per-Process ps—reports information for a single process or selection of processes top—reports real-time statistics for current processes System-Wide vmstat—reports memory-usage statistics netstat—reports statistics for network interfaces iostat—reports I/O usage for disks

Tracing

Per-Process strace—traces system calls invoked by a process gdb—a source-level debugger System-Wide perf—a collection of Linux performance tools tcpdump—collects network packets

Types of System Calls

Process control, File management, Device management, Information maintenance, Communications, Protection

Protection and security

Protection involves ensuring that all access to system resources is controlled. Security requires each user to authenticate himself or herself to the system usually by means of password to get access to system resources.

System calls

Provide an interface to the services made available by the OS

linker

Software that combines together a number of separate object code files.

run-time environment

Software to support the execution of programs.

relocatable object fil

Source files are compiled into object files that are designed to be loaded into any physical memory location

What is the purpose of system calls?

System calls allow user-level processes to request services of the operating system.

File modification

Text editors to create and modify files

error detection

The OS needs to be detecting and correcting errors constantly.

An application can be made available to run on multiple operating systems in one of three ways

The application can be written in an interpreted language The application can be written in a language that includes a virtual machine containing the running application The application developer can use a standard language or API in which the compiler generates binaries in a machine- and operating-system- specific language

What are the five major activities of an operating system with regard to process management?

The creation and deletion of both user and system processes The suspension and resumption of processes The provision of mechanisms for process synchronization The provision of mechanisms for process communication The provision of mechanisms for deadlock handling

File-system manipulation

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

system-call interface

The fundamental interface between an application and the Linux kernel

Performance of an OS can be monitored using

The performance of an operating system can be monitored using either counters or tracing. Counters are a collection of system-wide or per- process statistics, while tracing follows the execution of a program through the operating system.

booting

The process of starting and initializing a computer system.

Three general methods are used to pass parameters to the operating system

The simplest approach is to pass the parameters in registers the address of the block is passed as a parameter in a register passed by a stack

Program Execution

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

shell scripts

The text files that contain a list of commands or constructs for the shell to execute in order.

Communications

The transmission of data from one device to another.

Communications

The transmission of data from one process to another.

What is the purpose of system programs?

They provide basic functionality to users so that users do not need to write their own programs to solve common problems.

Operating-System Services

User Interface, Program Execution, I/O Operations, File-system manipulation, Communications, Error detection, resource allocation, accounting, Protection/Security

Logging

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

resource allocation

When there are multiple processes running at the same time, resources must be allocated to each of them. OS provides a means of doing this efficiently.

loader

a program that loads an executable program into main memory

application programming interface

a set of routines, protocols, and tools for building software applications

UEFI

a software layer that replaces the BIOS and sits between the OS and the system firmware

BCC

a toolkit that provides tracing features for Linux systems

Graphical User Interface

a visual way of interacting with a computer using items such as windows, icons, and menus, used by most modern operating systems.

relocation

assigns final addresses to the program parts

Hybrid System

combine different structures

A failure in the kernel is called a

crash

When a crash occurs, error information is saved to a log file, and the memory state is saved to a

crash dump

mechanism

determine how to do something

policy

determine what will be done

recovery mode

diagnosing hardware issues, fixing corrupt file systems, and even reinstalling the operating system

Why Applications Are Operating-System Specific

each operating system provides a unique set of system calls

application binary interface

how different components of binary code can interface for a given operating system on a given architecture.

Daemons

is a system process that performs useful tasks, e.g., printing, scheduling and OS maintenance.

Modules

kernel has a set of core components and can link in additional services via modules, either at boot time or during run time

boot loader

locates the kernel

If a process fails most operating systems wire the error information to a

log fil to alert system administrators or users that the problem occurred or cor dump - a capture of the memory of the process — and store it in a file for later analysis

GRUB

open-source bootstrap program for Linux and UNIX systems

User interface

part of the operating system that enables individuals to interact with the computer

Monolithic Structure

place all of the functionality of the kernel into a single, static binary file that runs in a single address space

Linkers and Loaders

procedure for running a program

Daemons

processes that will be receiving connections

Failure Analysis

program failure - Using log files and core dumps. A core dump is a capture of the memory of the process stored in a file for later analysis Using a debugger to probe running programs or core dumps. Kernel failure (called crash). When a crash occurs, OS kernel saves error information to a log file and the memory state to a crash dump (stored in a file).

System Services

provide a convenient environment for program development and execution

Microkernels

removing all nonessential components from the kernel and implementing them as user level programs that reside in separate address spaces

BIOS

small boot loader

two common models of interprocess communication

the message- passing model and the shared-memory model

libc

the standard C library, which is linked to every program

boot block

typically only knows the location and length of the rest of the bootstrap program

What are the three major activities of an operating system with regard to secondary-storage management?

• Free-space management. • Storage allocation .• Disk scheduling.


Ensembles d'études connexes

Grammar tutorial: Present tense of -ar verbs

View Set

Intermediate Accounting Chapter 8

View Set

Chapter 18: Qualitative Research General Principles

View Set

Macro Ch. 4; Dynamic Study Guide

View Set