Osy Report
Osy Report
1.1 ABSTRACT
1.2 RATIONALE
An Operating System is basically a system program that controls the
execution of application programs and acts as an interface between
applications and the computer hardware. It manages the computer system
resources to be used in an efficient manner. This course enables to learn
internal functioning of operating system and will help in identifying
appropriate Operating System for given applications/task. This course is
also a prerequisite for the group of courses included in 'Cloud
Infrastructure Maintenance' Elective group.
1. Segment Definition
Segment Types: Define the types of segments in the system, such as:
o Code Segment: Contains executable code.
o Data Segment: Holds global variables and static data.
o Stack Segment: Used for function calls and local variables.
o Heap Segment: Used for dynamic memory allocation.
2. Segment Table
Structure: Each process has a segment table that contains entries for each
segment. Each entry typically includes:
o Base Address: The starting physical address of the segment in
memory.
o Limit: The length of the segment, which helps in bounds checking.
3. Address Translation
When a program accesses a memory address, the logical address consists of a
segment number and an offset. The operating system performs address
translation as follows:
1. Input: Logical address is given in the form of (segment number, offset).
2. Validation: Check if the segment number is valid (i.e., within the range of
the segment table).
3. Bounds Checking: Ensure the offset is within the limit of the segment.
4. Physical Address Calculation:
o If valid, calculate the physical address using:
Physical Address=Base Address+Offset\text{Physical Address} = \
text{Base Address} + \
text{Offset}Physical Address=Base Address+Offset
5. Fragmentation Management
External Fragmentation: Over time, memory can become fragmented as
segments are allocated and deallocated. The OS needs to implement
strategies to manage this fragmentation, which may include:
o Compaction: Rearranging memory contents to create larger
contiguous blocks.
o Paging: Combining segmentation with paging to reduce external
fragmentation.
1.
Intel (Core i5)
Processor 11th Gen 01
2. Primary Memory 4 GB 01
all of which are loaded into memory at run time, though not necessarily
contiguously.
There is no simple relationship between logical addresses and physical
addresses in segmentation. A table stores the information about all such
segments and is called Segment Table. Segment Table – It maps two-
dimensional Logical address into one-dimensional Physical address. It’s each
table entry has:
1. Base Address: It contains the starting physical address where the
segments reside in memory.
2. Limit: It specifies the length of the segment.
Chapter 5
ADVANTAGES, DISADVANTAGES & APPLICATIONS
5.1 ADVANTAGES
− A No internal fragmentation.
− Less overhead.
− The segment table is of lesser size as compared to the page table in paging.
5.2 DISADVANTAGES
− It can have external fragmentation.
− It is difficult to allocate contiguous memory to variable sized partition.
− Costly memory management algorithms.
− As processes are loaded and removed from the memory, the free memory
space is broken into little pieces, causing External fragmentation.
− Overhead is associated with keeping a segment table for each activity.
5.3 APPLICATIONS
− Segmentation allows users to partition the user programs into modules.
Chapter 6
CONCLUSIONS, FUTURE SCOPE & REFERENCES
6.1 CONCLUSION
Segmentation in OS is a memory management solution that helps you
minimize internal fragmentation. Still, memory management strategies are not
mutually exclusive. You can use multiple memory management techniques to
optimize your system's performance.
6.3 REFERENCES
[1] https://www.javatpoint.com/os-segmentation
[2] https://www.geeksforgeeks.org/segmentation-in-operating-system/
[3] https://en.wikibooks.org/wiki/Operating_System_Design/Segmentation
[4] https://www.scaler.com/topics/operatingsystem/segmentation-in-os/
Mrs.M.J.Gurjar
Mrs.M.J.Gurjar
Computer Science & Engineering - 10- R. C. Patel College Of Engineering & Polytechnic
Report on segmentation in OS
Very short, poor Nearly sufficient and Detailed, correct and Very detailed, correct,
quality sketches, correct details about clear description of clear description of
details about methods, material, methods, materials, methods, materials,
precautions and
Report methods, material, precautions and precautions and
6 precaution & conclu
conclusion, but clarity is
Conclusions. Sufficient conclusions. Enough
Preparation not there in present-
sions omitted, some ation. But not enough Graphic Description. tables, charts and
details are wrong graphic description sketches
Mrs.M.J.Gurjar
Computer Science & Engineering - 11- R. C. Patel College Of Engineering & Polytechnic