The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+1 vote
2.6k views

 Consider the following segment table in segmentation scheme:

Segment Id Base Limit
          0 200 200
          1 5000 1210
          2  1527 498
          3 2500 50

 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 by Active (2.3k points) | 2.6k views

3 Answers

+4 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.

by Active (2.3k points)
selected by
+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
by Boss (15.8k points)
0
what kind of trap hardware or software?
+1
it is a software trap as the trap signal is given to os. no need to use hardware interrupt here, this is an protection issue which not implemented as hardware but is implemented in operating system.
0
but here we are using comparator at limit register when value is greater than then it will generate trap to os,therefore it should be hardware interrupt na?
0

Hardware and software interrupts primarily differ by how they're generated: hardware interrupts are generated by hardware, e.g. a timer, keyboard, network card etc while software interrupts are triggered by a special software instruction (e.g. int 0x80). There is also a related difference in their role: hardware interrupt handlers are supposed to handle hardware events (e.g. a packet arriving on a network interface) while software handlers are supposed to serve another piece of software,

i am 90% sure about it but i still think u should consult someone too. but according to the above its software .

 

0
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
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 votes
It should be a TRAP  as the limit   > offset  here for id 2
by Junior (757 points)
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,832 questions
54,800 answers
189,505 comments
80,727 users