⏪Previous Next⏩
· Memory-management scheme that supports user view of memory.
· A program is a collection of segments. A segment is
a logical unit such as:
§ Main program,
§ Procedure,
§ Function,
§ Method,
§ Object,
§ Local variables,
global variables,
§ Common block,
§ Stack,
· Segmentation is a memory management scheme that supports
this user view of memory.
· A logical address
space is a collection of segments. Each segment has a name and a length.
· The addresses specify both the segment name and the offset within the segment.
· The user therefore specifies each address by two quantities such as segment
name and an offset.
For simplicity of implementation, segments are numbered and are referred to by
a segment number, rather than by a segment name.
·
Logical address consists of a two tuples:
§ <segment-number, offset>
·
Segment table – maps two-dimensional physical addresses; each table entry has:
Base – contains
the starting physical
address where the segments reside in memory.
Limit – specifies the length of the segment.
·
Segment-table base register
(STBR) points to the segment
table’s location in memory.
·
Segment-table length register
(STLR) indicates number
of segments used by a program;
§ Segment number s
is legal if s< STLR.
·
When the user program is compiled by the compiler it
constructs the segments.
· The loader takes
all the segments and assigned the segment numbers.
·
The mapping between the logical and physical address
using the segmentation technique is shown in
above figure.
·
Each entry in the segment table as limit and base address.
·
The base address contains
the starting physical
address of a segment where the limit address
specifies the length of the segment.
· The logical
address consists of 2 parts such as segment number and offset.
The segment
number is used as an index into the segment
table. Consider the below
example is given below.
Segmentation with Paging
·
Both paging and segmentation have advantages and disadvantages, that’s
why we can combine
these two methods to improve this technique for memory allocation.
·
These combinations are best illustrated by
architecture of Intel-386.
·
The IBM OS/2 is an operating
system of the Intel-386 architecture. In this technique both segment table and page table is required.
·
The program consists of various segments
given by the segment table where the segment table contains different entries one for
each segment.
·
Then each segment is divided into a number
of pages of equal size whose information is maintained in a separate page table.
· If
a process has four segments
that is 0 to 3 then there will be 4 page tables for that process,
one for each segment.
·
The size fixed in segmentation table
(SMT) gives the total number
of pages and therefore
maximum page number in that segment with starting from 0.
·
If the page table or page map table for a segment
has entries for page 0 to 5.
The address of the entry in the PMT for the desired page p in a given segment s can be obtained by B + P where B can be obtained from the entry in the segmentation table.
Using the address (B +P) as an index in page map table (page table), the page frame (f) can be obtained and physical address can be obtained by adding offset to page frame
⏪Previous Next⏩
- What is an Operating System ?
- Discuss the structure off OS ?
- Explain type of OS?
- Explain Function of OS?
- Explain OS Services ?
- What do mean by system call ?List different type ofsystem call available ?
- what is process ? and Characteristics ?
- What is different process state? explain the same in details?
- write short note on user level and kernal level threads?
- explain what is thread and its type ?
- explain scheduler ? (short term,medium term,and long term)
- state and explain scheduling criteria ?
- Explain scheduling algorithm ? [ FCFS,SJF,PRIORITY,ROUND ROBINE.]
- What is process synchronization ? explain critical section problem and race condition ?
- what is Race Condition ?
- what is critical section problem?
- explain classical problem of synchronization?
- explain bounded - buffer problem?
- explain reader - writer problem ?
- explain Dining Philosophers Problem ?
- explain semaphores ? its type ?
- What is deadlock ?
- What are the 4 condition to produce deadlock ?
- explain methods of handling deadlock ?
- explain in detail deadlock prevention ?
- write short note on deadlock avoidance ?
- explain deadlock detection ?
- explain Banker algorithm with example ?
- What are memory management ?
- what is contiguous memory allocation and non - contiguous memory allocation ?
- explain concept of paging with neat diagram?
- differentiate contiguous and non - contiguous memory allocation ?
- explain in details various partitioning memory management?
- explain the concept of Segmentation ?
- what is Thrashing explain in details ?
0 Comments