操作系统笔记 第二章 进程管理

第二章 进程管理

image-20210911224822595

1.进程与线程

1.1进程的概念,组成,特征

image-20210906220014121

程序:是静态的,就是个存放在磁盘里的可执行文件,就是一系列的指令集合。
进程(Process) :是动态的,是程序的一次执行过程
同一个程序多次执行会对应多个进程

image-20210906221056738

image-20210906221114531

image-20210906222033599

image-20210906221839977

image-20210906222142285

image-20210906222316984

1.2进程的状态与转换,进程的组织

image-20210906222524770

image-20210906222909134

image-20210906223053575

image-20210906223241268

image-20210906223944787

image-20210906224135579

image-20210906224523180

image-20210906224614894

image-20210906224713261

image-20210906224743629

image-20210906224752434

image-20210906224810301

1.3进程的控制

image-20210907214932707

image-20210907214947872

image-20210907215229397

image-20210907215512035

image-20210908201312024

image-20210908201448303

image-20210908201906572

image-20210908202253073

image-20210908204410078

image-20210908204454909

image-20210908205120885

1.4线程的概念

image-20210908205206469

image-20210908213403759

image-20210908213422227

image-20210908213634930

image-20210908213747045

1.5线程的实现(多线程模型)

image-20210908213830852

image-20210908214421936

image-20210908214725422

image-20210908221523691

内核级线程是处理机调度的基本单位

image-20210908221752695

image-20210908221823334

image-20210908221949467

image-20210908222016712

2.处理机调度

2.1调度的概念

image-20210909205604042

image-20210909205836938

image-20210909210044012

image-20210909210327198

image-20210909210533875

image-20210909210656312

image-20210909210712951

2.2进程(低级)调度的时机,切换,方式

image-20210909210819248

image-20210909211732768

image-20210909211648566

image-20210909211914714

image-20210909212106142

image-20210909212133079

2.3调度算法的评价指标

image-20210909212402704

image-20210909212700894

image-20210909212738366

image-20210909213104851

image-20210909213032127

image-20210909213300421

image-20210909213329243

image-20210909213345196

2.4调度算法

2.4.1先来先服务算法(FCFS)

image-20210909213511609

image-20210909214524613

image-20210909214059453

2.4.2短作业优先算法(SJF)

image-20210909214823903

image-20210909220241546

2.4.3高响应比优先算法(HRRN)

image-20210909220801256

image-20210909220659673

image-20210909220843721

image-20210909221059001

2.4.4时间片轮转算法(RR)

image-20210909221916438

image-20210909221639579

image-20210909221815800

2.4.5优先级调度算法

image-20210909222510982

image-20210909222105953

image-20210909222247174

image-20210909222447971

2.4.6多级反馈队列调度算法

image-20210909223208988

image-20210909223137617

image-20210909223342433

3.进程同步

3.1进程同步,进程互斥

image-20210909223751579

image-20210909223837691

image-20210909223925528

image-20210909224045947

image-20210909224058590

3.2进程互斥的实现方法

image-20210910212506697

3.2.1 软件实现方法

单标志法

image-20210910212948046

image-20210910213633664

双标志先检查法

image-20210910214524629

双标志后检查法

image-20210910214441176

Peterson算法

image-20210910220047054

image-20210910220104628

3.2.2硬件实现方法

image-20210910220134905

中断屏蔽方法

image-20210910220308103

TestAndSet指令

image-20210910220649770

Swap指令

image-20210910220850969

image-20210910220916499

3.3信号量机制

image-20210910221115723

image-20210910221403287

image-20210910221928684

image-20210910222406583

image-20210910223157783

image-20210910223313113

image-20210910223339659

3.4使用信号量机制实现互斥,同步,前驱

image-20210910223530896

image-20210910223944672

image-20210910224118396

image-20210910224344605

image-20210910224615768

image-20210910224727120

3.5生产者-消费者问题

image-20210910225225148

image-20210910225353994

image-20210910225506454

image-20210910225732188

image-20210910230048930

image-20210910230129743

3.6多生产者-多消费者问题

image-20210910230658355

image-20210910230635712

image-20210910231124054

image-20210910231151575

image-20210910231529976

image-20210910231947017

image-20210910232123252

3.7吸烟者问题

image-20210911202512955

image-20210911202742196

image-20210911202924084

image-20210911203305640

image-20210911203547833

3.8 读者-写者问题

image-20210911205232553

image-20210911205206505

image-20210911210039188

image-20210911211310812

image-20210911211447091

3.9哲学家进餐问题

image-20210911211713812

image-20210911212120415

image-20210911213036475

image-20210911212909939

image-20210911213004705

3.10 管程

image-20210911213106233

image-20210911213219582

image-20210911213605091

image-20210911213814783

image-20210911214056890

image-20210911214143392

image-20210911214206999

4 死锁

image-20210911214329970

4.1死锁的概念

image-20210911214438815

image-20210911214612038

image-20210911214735178

image-20210911215227956

image-20210911215341730

image-20210911215424955

image-20210911215457965

4.2预防死锁

image-20210911215542270

image-20210911215746201

image-20210911220011155

image-20210911220212734

image-20210911220623225

image-20210911220641457

4.3 避免死锁

image-20210911220719097

image-20210911221013109

image-20210911221214000

image-20210911221422578

image-20210911221648606

image-20210911221723945

image-20210911221926648

image-20210911222047395

4.4死锁的检测和解除

image-20210911222200493

image-20210911222332841

image-20210911222641262

image-20210911222813940

image-20210911223030323

image-20210911223109384

posted @ 2021-09-11 22:50  有空就一起吃饭吧  阅读(91)  评论(0编辑  收藏  举报