Chapter 2: Operating System Overview

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Monolithic kernel

An operating system design where most of the operating system functionality is linked together inside the kernel

Machine characteristics are specified by high-level language capabilities and OS system library calls. API defines the machine for an application.

Application perspective in VM Architecture

Microkernel Architecture

Assigns only a few essential functions to the kernel, including address spaces, inter-process communication, and basic scheduling. This approach simplifies implementation, provides flexibility, and is well suited to a distributed environment.

Time-sharing system

Can be used to handle multiple interactive jobs. Processor time is shared among multiple users. Multiple users simultaneously access the system through terminals, with the OS interleaving the execution of each user program in a short burst or quantum of computation

1. Improper Synchronization - program must wait until the data are available in a buffer 2. Failed Mutual Exclusion - more than one user or program attempts to make use of a shared resource at the same time 3. Nondeterminate program execution - program execution is interleaved by the processor when memory is shared, thus the order in which programs are scheduled may affect their outcome 4. Deadlocks - two or more programs become hung up waiting for each other to release control of a resource

Causes of timing and synchronization errors

Round Robin Scheduling

designed for time-sharing systems, similar to FCFS but allows preemption

1. Availability 2. Confidentiality 3. Data Integrity 4. Authenticity

Four major categories of security and protection

Application Programming Interface (API)

Gives a program access to the hardware resources and services available in a system through the user ISA supplemented with high-level language library calls

Symmetric Multiprocessing (SMP)

Several processes can run in parallel. Multiple processors are transparent to the user: - Processors share the same main memory and I/O facilities - All processors can perform the same functions The OS schedules processes or threads across all of the processors

Virtual memory

A facility that allows programs to address memory from a logical point of view, without regard to the amount of main memory physically available

1. Hardware upgrades plus new types of hardware 2. New services 3. Fixes

A major OS will evolve over time for the following reasons:

Operating system

A program that controls the execution of application programs. An interface between applications and hardware.

Application Binary Interface (ABI)

A specification defining requirements for portability of applications in binary forms across different system platforms and environments. Defines the system call interface to the operating system and the hardware resources and services available in a system through the user ISA.

Multithreading

A technique in which a process, executing an application, is divided into threads that can run concurrently

1. Performance - More than one process can be running simultaneously, each on a different processor 2. Availability - failure of a single processor does not halt the system 3. Incremental Growth - performance of a system can be enhanced by adding a processor 4. Scaling - vendors can offer a range of products based on number of processors

Advantages of SMP

1. Process Isolation - OS must prevent independent processes from interfering with each other's memory, both data and instructions 2. Automatic allocation and management - Programs should be dynamically allocated across the memory hierarchy as required 3. Support of modular programming - Programmers should be able to define program modules, and to create, destroy, and alter the size of modules dynamically 4. Protection and access control - OS must allow certain portions of memory to be accessible in various ways by various users 5. Long-term storage - Many applications require means of storing information for extended periods of time

Five storage management responsibilities of an OS

Instruction Set Architecture (ISA)

Defines the repertoire of machine language instructions that a computer can follow. This interface is the boundary between hardware and software.

1. Memory Protection - while the user program is executing, it must alter the memory area containing the monitor 2. Timer - prevents a job from monopolizing the system 3. Privileged instructions - can only be executed by the monitor 4. Interrupts - gives OS more flexibility in controlling user programs

Desirable hardware features for a batch OS

Thread: 1. Dispatchable unit of work 2. Includes a processor context (includes program counter and stack pointer) and its own data area to enable subroutine branching 3. Executes sequentially and is interruptable Process: 1. A collection of one or more threads and associated system resources 2. The programmer has greater control over the modularity of the application and the time of application-related events

Distinctions between thread and process

Virtualization

Enables a single PC or server to simultaneously run multiple operating systems or multiple sessions of a single OS. A machine can host numerous applications, including those that run on different operating systems, on a single platform.

1. User mode 2. Kernel mode

Modes of operation

Kernel Mode

Monitor executes in kernel mode. Privileged instructions may be executed and protected areas of memory may be accessed.

Execution Context (Process State)

The internal data by which the OS is able to supervise and control the process. Includes the contents of the various processor registers, such as the program counter and data registers. Includes information such as the priority of the process and whether the process is waiting for the completion of a particular I/O event.

Multiprogramming

The technique of keeping multiple programs that compete for access to the CPU in main memory at the same time so that they can execute

Serial Processing Systems

No operating system; programmers interacted directly with the computer hardware. Computers ran from a console with display lights, toggle switches, some form of input device, and a printer

Processes share a file system under other I/O resources. System allocates real memory and I/O resources to the processes. ISA provides the interface between the system and the machine.

OS perspective in VM architecture.

1. Program development 2. Program execution 3. Access to I/O devices 4. Controlled access to files 5. System access 6. Error detection and response 7. Accounting

Operating system services

Simple Batch Systems

Operating system that makes use of a monitor. In this system: 1. The user no longer has access to the processor 2. Job is submitted to computer operator who batches them together and places them on an input devices 3. Programs are designed to branch back to the monitor when finished executing

Kernel or nucleus

Portion of the OS in main memory, which contains the most frequently used functions in the OS and, at a given time, other portions of the OS currently in use

Resident Monitor

Portion of the monitor that always resides in main memory in order to control the sequence of events

The machine on which it executes consists of the virtual memory space assigned to the process. The processor registers it may use. The user-level machine instructions it may execute. OS system calls it may invoke for I/O. ABI defines the machine as seen by a process.

Process perspective in VM architecture

Paging mechanism

Provides for dynamic mapping between the virtual address used in the program and a real address in main memory

Distributed Operating System

Provides the illusion of: - A single main memory space - Single secondary memory space - Unified access facilities (such as distributed file systems)

Virtual Machine Monitor (VMM; aka hypervisor)

Runs on top of (or is incorporated into) the host OS. Handles each operating system's communications with the processor, the storage medium, and the network. Provides a layer between software environments and the underlying hardware and host OS.

1. Some main memory is now given over to the monitor 2. Some processor time is consumed by the monitor

Sacrifices of a simple batch system

Job Control Language (JCL)

Special type of programming language used to provide instructions to the monitor > what compiler to use > what data to use

1. Serial Processing 2. Simple Batch Systems 3. Multiprogrammed Batch Systems 4. Time Sharing Systems

Stages of evolution of operating systems

1. Simultaneous concurrent processes or threads - kernel routines need to be reentrant to allow several processors to execute the same kernel code simultaneously 2. Scheduling - any processor may perform scheduling, which complicates the task of enforcing a scheduling policy 3. Synchronization - with multiple active processes having potential access to shared address spaces or shared I/O resources, care must be taken to provide effective synchronization (enforces mutual exclusion and event ordering) 4. Memory Management - the reuse of physical pages is the biggest problem of concern 5. Reliability and fault tolerance - OS should provide graceful degradation of performance in the face of processor failure

Symmetric Multiprocessor OS Considerations

1. An executable program 2. The associated data needed by the program 3. The execution context of the program

Three components of a process

1. Fairness 2. Differential responsiveness 3. Efficiency

Three factors of scheduling and resource management

1. Instruction set architecture (ISA) 2. Application binary interface (ABI) 3. Application programming interface (API)

Three key interfaces in a typical computer system

1. Multiprogramming batch operation 2. Time sharing 3. Real-time transaction systems

Three major lines of computer system development that created problems in timing and synchronization that contributed to the development of the concept of the process

1. Convenience 2. Efficiency 3. Ability to evolve

Three objectives of an OS

1. Scheduling - most installations used a hardcopy sign-up sheet to reserve computer time. Time allocations could run short or long, resulting in wasted computer time 2. Setup Time - a considerable amount of time was spent just on setting up the program to run

Two main problems associated with serial processing systems

Object-Oriented design

Used for adding modular extensions to a small kernel. Enables programmers to customize an OS without disrupting system integrity. Eases the development of distributed tools and full-blown distributed operating systems.

User Mode

User program executes in user mode. Certain areas of memory are protected from the users use and certain instructions may not be executed

Process Virtual Machine

Virtual platform for executing a single process and is created when the process is created and terminated when the process is terminated. Presents and ABI to an application process, translates a set of OS and user-level instruction composing one platform to those of another.

System Virtual Machine

Virtualizing software that translates the ISA used by one hardware platform to that of another.


Kaugnay na mga set ng pag-aaral

Practice for Test 2 (Chapters 9,10,11, & 16)

View Set

Section 5 Intro to buisness test

View Set

помилки числівники + займенники

View Set

N316B: C&F Chapter 27 Disorders of Male Reproductive System

View Set