1. Trang chủ
  2. » Giáo án - Bài giảng

The architecture of computer hardware and systems software an information technology approach ch15p1

31 153 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 31
Dung lượng 1,26 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Chapter 15The Internal Operating System – Part 1 15.1-4 Network Services File management Device management / Resource allocation Memory management / Scheduling Monitor IOCS I/O control

Trang 1

Chapter 15 – Part 1

The Internal Operating System

The Architecture of Computer Hardware

and Systems Software:

An Information Technology Approach

3rd Edition, Irv Englander John Wiley and Sons 2003

Trang 3

Target Model

Trang 4

Chapter 15

The Internal Operating System – Part 1 15.1-4

Network Services File management

Device management / Resource allocation

Memory management / Scheduling

Monitor

IOCS (I/O control system)

Translates logical file

requests

Load programs into MM

Allocates execution time

Provides overall system

control

Loading and Executing a Program

Trang 5

Multi-Tasking System

memory, I/O) to multiple processes

 Different scheduling routines are used for different objectives

Trang 6

Chapter 15

The Internal Operating System – Part 1 15.1-6

Processes

 Process: basic unit of work in the OS

 A program together with all the resources that are associated with it as it is executed

 Program: a file or listing

 Process: a program being executed

 Independent vs cooperating processes

 PID (process ID): a unique identifier for each process

 Process creation: user vs system

 Forking, spawning, cloning a new process

 Parent and child processes

Trang 7

Process Control Block

 A block of data for

each process in the

system

 Contains all relevant

information about the

process

 Typical process

control block on the

right 

Trang 8

Chapter 15

The Internal Operating System – Part 1 15.1-8

Two Processes Sharing a

Single Program

Trang 9

 Dispatching - Move from ready state to running state

 Wake-up - Move from blocked state to ready state

 Time-out - Move from running state to ready state

 Process completion

 Additional states – suspend, swap

 Resumption – Move from suspended state to ready state

Trang 10

Chapter 15

The Internal Operating System – Part 1 15.1-10

Process State Diagram

Trang 11

 Advantage of process/thread families over

multiple independent processes:

 Reduced OS overhead for resource allocation and process management

 Substantially less information than a normal PCB

Trang 12

(dispatcher)

Deciding which process shall be executed next by the processor Mid-level scheduling Swapping processes

I/O scheduling Deciding which process’s pending

I/O request shall be handled by an available I/O device

Trang 13

Dispatching Objectives

response time

Prevent starvation

Trang 14

Chapter 15

The Internal Operating System – Part 1 15.1-14

Nonpreemptive Dispatching

 First in, first out (FIFO)

 Unfair to short processes and I/O based

processes

 Shortest Job First (SJF)

 Longer jobs can be starved

 Priority Scheduling

 Dispatcher selects among jobs with the

same priorities

Trang 16

Chapter 15

The Internal Operating System – Part 1 15.1-16

Preemptive Dispatching

 Multilevel feedback queues

 Favors short jobs, I/O bound jobs

 Each level assigns more CPU time

Trang 18

Chapter 15

The Internal Operating System – Part 1 15.1-18

Memory Overlays

Trang 19

Virtual Memory

Virtual memory increases the apparent

amount of memory by using far less

expensive hard disk space

Provides for process separation

Trang 20

Chapter 15

The Internal Operating System – Part 1 15.1-20

Frames and Pages

Amount # of bits in instruction word Installed memory

Trang 21

Frames and Pages

Binary Paging

Trang 22

Chapter 15

The Internal Operating System – Part 1 15.1-22

Dynamic Address Translation

Trang 23

Disk

Page Frame

Pages not in main memory:

page fault when accessed

10 1 2 7

Page Table

Trang 26

Chapter 15

The Internal Operating System – Part 1 15.1-26

Page Replacement Algorithms

 Page fault - page is not in memory and must

be loaded from disk

 Algorithms to manage swapping

 First-In, First-Out FIFO – Belady’s Anomaly

 Least Recently Used LRU

 Least Frequently Used LFU

 Not Used Recently NUR

 Second Chance Replacement algorithms

 Thrashing

 too many page faults affect system performance

Trang 27

Virtual Memory Tradeoffs

Disadvantages

 SWAP file takes up space on disk

 Paging takes up resources of the CPU

Advantages

 Programs share memory space

 More programs run at the same time

 Programs run even if they cannot fit into

memory all at once

 Process separation

Trang 28

Chapter 15

The Internal Operating System – Part 1 15.1-28

Virtual Memory vs Caching

Trang 29

Secondary Storage Scheduling

 First-Come, First-Served

 Shortest Distance First

 Indefinite postponement problem

 Scan

 Middle of disk gets serviced twice

 N-Step C-Scan

 Disk seek in only one direction

 Return after last request in queue served

 Two queues

Trang 30

Chapter 15

The Internal Operating System – Part 1 15.1-30

Other OS Issues

 Two processes have one another’s

resources that the other needs in order to proceed

 Prevention

 Avoidance

 Detection and recovery

Trang 31

Java Virtual Machine

Ngày đăng: 10/01/2018, 16:24

TỪ KHÓA LIÊN QUAN