UD II : Gerência de Processos – parte 2 Referências: • ASO – F. B. Machado – cap 5, 6, 8, 14 e 15 • SOM - A.S. Tanenbaum – cap 1, 2, 10 e 11 • SO com Java - Silberschatz – cap 7, 8, 20 e 21 • SO - Deitel - cap 3, 4, 8, 20 e 21 (Adaptado de Arquitetura de Sistemas Operacionais de F. B. Machado e Sistemas Operacionais Modernos de A. S. Tanenbaum)

1

Ambiente Monothread (ASO-M)

Thread

Thread

Thread

2

The Thread Model (SOM-TB)

3

Ambiente Multithread - 1(ASO-M)

Contexto de hardware

Contexto de hardware

Thread 1

Thread 2

Thread 3

Contexto de software

Contexto de hardware

Espaço de endereçamento

4

Threads: private and shared items (SOM-TB)

5

Each thread has its own stack (SOM-TB)

6

Ambiente multithread - 2 (ASO-M) Processo

Programa Principal

Thread_1 PC SP

Call Sub_1

Hardware

Variáveis

Contexto de

...

Espaço de endereçamento

Ret

Thread_3 PC SP

Sub_2

Hardware

PC SP

Sub_1

Contexto de

Thread_2

Hardware

Fim

Contexto de

Call Sub_2

...

Ret

7

Aplicação multithread - 1 (ASO-M)

T h r ea d d e en tr ada

B u f f er

T h r ea d d e exi bi ção

T h r ea d d e g r avaçã o

8

Aplicação multithread - 2 (ASO-M) Processo servidor

Solicitações

Thread

Thread

Thread

Processo cliente

Processo cliente

Processo cliente

9

A word processor with three threads (SOM-TB)

10

A multithreaded Web server (SOM-TB)

11

Rough outline of code for previous slide

(a) Dispatcher thread (b) Worker thread 12

Three ways to construct a server (SOM-TB)

13

Arquitetura e Implementação (ASO-M)

• • • •

Threads em modo usuário Threads em modo kernel Threads em modo híbrido Scheduler Activations

14

Thread 4

Thread 3

Thread 2

Thread 1

Thread 0

Threads em modo usuário

(ASO-M)

Modo usuário

Biblioteca Kernel

Modo kernel

15

Implementing Threads in User Space (SOM-TB)

16

Kernel

Th rea d 4

Th rea d 3

Th read 2

Thr ead 1

Thr ead 0

Threads em modo Kernel

(ASO-M)

Modo usuário

Modo kernel

17

Implementing Threads in the Kernel (SOM-TB)

18

TMU 5

TMU 4

TMU 3

TMU 2

TMU 1

TMU 0

Threads em modo híbrido

(ASO-M)

Modo usuário

Biblioteca

TMK 0

TMK 1

TMK 2

TMK 3 Modo kernel

Kernel

19

Hybrid Implementations (SOM-TB)

Multiplexing user-level threads onto kernel-level threads 20

Thread 4

Thread 3

Thread 2

Thread 1

Thread 0

Scheduler Activations: ED BIB Threads (ASO-M)

Modo usuário

Biblioteca

Kernel

Modo kernel

21

Scheduler Activations (SOM-TB) • Goal – mimic functionality of kernel threads – gain performance of user space threads

• Avoids unnecessary user/kernel transitions • Kernel assigns virtual processors to each process – lets runtime system allocate threads to processors

• Problem: Fundamental reliance on kernel (lower layer) Calling procedures in user space (higher layer)

22

Pop-Up Threads (SOM-TB)

• Creation of a new thread when message arrives (a) before message arrives (b) after message arrives 23

Making Single-Threaded Code Multithreaded (1)

Conflicts between threads over the use of a global variable 24

Making Single-Threaded Code Multithreaded (2)

Threads can have private global variables 25

UD II : Gerência de Processos – parte 2 Ref: ASO ...

11. A multithreaded Web server (SOM-TB) ... 13. Three ways to construct a server (SOM-TB) ... gain performance of user space threads. • Avoids unnecessary ...

1MB Sizes 0 Downloads 50 Views

Recommend Documents

Fundamentos de Administracion MUNCH GALINDO Parte 01 ...
Whoops! There was a problem loading more pages. Retrying... Fundamentos de Administracion MUNCH GALINDO Parte 01 PRACTICA.pdf. Fundamentos de ...

Parte 4: Coleta de Metadados - LexML
tag Item is now optional and unbounded ... Campo Texto e algumas tags html, com atributo .... .

Inovação e Gerenciamento de Processos
cliente, apoiando-se nos fundamentos da qualidade total, análise de valor, just in time, entre outros. Ao observar o processo como um fluxo gerador de valor, ...

Parte 4: Coleta de Metadados - LexML
A Figura 2 apresenta um exemplo de cabeçalho de registro compatível com o .... http://www.openarchives.org/OAI/openarchivesprotocol.html - OAI-PMH. 7.

parte de arriba de la caja.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. parte de arriba ...

UNIDAD II parte 4 Vol Redox 2017.pdf
-2. + 14H+. + 6ē 2Cr3+. + 7H2O. Page 4 of 28. UNIDAD II parte 4 Vol Redox 2017.pdf. UNIDAD II parte 4 Vol Redox 2017.pdf. Open. Extract. Open with.

parte de abajo de la caja.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... parte de abajo de la caja.pdf. parte de abajo de la caja.pdf. Open.

MPSC ASO & STI Recruitment 2017 for [email protected] ...
-6# (calculator) K3 ;! ! ह ! '/ह3 !B ` ! , +:8 2, 3 ! 6I. 3 7 K. घ. 0 ह. 6 ह3. # !B `2ह 7 3 $. 822. 9 ह. TRIAL MODE − a valid license will remove this message. See the keywords property of this PDF for more information. www.GetResults

3 NUEVA-ERA-II-COMIENZO-1-PARTE-Continuacion ...
Page 1. Whoops! There was a problem loading more pages. Retrying... 3 NUEVA-ERA-II-COMIENZO-1-PARTE-Continuacion-Nueva-Era-I-Profecia-18.pdf.

UD Sample.pdf
Page 2 of 8. Overview 01. Sections. Systems Thinking 02. Data 03. Startups To Watch 04. 0. 5 Industry Analysis. Page 2 of 8 ...

UD Sample.pdf
Overview 01. Sections. Systems Thinking 02. Data 03. Startups To Watch 04. 0. 5 Industry Analysis. Whoops! There was a problem loading this page.

StudentsKalvi.blogspot.com_(PT)Reg2009_tirunelveli(UD)_ ...
AN. FN. AN. FN. Session. www.studentskalvi.blogspot.com. Page 3 of 10. StudentsKalvi.blogspot.com_(PT)Reg2009_tirunelveli(UD)_novdec2015_jan2016.pdf.

RVM N° 195-2017-MINEDU PARTE 2.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. RVM N° ...

Rayas (Potamotrygonidae) de Suramérica. Parte I..pdf
Page 3 of 370. Rayas (Potamotrygonidae) de Suramérica. Parte I..pdf. Rayas (Potamotrygonidae) de Suramérica. Parte I..pdf. Open. Extract. Open with. Sign In.

j; 2, 1' Ii
Jun 13, 2006 - ABSTRACT. An EEPROM having a memory cell array in Which electri .... 2 F535:;2.i3 wzo mom. 2. Q m 0. N o' o'. THRESHOLD VOLTAGE ob.

Rayas (Potamotrygonidae) de Suramérica. Parte I..pdf
Instituto de Investigación de Recursos Biológicos. Alexander von Humboldt (IAvH). Editor: Carlos A. Lasso Alcalá. Revisión científica: Antonio Machado-Allison y.

a saga crepusculo:amanhecer parte 2.pdf
... 1 youtube. AsagacrepÃosculo amanhecer parte 2 telecine. Page 2 of 2. a saga crepusculo:amanhecer parte 2.pdf. a saga crepusculo:amanhecer parte 2.pdf.

Anatomy for Fantasy y Artist PARTE 2.pdf
Page 1 of 68. ARN.eBook. PARTE 2. Page 1 of 68. Page 2 of 68. ARN.eBook. Page 2 of 68. Page 3 of 68. ARN.eBook. Page 3 of 68. Anatomy for Fantasy y Artist PARTE 2.pdf. Anatomy for Fantasy y Artist PARTE 2.pdf. Open. Extract. Open with. Sign In. Main

Shiatzu-Zen-Shizuto-Masunaga-Parte-2.pdf
Page 3 of 49. Page 3 of 49. Shiatzu-Zen-Shizuto-Masunaga-Parte-2.pdf. Shiatzu-Zen-Shizuto-Masunaga-Parte-2.pdf. Open. Extract. Open with. Sign In.

Curso_Bombas-Rotativas-Diesel-EPIC parte 2.pdf
SENSOR POSICION ROTOR. tope de caudal. máximol. cala de. reglaje caudal. rotor. distribuidorl. cavidad. rotor captador. inductivol. ¿Cómo se mide?