segmentation - Operating Systems Simple/Basic Segmentation...

Info icon This preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Operating Systems Simple/Basic Segmentation
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 Real Memory Management Background Memory Management Requirements Fixed/Static Partitioning Variable/Dynamic Partitioning Simple/Basic Paging Simple/Basic Segmentation Segmentation with Paging
Image of page 2
3 Simple/Basic Segmentation Paging division is arbitrary; No natural/logical boundaries for protection/sharing. Segmentation supports user’s view of a program. A user’s program is a collection of segments - logical units - such as: main program, subprogram, class procedure, function, object, method, local variables, global variables, common block, stack, symbol table, arrays
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 Some basics Because segments are based on logical, rather than physical, divisions, they have no fixed size , although there is usually an upper limit imposed by the hardware. Segmentation has no internal fragmentation , but there can be external fragmentation. Since a program can be segmented into smaller parts, which don’t have to be contiguous, the fragmentation is generally less than in a system where the entire address space is stored contiguously. Since segmentation is based on logical structure , the programmer may be responsible for organizing the program into segments.
Image of page 4
5 User’s View of a Program
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
6 ?Without segmentation Without segmentation (equivalently said with just one segment) all procedures are packed together so if one changes in size all the virtual addresses following are changed and the program must be re-linked.
Image of page 6
7 (Dynamics of Simple Segmentation (1 Each program is subdivided into blocks of non- equal size called segments. When a process gets loaded into main memory, its different segments can be located anywhere. Each segment is fully packed with instructions/ data; no internal fragmentation. There is external fragmentation; it is reduced when using small segments.
Image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
8 Logical view of simple segmentation 1 3 2 4 1 4 2 3 user space physical memory space
Image of page 8
9 (Dynamics of Simple Segmentation (2 In contrast with paging, segmentation is visible to the programmer: provided as a convenience to organize logically programs (example: data in one segment, code in another segment).
Image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

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