1/2 Operating Systems Introduction

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

Three main purposes of OS

(1) To provide an environment for a computer user to execute programs on computer hardware in a convenient and efficient manner. (2) To allocate the separate resources of the computer as needed to solve the problem given. The allocation process should be as fair and efficient as possible. (3) As a control program it serves two major functions: (1) supervision of the execution of user programs to prevent errors and improper use of the computer, and (2) management of the operation and control of I/O devices.

Boot Loader

A boot loader loads an operating system into memory, performs initialization, and begins system execution.

Five computer system components

CPU— The hardware that executes instructions. Processor - A physical chip that contains one or more CPUs. Core — The basic computation unit of the CPU. Multicore — Including multiple computing cores on the same CPU. Multiprocessor — Including multiple processors

Three general methods for passing parameters to the operating system.

a. Pass parameters in registers b. Registers pass starting addresses of blocks of parameters c. Parameters can be placed, or pushed, onto the stack by the program, and popped off the stack by the operating system

Multitasking

Multitasking is an extension of multiprogramming wherein CPU scheduling algorithms rapidly switch between processes, providing users with a fast response time.

Five major activities of an operating system in regard to file management?

• The creation and deletion of files • The creation and deletion of directories • The support of primitives for manipulating files and directories • The mapping of files onto secondary storage • The backup of files on stable (nonvolatile) storage media

Main Memory

For a computer to do its job of executing programs, the programs must be in main memory, which is the only large storage area that the processor can access directly.

Layered Operating System

A layered operating system is divided into a number of discrete layers, where the bottom layer is the hardware interface and the highest layer is the user interface. Although layered software systems have had some success, this approach is generally not ideal for designing operating systems due to performance problems.

Linker vs Loader

A linker combines several relocatable object modules into a single binary executable file. A loader loads the executable file into memory, where it becomes eligible to run on an available CPU.

Modular approach for designing operating systems

A modular approach for designing operating systems provides operating- system services through modules that can be loaded and removed during run time. Many contemporary operating systems are constructed as hybrid systems using a combination of a monolithic kernel and modules.

Monolithic Operating System

A monolithic operating system has no structure; all functionality is provided in a single, static binary file that runs in a single address space. Although such systems are difficult to modify, their primary benefit is efficiency.

Process

A process is the fundamental unit of work in an operating system. Pro- cess management includes creating and deleting processes and providing mechanisms for processes to communicate and synchronize with each other.

Operating System

An operating system is software that manages the computer hardware, as well as providing an environment for application programs to run.

Pros and cons of layered approach to system design?

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.

Direct memory access (DMA)

Direct memory access (DMA) is a feature of computer systems that allows certain hardware subsystems to access main system memory (random-access memory), independent of the central processing unit (CPU).

Caches

Information is normally kept in some storage systems (such as main memory). As it is used, it is copied into a faster storage system—the cache—on a temporary basis. - useful when two or more components need to exchange data, and the components perform transfers at differing speeds. - providing a buffer of intermediate speed between the components.

Interrupts

Interrupts are a key way in which hardware interacts with the operating system. A hardware device triggers an interrupt by sending a signal to the CPU to alert the CPU that some event requires attention. - The interrupt is managed by the interrupt handler.

Command Interpreter

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.

Six categories of system calls

System calls can be divided into six major categories: (1) process control (2) file management (3) device management (4) information maintenance (5) communications (6) protection.

System Calls

System calls provide an interface to the services made available by an operating system. Programmers use a system call's application programming interface (API) for accessing system-call services.

System Programs

System programs can be thought of as bundles of useful system calls. They provide basic functionality to users so that users do not need to write their own programs to solve common problems.

Volatile vs Nonvolatile Storage

The main memory is usually a volatile storage device that loses its contents when power is turned off or lost. Nonvolatile storage is an extension of main memory and is capable of holding large quantities of data permanently. - e.g. hard disk

Microkernel approach for designing operating systems

The microkernel approach for designing operating systems uses a minimal kernel; most services run as user-level applications. Communication takes place via message passing. Benefits typically include the following: (a) adding a new service does not require modifying the kernel, (b) it is more secure as more operations are done in user mode than in kernel mode, and (c) a simpler kernel design and functionality typically results in a more reliable operating system.

Hard Disk

The most common nonvolatile storage device is a hard disk, which can provide storage of both programs and data.

Counters vs Tracing

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.

Why are applications operating-system specific

There are several reasons why applications are operating-system specific. These include different binary formats for program executables, different instruction sets for different CPUs, and system calls that vary from one operating system to another.

Three approaches for interacting with an operating system

Three primary approaches for interacting with an operating system are (1) command interpreters, (2) graphical user interfaces, and (3) touch- screen interfaces.

Multiprogramming

To best utilize the CPU, modern operating systems employ multiprogramming, which allows several jobs to be in memory at the same time, thus ensuring that the CPU always has a job to execute.

Kernel Mode vs User Mode

To prevent user programs from interfering with the proper operation of the system, the system hardware has two modes: user mode and kernel mode. Various instructions are privileged and can be executed only in kernel mode. - instruction to switch to kernel mode, - I/O control - timer management - interrupt management.


Ensembles d'études connexes

ADOLESCENT DEVELOPMENT UNIT 1 EXAM!

View Set

Practice: Ch 3, Describing Data Visually Selections

View Set

PRIMARY Food Sanitation Exam Questions

View Set

Kine - Body Weight and Composition

View Set

EAQ 4510 PAncreatitis/Cholecystitis Summer 2020

View Set