in Operating System edited by
5,424 views
2 votes
2 votes

 Consider the following segment table in segmentation scheme :

$\begin{array}{|l|l|l|l|l|}\hline  \textbf{Segment ID} & \textbf{Base} & \textbf{Limit} \\\hline \text{0} & \text{200} & \text{200} \\\hline \text{1} & \text{5000} & \text{1210} \\\hline \text{2} & \text{1527} & \text{498} \\\hline \text{3} & \text{2500} & \text{50} \\\hline  \end{array}$

 What happens if the logical address requested is – Segment Id $2$ and offset $1000$?

  1. Fetches the entry at the physical address $2527$ for segment Id $2$
  2. A trap is generated
  3. Deadlock
  4. Fetches the entry at offset $27$ in Segment Id $3$
in Operating System edited by
by
5.4k views

3 Answers

6 votes
6 votes
Best answer

Answer: (b)

Explanation: Offset 1000 in Segment Id 2 is crossing the Segment Id 2 memory area. Here Segment Id 2 memory area is 1527 to 1527 + 498 = 2025.

selected by
4 votes
4 votes
an os trap signal will be generated. as offset tell how much deeper we have to go in the segment. as we have given 1000 as offset while the segment size is 498 . it will try to read another process memory which should not be allowed in any case

4 Comments

Trap will be generated by hardware. Becz  Hardware will take care of protection of memory space..But i think it can vary from system to system. It should be based on implementation.
0
0
What i think it will be software ..segmentation and paging are not actual . they are all logical. Cpu dosen't even know if segmentation is there or not. If hardware dosen't knows it then how u thnk hardware is going to generte and interrup and how will it be serviced.
0
0
0
0
0 votes
0 votes
It should be a TRAP  as the limit   > offset  here for id 2
by
Answer:

Related questions