SEGMENTATION SYSTEMS o PROGRAMMER SPECIFIES HOW EACH PROGRAM WILL BE DIVIDED 1

Segmentation systems o programmer specifies how each

This preview shows page 45 - 61 out of 79 pages.

+ SEGMENTATION SYSTEMS o PROGRAMMER SPECIFIES HOW EACH PROGRAM WILL BE DIVIDED 1. ADDRESS TRANSLATION PROCESS + PROBLEM
Image of page 45
VIRTUAL MEMORY 4. ADDRESS TRANSLATION PROCESS + EXAMPLE 1,024 = 10000000000 + N LEAST SIGNIFICANT BITS = OFFSET
Image of page 46
(N=LOG 2 ( PAGE SIZE )) M-N MOST SIGNIFICANT BITS = PAGE NUMBER VIRTUAL MEMORY 4. ADDRESS TRANSLATION PROCESS 5) MISSING PAGES => PAGE FAULTS => PROCESS TO
Image of page 47
1. FIND EMPTY PAGE FRAME IN MEMORY 2. IF THERE ISN ° T 2.1 EXPEL ONE PAGE FRAME FROM MEMORY 3. FETCH MISSING PAGE INTO THE MEMORY 4. UPDATE PAGE TABLE ENTRY 6) PAGE TABLE ENTRIES EXTRA BITS
Image of page 48
+ MODIFICATION BIT + PROTECTION BIT + PAGE REFERENCE BIT VIRTUAL MEMORY 7) PAGE TABLE REPRESENTATION + EACH PROCESS PAGE TABLE IN CPU o SET OF DEDICATED REGISTERS + PAGE TABLE IN MEMORY o PAGE TABLE BASE REGISTER + TRANSLATION LOOK-ASIDE BUFFER (TLB)
Image of page 49
Taccess = h*Tmem + (1-h)* Tmem + TWO LEVEL PAGES TABLE VIRTUAL MEMORY 7) PAGE TABLE REPRESENTATION + INVERTED PAGE TABLE < process-id, page-number, offset>
Image of page 50
8) SHARED PAGES PAGE REPLACEMENT POLICY PAGING SYSTEM WITH SWAPPING
Image of page 51
PRP: USED BY THE PAGE FAULT HANDLER TO SELECT THE PAGE TO BE EXPELLED FROM THE MAIN MEMORY
Image of page 52
PAGE REPLACEMENT POLICY - GOALS: + MINIMUM OVERHEAD + VICTIMS MUST NOT BE REFERENCED AGAIN IN THE NEAR FUTURE CODE: 1. FIND THE DESIRED PAGE ON THE DISK 2. IF THERE IS A FREE FRAME THEN 1. USE IT
Image of page 53
ELSE 2. USE A PAGE-REPLACEMENT POLICY 3. WRITE THE VICTIM PAGE TO THE DISK 4. READ THE DESIRED PAGE INTO THE FREE FRAME AND UPDATE PAGE AND/OR FRAME TABLE. 5. RESTART THE USER PROCESS GLOBAL VERSUS LOCAL ALLOCATION PAGE REPLACEMENT POLICY
Image of page 54
POLICIES: + FIFO (FIRST IN ° FIRST OUT) BELADY ° S ANOMALY Reference String: 0 1 2 3 0 1 4 0 1 2 3 4 + LRU (LEAST RECENTLY USED)
Image of page 55
+ SECOND CHANCE AND CLOCK + LFU (LEAST FREQUENTLY USED) + MFU (MOST FREQUENTLY USED) PAGE REPLACEMENT POLICY + VARIABLE SIZE LOCAL POLICIES o TRASHING: THERE ARE TOO MANY PROCESS IN MAIN MEMORY AND MOST PROCESS IN WAITING STATE BECAUSE THE PAGING DEVICE CANNOT KEEP UP WITH ALL PAGE REQUEST (A PROCESS IS TRASHING IF IT IS SPENDING MORE TIEM PAGIN THAN EXECUTING o WORKING SET: KEEPS IN MAIN MEMORY ALL PAGES THAT HAVE BEEN REFERENCED DURING THE LAST REFERENCED ISSUED BY THE PROCESS. Conversely,
Image of page 56
all pages that were not referenced during this time interval are inmediately expelled. ALLOCATION OF FRAMES + EQUAL ALLOCATION: m/n FRAMES PER PROCESS m: number of frames n: number of process + PROPORTIONAL ALLOCATION s i /S*m FRAMES PER PROCESS S= s i S: size of virtual memory s i : size of virtual memory for process i SEGMENTATION
Image of page 57
SEGMENTATION WITH PAGING PROCESSES -> SEGMENT TABLES SEGMENT -> PAGE TABLE NUMBER OF SEGMENT NUMBER OF PAGE OFFSET
Image of page 58
SEGMENTATION FILE SYSTEMS IT IS THE PART OF THE OPERATING SYSTEM THAT PROVIDES LONG TERM STORAGE OF INFORMATION. THE OPERATING SYSTEM PROVIDES A UNIFORM LOGICAL VIEW OF THIS INFORMATION STORAGE - ELEMENTS: + COLLECTION OF FILES + DIRECTORY STRUCTURE FILES :
Image of page 59
+ IS A SET OF RELATED INFORMATION THAT IS STORAGE ON SECONDARY STORAGE.
Image of page 60
Image of page 61

You've reached the end of your free preview.

Want to read all 79 pages?

  • One '20
  • Virtual memory

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes