重大本科四门专业课操作系统chapter_第1页
重大本科四门专业课操作系统chapter_第2页
重大本科四门专业课操作系统chapter_第3页
重大本科四门专业课操作系统chapter_第4页
重大本科四门专业课操作系统chapter_第5页
已阅读5页,还剩59页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Chapter

3Process

Description

and

ControlOutlineProcess

ConceptElements,

PCB,

TraceProcess

StateTwo

state

model,

Five-State

model,Suspended

processProcess

descriptionProcess

ControlExecution

of

OSSecurity

IssuesRequirements

of

anOperating

System

Interleave

the

execution

of

multipleprocesses,

to

maximize

processorutilization

while

providing

reasonableresponse

timeAllocate

resources

to

processes

Support

interprocess

communication

anduser

creation

of

processesProcess

ConceptProcessA

program

in

execution

An

instance

of

a

program

running

on

acomputer

The

entity

that

can

be

assigned

to

andexecuted

on

a

processor

A

unit

of

activity

characterized

by

theexecution

of

a

sequence

of

instructions,

acurrent

state,

and

an

associated

set

ofsystem

instructionsProcess

ElementsIdentifierStatePriorityProgram

counterProcess

ElementsMemory

pointersContext

dataI/O

status

informationAccounting

informationProcess

Control

BlockContains

the

process

elements

Created

and

manage

by

the

operatingsystemAllows

support

for

multiple

processesProcess

Control

BlockTrace

of

the

Process Sequence

of

instruction

that

execute

for

aprocess

Dispatcher

switches

the

processor

fromone

process

to

anotherExample

ExecutionTrace

of

ProcessCombined

Trace

of

ProcessProcess

StateTwo-State

Process

ModelProcess

may

be

in

one

of

two

statesRunningNot-runningQueuing

DiagramProcess

CreationProcess

TerminationProcess

TerminationQueuingProcessesNot-running

ready

to

executeNot-running

blockDispatcher

must

scan

list

to

find

process

not-running,

ready,

and

in

queue

the

longestA

Five-State

ModelRunningReadyBlockedNewExitFive-State

Process

ModelProcess

StatesUsing

Two

QueuesMultiple

Blocked

QueuesSuspended

Processes

Processor

is

faster

than

I/O

so

allprocesses

could

be

waiting

for

I/O

Swap

these

processes

to

disk

to

free

upmore

memory

Blocked

state

becomes

suspend

statewhen

swapped

to

diskTwo

new

states–

Blocked/Suspend–

Ready/SuspendOne

Suspend

StateTwo

Suspend

StatesReason

for

ProcessSuspensionProcess

DescriptionProcess

and

ResourcesProcesses

and

ResourcesOperating

System

ControlStructures

Information

about

the

current

status

ofeach

process

and

resource

Tables

are

constructed

for

each

entity

theoperating

system

managesOS

Control

TablesMemory

TablesAllocation

of

main

memory

to

processes

Allocation

of

secondary

memory

toprocesses

Protection

attributes

for

access

to

sharedmemory

regions

Information

needed

to

manage

virtualmemoryI/O

TablesI/O

device

is

available

or

assignedStatus

of

I/O

operation

Location

in

main

memory

being

used

asthe

source

or

destination

of

the

I/OtransferFile

TablesExistence

of

filesLocation

on

secondary

memoryCurrent

StatusAttributes

Sometimes

this

information

is

maintainedby

a

file

management

systemProcess

TablesManage

processesProcess

control

block–

Process

image

is

the

collection

of

program.Data,

stack,

and

attributesElements

of

a

ProcessControl

BlockElements

of

a

ProcessControl

BlockElements

of

a

ProcessControl

BlockElements

of

a

ProcessControl

BlockProcessor

State

InformationContents

of

processor

registersUser-visible

registersControl

and

status

registersStack

pointersProgram

status

word

(PSW)contains

status

informationExample:

the

EFLAGS

register

on

PentiumprocessorsPentium

II

EFLAGS

RegisterProcess

ControlModes

of

ExecutionUser

modeLess-privilegedmodeUser

programs

typically

execute

in

this

mode

System

mode,

controlmode,

or

kernelmodeMore-privileged

modeKernel

of

the

operating

systemProcess

CreationAssign

a

unique

process

identifierAllocate

space

for

the

processInitialize

process

control

blockSet

up

appropriate

linkagesCreate

or

expand

other

data

structuresWhen

to

Switch

ProcessClock

interruptprocess

has

executed

for

the

maximumallowable

time

sliceI/O

interruptMemory

faultmemory

address

is

in

virtual

memory

so

itmust

be

brought

into

main

memoryWhen

to

Switch

a

ProcessTraperror

or

exception

occurredmay

cause

process

to

be

moved

to

Exit

stateSupervisor

callsuch

as

file

openChange

of

Process

State

Save

context

of

processor

includingprogram

counter

and

other

registers

Update

the

process

control

block

of

theprocess

that

is

currently

in

the

Runningstate

Move

process

control

block

to

appropriatequeue

ready;

blocked;

ready/suspendChange

of

Process

StateSelect

another

process

for

execution

Update

the

process

control

block

of

theprocess

selected

Update

memory-management

datastructuresRestore

context

of

the

selected

processExecution

of

OSExecution

of

the

OperatingSystemNon-process

KernelExecute

kernel

outside

of

any

processOperating

system

code

is

executed

as

aseparate

entity

that

operates

in

privilegedmodeExecution

Within

User

ProcessesOperating

system

software

within

context

of

auser

processProcess

contains

kernel’s

data,program,stackMode

switch and

process

switchExecution

of

the

OperatingSystemProcess-based

operating

systemImplement

the

OS

as

a

collection

of

systemprocessMajor

kernel

functions

are

organized

asseparate

processes,

such

as

resource

monitorModular

OSFor

multiprocessorExecution

of

the

OperatingSystemOS

Executes

in

User

SpaceSecurity

IssuesSecurity

IssuesSystem

access

threatsIntrudersMalicious

softwareSecurity

IssuesCountermeasuresIntrusion

detectionAuthenticationAccess

controlFirewallsUnix

Process

ManagementUnix

SVR4Execution

of

Unix

Most

of

the

OS

execute

within

UserProcessesSyste

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论