Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
20 views
Osmod 3
Uploaded by
fayizkozhikode
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save osmod3 For Later
Download
Save
Save osmod3 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
20 views
Osmod 3
Uploaded by
fayizkozhikode
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save osmod3 For Later
Carousel Previous
Carousel Next
Save
Save osmod3 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 14
Search
Fullscreen
Module 3 S Memory Management + Memory management is a method in the operating system to manage oper during process execution. +The main aim of memory management is + Toachieve efficient utilization of memory. + Toallocate and de-allocate memory before and after process execution. To keep track of used memory space by processes. ‘To maintain data integrity while executing of process. Address Binding? + High-level programs are loaded into the memory for their execution in the CPU, ‘The CPU transforms programs into processes and generates log! memory. addresses to communicate with the main Logical addresses are internal references in the virtual address space of a process. Processes know only the log eical address, whereas they need to access physical memory to fetch the instruction and data, Physical addresses index the locations in the ‘The Memory Management | ‘Mapping a logical address main memory. Unit (MMU) translates logical addresses into physical (RAM) addresses. to a physical address is called address binding or address mapping, ‘The Context of Address Binding + masource code, we have symbolic addresses. They are the ident other constructs. ‘The assembler maps them to relative numerical addresses, Relative address: point of the memory that the code will take. es show the offset to the starting However, the intial address isn’t determined in this phase. The assembler outputs object files and gives them to the linker. ‘The linker takes object files and other pleces of code to generate an. f8 of the variables, functions, classes, and executable file. First, it searches for all th lraries needed to execute the object fle and appends themto it one after another, After that, it establishes correctly so the modules can reference each other. * finally the output is passed tothe loader. Specifically, the loader allocates memory for the executable code a loads it ‘+ After that, we can execute the code. {Load time ==] eae @ scanned with OKEN Scanner- Types of Address Binding there are three mechanisms for address binding 1 2 3 4: Compile-Ti ‘compiler ean do the compile-time bindin, lati pi compile-time binding during compilation. inthis type of binding, it translates th + The symbolic addresses into absolute addresses. ‘An absolute address is an address expression with a fixed value that doesn’t depend it lepend on run-time considerations. Forit + we code 2.Load-Time Binding + Theload-time address binding ‘The load-time address binding takes place during the loading of a program into the memory. The operating tem memory manager (lade) ithe et ‘clement in charge. » Here, the compiler doesn’t do sym adresses. The loader then ransates relative 2 clive addresses to absolut adresses Tneeds to know the base address inthe ain memory rom which to star the allocation ‘Therefore, when loading a program, we compute the physical address + Inthe 3. Execution-Time Binding the memory requirements may not © ifthe be if, for example, we loa for the data before we rea: ‘Similarly, ifthe program is © Execut todo + Some binding. Logical and Physical Address «© Inoperating systems, logical and physical addres * Logical address: also known as @ vit ‘An example of a system with compile-time address binding is MS-DOS. Oho, iz ‘compile time Load time ‘Run Time/ Execution Time. ime Binding nan a oeatonin te memory remains the same throughout program executi inow where the program will reside in mem arene now where the protran 1ory atthe compile time, we can generate an absolute (static) ding but translates symbolic addresses from the source code torelative ses by adding them to the base address: abcde Regier |= Mu image above, the relative address 250 becomes the absolute address 142500 because the base is 14000. jown in advance. However, ved we can't determine how much space we need program Is compiled, all the variables ae kn id some data from a file dynamically, d the file. interpreted, not urs these cases. can be considered before execution. fe reserved dynamically, Ie, when we need all variable: tion-time binding cove! ‘Addresses and memory ar that during execution. ; inux practically implement dyn mic address (05s like Windows and Lit amic loading, dynamic linking, and dyna ces are used to manage and access memory: ing program ral address, san address generated PY the CPU di ‘Alogical address, execution. itis the address seen by the process and is relative to memory using gical adresse The process accesse: physical addresses. ee ae Tenner FALICUT 12 @ scanned with OKEN Scanner the program’s address space: spent tne are translated by the operating SY"a iol address isthe actual address in the main memory where datais stored. 7 1d to a virtual address. . Jocation in physical memory, a5 oppose’ 7 - : thea aooess are used bythe memory management unit (MMU) to translate logeal addr, physical addresses. 7 4s Then sesa page table to translate logical addresses into physical addresses. «The page table maps each ogleal page number toa physical frame number. + Physical Address tities a physical location of required data in a memory. ‘The user never directly deals withthe physical address but can access it by its corresponding logical adéres, ‘The ser program generates the logical address and thinks that the program is running in this logical addr the program needs physical memory fo its execution, therefore, the fogical address must be mapped to thy physical address by MMU before they are used. ‘The term Physical Address Space i Lopical address space. ‘used for all physical addresses corresponding to the logical addressesin Logical Address v/s Physical Address ress, Logical Address Space is a set of al ir aT Bue roses neat 2 program. | to the corresponding log eer itable The logical address can be | = Evers ise ete Tee changed. the physical address will not chang Real address, anies Classification of me, ‘Management schemes a }ALKEES, KJOTIPTC rarer i @ scanned with OKEN Scannert ped trot Shhan is Groymamie Partitioning Memory Management Schemes: 5 Ti Nomber of partitions i spcified at the time of system segmentation. contiguous memory management schemes ina Non-Contiguous memory management scheme, the program is divided into different blocks and loaded at different portions of the memory that need not necessarily be adjacent to one another. ‘his scheme ean be classified depending on the size of the blocks and whether the blocks reside in the main memory oF not. + Twoschemes are: 1. Paging 2, and Segment: 2, Non: 1. Posing ‘Paging isa technique that eliminates the requirements of contiguous allocation of man memory. + Inti the main memory ved into ese locks of physical memory ele rae, + The size of a frame should be kept the same as that of a page to maximize the main memory ic These of ae et ry and avoid external ‘Advantages of paging: ‘+ Pages reduce external fragmentation. ‘++ Simple to implement, + Memory efficient. ‘+ Due to the equal size of frames, swapping becomes very easy. + Itis used for faster access to data, 2. Segmentation ‘+ Segmentation is a technique that eliminates the requirements of contiguous allocation of main memory. ‘+ Inthis, the main memory is divided into variable-size blocks of physical memory called segments. ‘+ Itis based on the way the programmer structures their programs, * With segmented memory allocation, each job is divided into several segments of different sizes, one for each module. + Functions, subro 1, etc, are examples of such modules. Strategies Used for Contiguous Memory Allocation + One of the simplest methods for allocating memory isto divide memory into several fixed-sized partitions and each partition contains exactly one process. + Multiple partition allocation: tn this method, a process is selected from the input queue and loaded into the free ‘© Initially, all memory is available for user processes and Is considered one large block of available memory. This available memory Is known as a “Hole”. + When the process arrives and needs memory, we search for a hole that is large enough to store this process. + ifthe requirement is fulfilled then we allocate memory to process, otherwise keeping the rest available to satisty future requests. + While allocating a memory sometimes dynamic storage allocation problems occur, satisfy a request of size n froma list of free holes. which concerns how to First Fit quirement In the lest Flt, the first available free hole fulfills the re of the process allocated. * Here, in this diagram, a 40 KB memory blockis the first available free hole that can store process A (size of 25 KB}, because the first two blocks did not have sufficient memory space. BALKEES K, JDTIPTC CALICUT 12 @ scanned with OKEN Scannerae mie is ordered by size. . fos Lor Test, we traverse the complete Fist 27 1d find «Roemer fre hare 3, Worst Fit aja the Worst it allocate the largest available hole to Process: ‘Tais method produces the largest leftover hole, 4s Hoven this example, Proce A (Size 25 KB) is allocated to the largest available memory block which is 60K + Inefficient memory utization is a major issue in the worst ft. | What is Fragmentation? ‘+ Fragmentation s an unwanted problem inthe operating system in which the processes are loaded and unloads! from memory, and free memory space is fragmented. Processes can't be assigned to memory blocks due to thelr small size, and the memory blocks stay unused, [As the process is loaded and unloaded from memory, these areas are fragmented into small pleces of memory that cannot be allocated to incoming processes. Its called fragmentation. "pest Fragmentation «There are mall two pe of entation nthe opera sytem. + atermalrogmetation
iay pue aed assy ay BuIpe0| jwesdosd mau ayy Supnzoxa sujBaq asnf a1 ‘pearsul A1owawu wjew 242 OUI saed s,wesdoud mau atp Jo Aue 20 14101 3no sadled s uwesBosd pjo auf Jo Aue Ado jou saop waIshs Bunerado ay ‘sinsv0 Y>UMS Ixo1UOI e USYA “anuenpe uy you ‘puewiap uo Ajuo papeo} ase sa8ed pue Asouratu uosas uy apysoa sassazoad azaym Dujddems YM warshs SuyBed e 04 seyuus aynb 5 warshs BuiSed puewsp y+ Surfeg puewsg resag Asowau ujeus yp Uy 2191 -Arourous emai apysord 01 posn 99 ose ue> uone uous puewiog “wersks ed puewp Aq paruowojdiuy Ajuouued s| LOWE EMA + wesdeip ayismoysat + -sossosppe jeotshye oy sossoippe jem avejsuen o1 SIONS, ML + “srempsey ay ir 3 yaya so "yun yuowoBeuews AsowoW e ‘osn asodandyes0u98 Jo) PapuarLy siossBoexdozI WEPOU UL + “wives soanduos ayy ayejnwa 0 dn 39s 52eUN AIP PUEY e Jo UON29s e511! UE AOwIU EMA PE|E> owow eaixa sig -uroisks ayn uo payeysuy Ae2psAyd qwunowwe ayy UeYy AsoWeLH 220W ss2IPpE UED sEInELHODy “Auowo jenna put 2d weg “tevew o1 spaou waysAs Supesado ayy se ‘wioysAs quawaBeuew Asowauu ay Jo Ayjrajdwo> ayy 2$e2/2U4 UEDA vysip pity ayy Wo} 3004 p21i9;sueN SUyDq 5 rep aU ABER ‘uotdnsi03 70 $50] Ep JO 14 a4p BFESITUT LED + piey 94) pue Asoo \uawias e uy payusU9|duyy aq Osje Ue: “ode 51 a30up 4140 sy.ey ysIp prey a4 jt SO] Bq WED EIEP SE {9 uaorayaq poss0jsuesy AjUeysuoD oq 01 spa9U erep se ‘a>uCUo Hd Warsks ay UMEP mos EDIE Asowayy jemuta jo saferueapena “— PEE eee eee ee ® scanned with OKEN Scannerye doay Ususa}dts} OvASE3 ws ujew 24} UL aded sapjo ay, tuyyuo3te (OSTA) 990 3S UT S14 4 mau ppe Put speay ayn re sede! peau povayas 24 -quawsa2eyd94 0} Jed quasaytp Auew aie axayy ssuyuoaye waererde4 > ayy ways ‘oor 51 2715 23ed yn + soi ZH’ 9'T 5 Suns 22UREIPP ‘eer seca mpg onsabee NENT duiexa oy fous s9yo2 say) 24 224e AsOUIaU! UL quad aes 6 “uney moo Ate} pam! a -yney you 592029 sd aged 09 99u930)01€ OEY OMNI aau am ‘aris aed uanjd e104 yoad a3]042 494] YL -gouas3ja1 jue poresaued ase SBS 22U0:9)94 soougiajod Asows0U JO BULNS OuL + uns aauasapey done oy snus Buoy} Ave A HO vom ain you saquunu aBed 9h AU JPN? 21 regan om you an os0y ‘ve Jo 0g ae1 esaonp jy Supsozas pue warshs Uani “Suysys a0u91aj94 © Pal ‘Arousaus ypea Jo s501PPe aM sje ayo sun sossan0ud ue axons Azewd 0 510994 le oq pinoys saBed yptum 399]95 03 $213 PU nye syoo| wiyioBje wwaware|dou aged y+ “uonajduios 0/1 404 saaynbau siya Pue “SIP ‘yno paded sem pue qawszeydod 30} parejas sem ew aed 4) LAU, n so.ajgeitene you axe soBed yey) wose2s 0110) afied e sanauaym suaddey Suged + ‘no dems 03 roueyeg aye sass adled jo soquanu ‘saempuey Aq papinosd saBed ay) 3usss9220 ynoge woReUYO;U Pi peoson sey wede pasuss9je1 5) “soled pounb somo) 5 s9Bed 394 0 s9quun ay ‘tupunosse sasodind uonesoe 20} pasn aq youue> aed 294) e pue s1n220 Ine} fob “paves 29 01 spa0u Aowaul jo afd e voy ysIp 09 21) PLE ded Laownu ypyn sappap warsks Buvezado ue y>iym Ausn sanbyuypea ayy a2e sunny osje wows2eydos 28ed wyyyosjy qauuase|day a3eq “wen won sd sa wey poy ne aed : -souasojoa aded pen 511 mon say pue oq ou exam poe NN aBuey> 94 MN crteogan ney nove poeta ayer abedspsaentany pavjauoosjwoneredo O/\euNumih + pp a4 wor aed poynbos ay 0 pampeis 9 prom woresado YP a4N'HON + y pated oqnated uy ayy paeuwin oq maton uaysiEn plead raueaoeooeropeaNNI © eo psc pylon aL sks aun ‘pyenuy sauod9q 22Ud. : pen open sem 2uoz0j91 4 sOMR0UM 9550 01559304 acer cation ‘y9e1 aed ain ssonse ssasppe ayy Sunes ayn ein “peur se pao uaaq se yey 380d esoant nok vou seadnen P 4 Sey YoU) adled e ssa22e nok uayma suaddey eg aaegv ¢ mypuey nes 98¢6 9E ® scanned with OKEN Scanner21 4N911¥9 DtauLar'y saaynnve Jeno Sem Uno ANEW aM MM Bed ayn eM Watney potenaaonstse uo paseg sy unnozye sy, ‘wynHodye (NgW)pasn Anuanbasy SOW “Ss ord “wpe posn sanausi uo 03} s0ps wAWOdE SIL © noo sajews HA UMaBEM gL + He (Nan)Pasn Anuanbasy S097 "y aun Buunp Ayweay pasn sj aded e fed © y>tym uy wonenys 24) ‘outade|401 40) pax29}95 aq ym esp au dip sures tsowtrasanains z aw ff ; Hi 7 : a z 2] & be By eH aE : : 1 Vee o ta oe octagon “aun oyu) x2eq Bupjoo} Aq sa¥ed aneydos yxy e dany uswayduy ovAsea syauiane}d01 wo] ayy 40} pasnusaqrousey vem aed aun + ‘oy powajas qt 184) 2Uo 94) 51 ALOUOUH Ww UY au Ys98U0 4p JO) pasn UB9q OU SEY EN : : ‘wy ose (nn) pasn Anuar 5e91°E Loses t/a moira sed Fl farele aa sors rete osstuinseQuoi arene teroe"o eyyated ayn a7eidou iyyuodye youre do) japejdav-aded ewndo uy» ‘uagogje adeg fewmndo "Z ayy so} pasn aq 10% ye ua9q seu pues ede ayn own a4 259 PoHdd 899 pasa on fee way oun 948 90 PHDA ES jusonje ye jo aves ney aed s9m01 HN SEH aed undo uy “sn qeow e1/eneornninrs [=] : = E z E A cence Dee R ® scanned with OKEN Scannernt ing en the pags ne has to spend more ti syste™™ Ime swapping sennepen | cue of basing the cP Lene hese pages. Ths state nth 1 ype basic concept Involved Is that if a proc folng to be reduced or neyttga Theron page aut. sls alloated ooo tan wemeslt,no vakiable Work would be Hee Memory thereby increasing the degree. a imerytunatly, this would esutin a further in afurth faults followed by an her decrease in ulpraneanhtggenga thalned enon af heher called thrashing. thn thre wl Paba sales ca he CPU tation wed th ste tating couesiianion causes of Thrashing Seorceolmtiorogamning 0 roprams or workloads m: rw ay cause thrashing, and it resul * a plobal page replacement algorithm is used. The CPU cere te deening CU lean a Actin persicae tig lor ees the decreasing CPU ulation and increases |. cpU utilization is plotted against the degree of multiprogramming * Aethe degree of multiprogramming increases, CPU utlization also Increases. {ifthe degre of mitipropramming is increased further, tha sets and CPU utilation drops shah sn ee eeint toincressecPUtiuaton and stop tring werust ees seaenea te multiprogramming. How to Eliminate Thrashing te not configured correaty, disk thrashing can also happen to You id more RAM + Adjust the swap file sizes Ifthe system swoP. « eerrease the amount of RAM: As insufiient memory can use disk thrashing, one solution Isto ad tothe laptop. «Decrease the number of applications running the computer there ae too many aplation smn the Packground, your system resources will ONS 8 lot. «+ Replace programs: Replace those ProBrams that have heavy memory. memory occupied with equivalents that se ess Golden questions Short type: 1. What isthe local address of @ proces 2. Define Address Binding 3, What is runtime binding? 4, Define Paging 5. Define Segmentation 6 Define Page Fault 7. What is virtual Memory wn internal 9, List any two types of fragmentation J and external fragmentation 2 BALKEES Ki yoriete CALICUT # @ scanned with OKEN Scanner
You might also like
Memory Management
PDF
No ratings yet
Memory Management
57 pages
New OSY PPT - Unit 5.1
PDF
No ratings yet
New OSY PPT - Unit 5.1
25 pages
Memory Management - Consider Important
PDF
No ratings yet
Memory Management - Consider Important
141 pages
UNIT 3 OS
PDF
No ratings yet
UNIT 3 OS
16 pages
ICS 143 - Principles of Operating Systems
PDF
No ratings yet
ICS 143 - Principles of Operating Systems
52 pages
Main Memory Management
PDF
No ratings yet
Main Memory Management
7 pages
5Chapter Five- Memory Management(0) (5)
PDF
No ratings yet
5Chapter Five- Memory Management(0) (5)
38 pages
Ch. 3 Lecture 1 - 3 PDF
PDF
No ratings yet
Ch. 3 Lecture 1 - 3 PDF
83 pages
Memory Management
PDF
No ratings yet
Memory Management
13 pages
MEMORY MANAGEMENT
PDF
No ratings yet
MEMORY MANAGEMENT
150 pages
Os MM - 021727
PDF
No ratings yet
Os MM - 021727
19 pages
Wa0029
PDF
No ratings yet
Wa0029
30 pages
08 Memory Management Strategies (Autosaved)
PDF
No ratings yet
08 Memory Management Strategies (Autosaved)
47 pages
OS_10__Main_Memory (1)
PDF
No ratings yet
OS_10__Main_Memory (1)
64 pages
Memory Management in OS
PDF
100% (1)
Memory Management in OS
76 pages
Ch05 Memory MGT
PDF
No ratings yet
Ch05 Memory MGT
40 pages
OS4
PDF
No ratings yet
OS4
45 pages
CS Oss 3
PDF
No ratings yet
CS Oss 3
82 pages
Memory Management Updated
PDF
No ratings yet
Memory Management Updated
115 pages
CSC 453 Operating Systems: Memory Is A Resource
PDF
No ratings yet
CSC 453 Operating Systems: Memory Is A Resource
23 pages
Os 2 & 3 Units
PDF
No ratings yet
Os 2 & 3 Units
106 pages
Operating System Memory Management
PDF
No ratings yet
Operating System Memory Management
13 pages
OS_CHAP6_alok
PDF
No ratings yet
OS_CHAP6_alok
15 pages
ICS 143 - Principles of Operating Systems
PDF
No ratings yet
ICS 143 - Principles of Operating Systems
83 pages
memory management
PDF
No ratings yet
memory management
46 pages
Operating System Assignment
PDF
No ratings yet
Operating System Assignment
6 pages
oslecture10-13
PDF
No ratings yet
oslecture10-13
80 pages
Osunit 3
PDF
No ratings yet
Osunit 3
72 pages
Rweryguihiojop
PDF
No ratings yet
Rweryguihiojop
7 pages
CS4310 MemoryManagement
PDF
No ratings yet
CS4310 MemoryManagement
40 pages
CH 5
PDF
No ratings yet
CH 5
44 pages
UNIT-3 What Does It Mean by Memory Management Unit?
PDF
No ratings yet
UNIT-3 What Does It Mean by Memory Management Unit?
15 pages
Memory Management1
PDF
No ratings yet
Memory Management1
58 pages
Memory Management Unit 5
PDF
No ratings yet
Memory Management Unit 5
54 pages
Memory Management
PDF
No ratings yet
Memory Management
56 pages
Unit 4a
PDF
No ratings yet
Unit 4a
104 pages
Main Memory
PDF
No ratings yet
Main Memory
63 pages
3rd Os
PDF
No ratings yet
3rd Os
5 pages
Memory Management 1 PDF
PDF
100% (1)
Memory Management 1 PDF
42 pages
Lecture 05
PDF
No ratings yet
Lecture 05
50 pages
Operating System (5th Semester) : Prepared by Sanjit Kumar Barik (Asst Prof, Cse) Module-Iii
PDF
No ratings yet
Operating System (5th Semester) : Prepared by Sanjit Kumar Barik (Asst Prof, Cse) Module-Iii
41 pages
Unit 4 - Part 1
PDF
No ratings yet
Unit 4 - Part 1
138 pages
CS1120 - Principles of Operating Systems: Lectures 10,11,12 And13 - Memory Management Mr. Rowan N. Elomina
PDF
No ratings yet
CS1120 - Principles of Operating Systems: Lectures 10,11,12 And13 - Memory Management Mr. Rowan N. Elomina
83 pages
Unit 4
PDF
No ratings yet
Unit 4
93 pages
Lecture 06
PDF
No ratings yet
Lecture 06
70 pages
Os Unit - 4
PDF
No ratings yet
Os Unit - 4
25 pages
OS R22 2-2 UNIT-4
PDF
No ratings yet
OS R22 2-2 UNIT-4
22 pages
Os 4
PDF
No ratings yet
Os 4
88 pages
Memory Management Unit 5
PDF
No ratings yet
Memory Management Unit 5
58 pages
Memory Management: Process Address Space
PDF
No ratings yet
Memory Management: Process Address Space
18 pages
Memory Management
PDF
No ratings yet
Memory Management
33 pages
Topic Notes: Memory Management: Computer Science 322 Operating Systems
PDF
No ratings yet
Topic Notes: Memory Management: Computer Science 322 Operating Systems
25 pages
m4 (1)
PDF
No ratings yet
m4 (1)
35 pages
OS Unit3
PDF
No ratings yet
OS Unit3
22 pages
Operating Systems: Memory Management (Chapter 8: 8.1-8.6)
PDF
No ratings yet
Operating Systems: Memory Management (Chapter 8: 8.1-8.6)
48 pages
OS Mod4
PDF
No ratings yet
OS Mod4
170 pages
unit7
PDF
No ratings yet
unit7
36 pages
Unit-4 Iot
PDF
No ratings yet
Unit-4 Iot
18 pages
Solid-State Battery: Submitted By:Pragildas CK Electrical & Electronics Engineering S5 JDT Islam Polytechnic College
PDF
No ratings yet
Solid-State Battery: Submitted By:Pragildas CK Electrical & Electronics Engineering S5 JDT Islam Polytechnic College
17 pages
Os Module1
PDF
No ratings yet
Os Module1
12 pages
Module 4 Os
PDF
No ratings yet
Module 4 Os
11 pages
Paging and Segmentation
PDF
No ratings yet
Paging and Segmentation
33 pages
Seminar Report
PDF
No ratings yet
Seminar Report
12 pages
WP Q& A
PDF
No ratings yet
WP Q& A
4 pages
Co3 Pmse
PDF
No ratings yet
Co3 Pmse
2 pages