Recents in Beach

Segmentation

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⏩



  1. What is an Operating System ?
  2. Discuss the structure off OS ?
  3. Explain type of OS?
  4. Explain Function of OS?
  5. Explain OS Services ?
  6. What do mean by system call ?List different type ofsystem call available ?

  1. what is process ? and Characteristics ?
  2. What is different process state? explain the same in details?
  3. write short note on user level and kernal level threads?
  4. explain what is thread and its type ?
  5. explain scheduler ? (short term,medium term,and long term)
  6. state and explain scheduling criteria ?
  7. Explain scheduling algorithm ? [ FCFS,SJF,PRIORITY,ROUND ROBINE.]    

  1. What is process synchronization ? explain critical section problem and race condition ?
  2. what is Race Condition ?
  3. what is critical section problem?
  4. explain classical problem of synchronization?
  5. explain bounded - buffer problem?
  6. explain reader - writer problem ?
  7. explain Dining Philosophers Problem ?
  8. explain semaphores ? its type ?

  1.  What is deadlock ?
  2. What are the 4 condition to produce deadlock ?
  3. explain methods of handling deadlock ?
  4. explain in detail deadlock prevention ?
  5. write short note on deadlock avoidance ?
  6. explain deadlock detection ? 
  7. explain Banker algorithm with example ? 

Post a Comment

0 Comments