GESTION E LA VIRTUELLE Trnsltion loiqu physiqu ménism (MMU) prottion Mémoir virtull Allotion l mémoir ornistions t lorithms intrtion v l'llotion u t l swppin similrité v l'llotion s ihirs Chrmnt p sur mn Alorithms rmplmnt p Prormn - tmps ès - sp Allotion ontiuë prtitions ixs prtitions vrils lorithms Gstion s ps t éroulmnt ( thrshin ) Ch mémoir Mémoir piné Mémoir smnté Mémoir smnté t piné ORGANISATION E LA - MULTI-PROGRAMMATION - Esp loiqu NOYAU Allotion & mppin prossus # Contiuë Piné Linéir Contiuë Piné Smnté Smnté Smnté Trnsltion ' loiqu --> physiqu - lors u hrmnt - à l'xéution - ynmiqu (mtéril spéil) P prossus # P & Piné Prolèms: prottion prormn ARESSE LOGIQUE VS ARESSE PHYSIQUE - MMU ( unité stion mémoir ) onnés À quoi orrsponnt ls s ns l o n mémoir? onnés Prossus mov _, _ jmp MMU + rltivs u prossus + oivnt êtr truits (trnsltion ') MMU
Trnsltion ' Prottion mémoir onnés onnés ristr + s + < limit Arss loiqu vs physiqu COE INSTRUC- TION + MMU ristr ARESSE. Gstion s s Prormm C int ; =... pr. COMPILA- TION COE ATA -6 ESPACE LOGIQUE s ESPACE PHYSIQUE xx COE ÉITEUR E LIENS pr.o (oj) ihirs OJ loiqu + physiqu ATA CHARGEMENT ET EXÉCUTION r. Prormm pr.out (x) r. + COE ATA Sour Vr A Pro A = i(...) thn TRANSLATION 'ARESSE Compiltion Moul Ojt MOV, A tst JS L CHARGEMENT EN Mémoir Pro. A Pro ÉITEUR E LIENS Co xéutl Ojt A Ojt A Ojt Ojt L ihir sour xtrn int vr_ int vr_ stti int vr_ voi un_( ) { int lol_ } COMPOSITION 'UN MOULE OJET ihir ojt un_ vr_ vr_ COE vr_ vr_ mov onnés onstnts vrils vrils intrns (réérns) xport vr_ r_ un_ r_ privés vr_ r_ vrils xtrns import vr_? vr_ list s réérns
- ormt ELF ormt ELF tl s symols - nom (strt) - +stion tls rlotistion - # symol - position Moul ojt ou Fihir xéutl Éition s lins ) Résour ls réérns xtrns ) L'ssintion mémoir ) Rlolistion s symols ALLOCATION CONTIGUË Un ristr pour l' s trnsltion ' Un ristr limit (till) prottion onnés s + < limit - - PARTITIONS FIXES L nomr t l till s prtitions sont ixs - ALLOCATION ET GESTION ES TÂCHES (llotion s prossus - hut nivu) P NOYAU P Prtition A Prtition Un il pr prtition., M, M., M, M, M Noyu M 6 M M Alorithm 'llotion s tâhs SPN PRIORITÉ
Un sul il M, 7 M, M, M, Noyu M 6 M PARTITIONS VARIALES ou ynmiqus L nomr t l till s prtitions sont vrils NOYAU -5 Prolèms - séltion l rnur s prtitions - rmnttion intrn M P Prolèms - rmnttion xtrn - mintnir un list s sps isponils ( trous ) P Alorithm FIRST-FIT -6 Choisi l PREMIER sp lir à prtir u ÉUT l list s sps lirs mns List s sps lirs éut till 6 M M 6 M lir lir lir M lir - un list oronné slon l'? utrs ritèrs - rpris l rhrh u éut l list Alorithm FIRST-FIT Alorithm FIRST-FIT Choisi l PREMIER sp lir à prtir u ÉUT l list s sps lirs mns List s sps lirs éut till ' M M ' lir lir M lir M Choisi l PREMIER sp lir à prtir u ÉUT l list s sps lirs mns List s sps lirs éut till ' M ' 9 M M ' ' 9 M lir lir M lir M - un list oronné slon l' - rpris l rhrh u éut l list - un list oronné slon l' - rpris l rhrh u éut l list
Alorithm FIRST-FIT Alorithm NEXT-FIT Choisi l PREMIER sp lir à prtir u ÉUT l list s sps lirs mns List s sps lirs éut till ' M ' 9 M ' 6 M ' ' ' 9 M lir lir 6 M lir M Choisi l PREMIER sp lir SUIVANT l rnièr insrtion ns l list s sps lirs mns List s sps lirs éut till 6 M M 6 M lir lir lir M lir - un list oronné slon l' - rpris l rhrh u éut l list - un list oronné slon l' - rpris l rhrh à l suit l rnièr insrtion Alorithm NEXT-FIT Alorithm NEXT-FIT Choisi l PREMIER sp lir SUIVANT l rnièr insrtion ns l list s sps lirs mns List s sps lirs éut till 6 M ' 7 M 6 M lir lir lir 7 M lir - un list oronné slon l' - rpris l rhrh à l suit l rnièr insrtion ' Choisi l PREMIER sp lir SUIVANT l rnièr insrtion ns l list s sps lirs mns List s sps lirs éut till 6 M '' M 6 M lir lir lir M lir - un list oronné slon l' - rpris l rhrh à l suit l rnièr insrtion '' Alorithm NEXT-FIT Choisi l PREMIER sp lir SUIVANT l rnièr insrtion ns l list s sps lirs mns List s sps lirs éut till ' M '' M lir lir M lir - un list oronné slon l' - rpris l rhrh à l suit l rnièr insrtion ' '' M Alorithm NEXT-FIT Choisi l PREMIER sp lir SUIVANT l rnièr insrtion ns l list s sps lirs Nouvu éprt mns List s sps lirs éut till 6 M M 6 M lir lir lir M lir - un list oronné slon l' - rpris l rhrh à l suit l rnièr insrtion
Alorithm NEXT-FIT Alorithm NEXT-FIT Choisi l PREMIER sp lir SUIVANT l rnièr insrtion ns l list s sps lirs 6 M lir Choisi l PREMIER sp lir SUIVANT l rnièr insrtion ns l list s sps lirs 6 M lir mns List s sps lirs éut till 6 M ' M M ' lir M lir M mns List s sps lirs éut till 6 M ' M M ' lir M lir M - un list oronné slon l' - rpris l rhrh à l suit l rnièr insrtion - un list oronné slon l' - rpris l rhrh à l suit l rnièr insrtion Alorithm NEXT-FIT Alorithm EST-FIT Choisi l PREMIER sp lir SUIVANT l rnièr insrtion ns l list s sps lirs mns List s sps lirs éut till 6 M ' M ' 6 M ' ' 6 M lir lir 6 M lir M Choisi l PLUS PETIT sp lir ns l list s sps lirs mns List s sps lirs éut till 6 M M 6 M lir lir lir M lir - un list oronné slon l' - rpris l rhrh à l suit l rnièr insrtion un list oronné slon l till l plus ptit Alorithm EST-FIT Alorithm EST-FIT Choisi l PLUS PETIT sp lir ns l list s sps lirs 6 M lir Choisi l PLUS PETIT sp lir ns l list s sps lirs 6 M lir mns List s sps lirs éut till ' M 6 M M ' lir M lir M mns List s sps lirs éut till ' M 6 M M ' lir M lir M un list oronné slon l till l plus ptit un list oronné slon l till l plus ptit
Alorithm EST-FIT Alorithm WORST-FIT Choisi l PLUS PETIT sp lir ns l list s sps lirs mns List s sps lirs éut till ' M ' M M ' ' lir M lir M M Choisi l PLUS GRAN sp lir ns l list s sps lirs mns List s sps lirs éut till M 6 M 6 M lir lir lir M lir un list oronné slon l till l plus ptit un list oronné slon l till l plus rn Alorithm WORST-FIT Alorithm WORST-FIT Choisi l PLUS GRAN sp lir ns l list s sps lirs mns List s sps lirs éut till ' 7 M 6 M un list oronné slon l till l plus rn ' 6 M lir lir lir 7 M lir Choisi l PLUS GRAN sp lir ns l list s sps lirs mns List s sps lirs éut till 6 M '' M un list oronné slon l till l plus rn '' 6 M lir lir lir M lir Alorithm WORST-FIT - Choisi l PLUS GRAN sp lir ns l list s sps lirs mns List s sps lirs éut till '' M ' M un list oronné slon l till l plus rn ' '' lir lir M lir M Allotion 'un sp 6K
COMPACTION - Eiité minimisr ls éplmnts ALLOCATION U t GESTION ES TRAVAUX rétion 'un prossus hrmnt n mémoir SWAP IN il 'ttnt s trvux isqu stok sur isqu sur isqu n mémoir SWAP OUT nouvu trvil trnsrt sur isqu - trvux 5 mémoir 6 K K K 7 K 5 K Exéution trvux v llotion mémoir hrmnt (llotion s trvux) llotion mémoir First-Fit llotion u Roun-Roin tmps pu 5 5 () in in - il 'ttnt in in in 5 E / S 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 il 'ttnt E / S ALLOCATION E TRAVAUX + hrmnt + llotion l mémoir v First-Fit + llotion u v Roun-Roin (Q=) Allotion l mémoir tmps 5 6 7 5 5 A 5 5 C 5 5 C 5 5 5 5 5 5 E 5 5 5 E 5 5 - Arr 'ppls proéurs Rouvrmnt (Ovrly) smnttion mnull - trvil mémoir A K ut 5 K ut C K ut 5 K ut E 6 K ut 9 Allotion u trmin trmin trmin trmin trmin A C E tmps 5 6 7 A 9 C 9 C 9 9 95 E 95 E
Rouvrmnt (Ovrly) PAGINATION - Fihir rouvrmnt loiqu mémoir physiqu p p éplmnt mémoir éplmnt = moulo till s ps no p = / till s ps ALLOCATION NON CONTIGÜE ES PAGES - -5 mémoir physiqu - P - ESPACE LOGIQUE ivision l'sp n ps éplmnt ESPACE PHYSIQUE P - P - P - p # p loiqu + p+ # p physiqu Tl s ps Pintion éplmnt p éplmnt p p # p loiqu p + + p+ # p physiqu 5 p p p p p p # p # p 5 loiqu physiqu
-7 - Tl s ps ristrs P r K mémoir s ristr ès mémoir ristr ssoiti Utilistion 'un TL pour l trution ' -5-7 TEMPS 'ACCÈS EFFECTIF À LA Tmps ti = tmps moyn Fir l somm ponéré s iérnts s possils Tmps ti = Tmps( s k) Pro( s k) Tmps ti = Tmps( s ) Pro( s ) + Tmps( s ) Pro( s ) + Tmps( s ) Pro( s ) pro tmps pro tmps % T % T -9 Aès irt Mémoir ssoitiv 5% T % T % 5% T % T pro tmps pro tmps % T % T 5% T % T % 5% T % T Tmps ti = Tmps( s k) Pro( s k) =. T +. (.5 T +.5 T ) =. T +. T +. T TEMPS 'ACCÈS EFFECTIF À LA ès mémoir = nnosons vériition ns l TL = nnosons (Trnsltion Look-si urs) Tux réussit u TL = % (hit rtio) tmps 'ès ti =. x ( ns + ns ) +. x ( ns + ns + ns) = ns roissmnt % -
TEMPS 'ACCÈS EFFECTIF À LA ès mémoir = nnosons vériition ns l TL = nnosons (Trnsltion Look-si urs) Tux réussit u TL = 9 % (hit rtio) Un tl s ps pr prossus Prossus Co A Co Co C t t r only / r writ 6 ro v ro v ro v rw v 5 rw v Tl s ps vli / invli 5 Mémoir Co C t Co E t - tmps 'ès ti =.9 x ( ns + ns ) +. x ( ns + ns + ns) = ns roissmnt % Prossus P Co Co E Co t 7 ro v ro v ro v 9 rw v i Tl s ps 6 7 9 Co A Co t Co Un tl s ps pr prossus Prottion stion l tl s ps prt s ps ntr prossus roits 'ès its ns l tl s ps + r-only / r-writ + vli / invli -7 Un sul tl s ps lol + v smnttion pour l ontrôl s roits 'ès + its 'intiition prossus tl s ps invrsé Tl s ps à plusiurs nivux - TALE INVERSÉE ES PAGES Prossus Co A Co éplmnt # p loiqu Mémoir Co C t - inx ns l tl hut nivu inx ns l tl s nivu éplmnt ns l p Co C t t Prossus P Co Co E Co F t? p P P P P 5 6 7 9 Tl invrsé s ps 5 6 7 9 Co E t Co A Co t Co Co F
FONCTION E HASHING POUR TALE INVERSÉE # p loiqu roup A roup roup C # roup éut list Tl invrsé s ps 9 5 6 7 5 9 # p physiqu 9 9 P S S S S S SEGMENTATION mémoir physiqu - S P - S - S P - S P - S -5 SEGMENTATION sp loiqu o -- prormm onnés -- vrils -- pil (stk) Smnt moul ou ojt Moiir l mtéril pour l ir orrsponr à l'im (loiqu) l'usr. Arss < # smnt >, < éplmnt > mov A, -5 Similrités v prtitions till vril roup pintion ps till vril Souplss possiilité lins ynmiqus Prottion t prt simpliiés Frmnttion xtrn omm prtitions vrils < its> < its> s # s. éplmnt < its> < its> s # s. éplmnt Sour Vr A Pro A = i(...) thn TRANSLATION 'ARESSE Compiltion Moul Ojt A Pro L MOV, A tst JS L ÉITEUR E LIENS Co xéutl Ojt A Ojt A Ojt Ojt TALE ES SEGMENTS Un smnt prtition vril Plusiurs smnts -7 CHARGEMENT EN Mémoir Pro.
-7-7 Un prormm st omposé plusiurs smnts -7 Prt smnts - Stll. 5
s smntés t pinés PC/RT t Pntium -9 PC/RT (IM 65) Pss 'un loiqu its à un virtull étnu sur its u PC/RT - pintion invrsé u PC/RT - TALE INVERSÉE ES PAGES Prossus Co A Co éplmnt # p loiqu Mémoir Co C t - Co C t t Prossus P Co Co E Co F t? p P P P P 5 6 7 9 Tl invrsé s ps 5 6 7 9 Co E t Co A Co t Co Co F FONCTION E HASHING POUR TALE INVERSÉE # p loiqu # roup # p physiqu 9 PENTIUM - roup A roup roup C éut list Tl invrsé s ps 9 5 6 7 5 9 9 Ristrs sélturs Tls sripturs smnts
PENTIUM - Pintion à nivux u Pntium - Ristrs sélturs Tls sripturs smnts