Computer Science, asked by rajshrivgulhane, 6 months ago


what is segment table? Explain various
operations that can be
performed on segments​

Answers

Answered by d14sr
0

HOPE IT HELPS YOU.

PLEASE MARK MY ANSWER AS BRAINLIEST!!!

AND FOLLOW FOR MORE BEST ANSWERS...

( I have explained each and everything of the topic for u to cover it easily).

Answer:

Files is divided into Segments. Each segment corresponds to a component and is associated with a set of attributes and image transformation parameters like scaling, rotation. Presence of Segment allows :

Subdivision of picture.

Visualization of particular part of picture.

Scaling, rotation and translation of picture.

Types of Segments :

Posted Segment : When visible attribute of segment is set to 1, it is called Posted segment. This is included in active segment list.

Unposted Segment : When visible attribute of segment is set to 0, it is called Unposted segment. This is not included in active segment list.

Functions for Segmenting the display :

Segment Creation : Segment must be created or opened when no other segment is open, since two segments can’t be opened at the same time because it’s difficult to assign drawing instruction to particular segment. The segment created must be given a name to identify it which must be a valid one and there should be no segment with the same name. After this, we initialize items in segment table under our segment name and the first instruction of this segment is allocated at next free storage in display file and attributes of segments are initialized to default.

Algorithm :

If any segment is open, give error message : “Segment is still open” and go to step 8.

Read the name of the new segment.

If the segment name is not valid, give error message : “Segment name not a valid name” and go to step 8.

If given segment name already exists, give error message : “Segment name already exists in name list” and go to step 8.

Make next free storage area in display file as start of new segment.

Initialize size of new segment to 0 and all its attributes to their default values.

Inform that the new segment is now open.

Stop.

Closing a Segment : After completing entry of all display file instructions, the segment needs to be closed for which it has to be renamed, which is done by changing the name of currently open segment as 0. Now the segment with name 0 is open i.e. unnamed segment is open and if two unnamed segments are present in display file one needs to be deleted.

Similar questions