Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Osy Report

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 16

JSPM's

Rajarshi Shahu College of Engineering, Polytechnic.

Academic Year 2020-21

CLASS- CO5I Subject- Operating System (22516)

Micro-Project Report

TITLE OF MICROPROJECT: "Segmentation in Operating System”

GROUP NO. – 15

GROUP MEMBERS:

ROLL NAME
NO
49 Sandhya Vinod Gaikwad
Maharashtra State
Board of Technical Education, Mumbai
(Autonomous) (ISO-9001-2008) (ISO/IEC 27001:2013)

CERTIFICATE

This is to certify that Miss. Sandhya Vinod Gaikwad of Diploma In Computer Engineering
of JSPM’s Rajarshi Shahu College of Engineering Polytechnic (Code: 1620) has completed
Micro projects of the course Operating System (22516) as prescribed in the curriculum for the
academic year 2021 to 2022.

Place: Tathawade, Pune Enrollment No: 1916200180

Date: ______________

Mr. M. S. Patil

(Course In charge) (Head of Department)

Seal of Institute
1.0 Brief Description:

______________________________________________________________________________

Micro-project enhances the skill of our subject, examines the important concepts and
techniques related to course and enable students to have an insight into technology involved
to Segmentation in Operating System.

In Operating Systems, Segmentation is a memory management technique in which the


memory is divided into the variable size parts. ... The details about each segment are stored
in a table called a segment table. Segment table is stored in one (or many) of the segments.
The main objective of this project is to to enhance the speed of execution of the
computer system, so that the processor is able to fetch and execute the data from the memory
easily and fast using Segmentation.
___________________________________________________________________________

2.0 Aim of the Micro-Project:


Case Study of Segmentation in Operating System.
______________________________________________________________________________

3.0 Course Outcome Achieved:


a) Use operating system tools to perform various functions.
b) Execute process commands for performing process management operation.
c) Calculate efficiency of different memory management techniques.
d) Apply file management techniques.
______________________________________________________________________________________

4.0 Actual Methodology Followed:


Procedure that is adopted during the completion of micro-project are as follows:

1) Firstly, a discussion was held with the staff members and classmates on the topic
“Segmentation in Operating System” and everybody’s idea about the topic was
encouraged.
2) The topic was divided into several modules and each and every module was
assigned the time duration for completion.
3) A thorough research is on the modules specified to the course coordinator which
include all the key concepts related to each module of the micro project.
4) All the modules are perfectly arranged into the specified format and all the
errors/mistakes committed are resolved.
5) Finally, the copy is submitted to the concerned course coordinator.

5.0 Literature Review:

Information related to the topic will be searched from various sources like Internet,
various books related to the course, discussion with course coordinator related to all
collected information will be done.

Reference books:

1) Operating System, by Godbole, Achyut S.


2) Operating System, by Dr. Rajendra Kawale.

Websites:

1) https://www.guru99.com/operating-system-tutorial.html
2) https://en.wikipedia.org/wiki/Operating_system
3) https://www.tutorialspoint.com/operating_system/
4) https://www.geeksforgeeks.org/

6.0 Action Plan:


Name of the
Sr Details of activity Start date Finish date
responsible team
No.
member
1. Discussion of topic 21- 09- 2021 21- 09- 2021
2. Finalization of topic 22- 09- 2021 22- 09- 2021
3. Preparation of 24- 09- 2021 24- 09- 2021
abstract
4. Submission of 25- 09- 2021 25- 09- 2021
abstract
5. Literature survey 26- 09- 2021 26- 09- 2021
6. Collection of data 27- 09- 2021 27- 09- 2021
Sandhya Vinod
7. Discussion of content 28- 09- 2021 28- 09- 2021 Gaikwad
8. Proof reading of 29- 09- 2021 29- 09- 2021
content
9. Editing of content 30- 09- 2021 30- 09- 2021
10. Completion of Report 1- 10- 2021 1- 10- 2021
11. Completion of 2- 10- 2021 2- 10- 2021
presentation
12. Viva 3- 10- 2021 3- 10- 2021
13. Presentation 4- 10- 2021 4- 10- 2021
14. Final Submission 5- 10- 2021 5- 10- 2021

7.0 Resources used:

Sr. Name of the


Quant Remark
no Resource/Materia Specialization
ity
. l

Operating Systems: Concurrent and


Distributed Software Design Available
1

Reference Books
1.
Operating System
by Dr. Rajendra Kawale. Available
1

tutorialspoint.com/operating_system/
Internet https://www.geeksforgeeks.org/ Available
2. -
3. Android 4 GB RAM, Octa core Max 2.30GHZ. 1 Available

______________________________________________________________________________

8.0 Micro project:


___________________________________________________________________________
___

Theory:

Introduction of Segmentation:
 A process is divided into Segments. The chunks that a program is divided into which are
not necessarily all of the same sizes are called segments. Segmentation gives user’s view
of the process which paging does not give.
 It basically manages divides memory into segments during process to make execution
faster.
Fig. Memory Segmentation for an
application

 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.
 There are types of segmentation:
1. Virtual memory segmentation –
Each process is divided into a number of segments, not all of which are resident at any one
point in time.
2. Simple segmentation –
Each process is divided into a number of segments, all of which are loaded into memory at
run time, though not necessarily contiguously.

 Virtual Segmentation:

a. In computing,
virtual memory,
or virtual storage[b]
is a memory
management technique that provides an "idealized abstraction of the storage
resources that are actually available on a given machine"which "creates the
illusion to users of a very large (main) memory".
b. The computer's operating system, using a combination of hardware and
software, maps memory addresses used by a program, called virtual addresses,
into physical addresses in computer memory.
c. Main storage, as seen by a process or task, appears as a contiguous address
space or collection of contiguous segments.
d. The operating system manages virtual address spaces and the assignment of
real memory to virtual memory. Address translation hardware in the CPU,
often referred to as a memory management unit (MMU), automatically
translates virtual addresses to physical addresses.

 Simple Segmentation:
a. Each process is divided into a number of segments, all of which are loaded into
memory at run time, though not necessarily contiguously.

Characteristics of Segmentation:

 The Segmentation partitioning scheme is variable-size.

 Partitions of the secondary memory are commonly known as segments.

 Partition size mainly depends upon the length of modules.

 Thus with the help of this technique, secondary memory and main
memory are divided into unequal-sized partitions.
Need Of Segmentation:

 One of the important


drawbacks of
memory
management in
the Operating
system is the
separation of
the user's view of
memory and
the actual physical
memory. and
Paging is a technique
that provides the
separation of
these two memories.

 User'view is basically mapped onto physical storage. And this mapping


allows differentiation between Physical and logical memory.

 It is possible that the operating system divides the same function into
different pages and those pages may or may not be loaded into the
memory at the same time also Operating system does not care about the
User's view of the process. Due to this technique system's efficiency
decreases.
 Segmentation is a better technique because it divides the process into
segments.

User's View of a Program:

 Given below figure shows the user's view of segmentation:


Logical Address

 Basic Method

 A computer system that is using segmentation has a logical address


space that can be viewed as multiple segments.

 And the size of the segment is of the variable that is it may grow or
shrink. As we had already told you that during the execution each
segment has a name and length.

 As we had already told you that during the execution each segment
has a name and length.

 And the address mainly specifies both thing name of the segment
and the displacement within the segment.
 Therefore the user specifies each address with the help of two
quantities: segment name and offset.
 For simplified Implementation segments are numbered; thus
referred to as segment number rather than segment name.

 Thus the logical address consists of two tuples:


<segment-number,offset>
Where,
Segment Number(s): Segment Number is used to represent the
number of bits that are required to represent the segment.
Offset(d) Segment offset is used to represent the number of bits
that are required to represent the size of the segment.

Segmentation Architecture:

Segment table:

A Table that is used to store the information of all segments of the process is commonly
known as Segment Table. Generally, there is no simple relationship between logical
addresses and physical addresses in this scheme.

a. The mapping of a two-dimensional Logical address into a one-dimensional Physical


address is done using the segment table.
b. This table is mainly stored as a separate segment in the main memory.
c. The table that stores the base address of the segment table is commonly known as the
Segment table base register (STBR)In the segment table each entry has :
1. Segment Base/base address: The segment base mainly contains the starting
physical address where the segments reside in the memory.
2.Segment Limit: The segment limit is mainly used to specify the length of the
segment.
Segment Table Base:
Register(STBR) The STBR register is used to point the segment table's location
in the memory

Segment Table Length Register(STLR) :


This register indicates the number of segments used by a program. The segment
number s is legal if s<STLR

Segmentation
Hardware:

 Given below figure shows the segmentation hardware :


 The logical address generated by CPU consist of two parts:
1. Segment Number(s): It is used as an index into the segment table.

2. Offset(d): It must lie in between '0' and 'segment limit'.In this case, if the Offset exceeds
the segment limit then the trap is generated.

 Thus; correct offset+segment base= address in Physical memory


and segment table is basically an array of base-limit register pair.

Advantages of Segmentation:

The Advantages of the Segmentation technique are as follows:

 In the Segmentation technique, the segment table is mainly used to keep


the record of segments. Also, the segment table occupies less space as
compared to the paging table.
 There is no Internal Fragmentation.
 Segmentation generally allows us to divide the program into modules
that provide better visualization.
 Segments are of variable size.

Disadvantages of Segmentation:

Some disadvantages of this technique are as follows:

 Maintaining a segment table for each process leads to overhead.


 This technique is expensive.
 The time is taken in order to fetch the instruction increases since now
two memory accesses are required.
 Segments are of unequal size in segmentation and thus are not suitable
for swapping.
 This technique leads to external fragmentation as the free space gets
broken down into smaller pieces along with the processes being loaded
and removed from the main memory then this will result in a lot of
memory waste.

Example of Segmentation:

Given below is the example of the segmentation, There are five segments
numbered from 0 to 4.

These segments will be stored in Physical memory as shown. There is a


separate entry for each segment in the segment table which contains
the beginning entry address of the segment in the physical
memory( denoted as the base) and also contains the length of the

segment(denoted as limit).

Segment 2 is 400 bytes long and begins at location 4300. Thus in this case a
reference to byte 53 of segment 2 is mapped onto the location 4300
(4300+53=4353). A reference to segment 3, byte 85 is mapped to 3200(the
base of segment 3)+852=4052.
A reference to byte 1222 of segment 0 would result in the trap to the OS, as the length
of this segment is 1000 bytes.

Questionnaire:

1. What is the difference between Paging and Segmentation?


Ans-
Paging Segmentation

1. Paging is a memory management 1. Segmentation is also a memory


technique where memory is management technique where
partitioned into fixed-sized blocks that memory is partitioned into variable-
are commonly known as pages. sized blocks that are commonly
known as segments.
2. This technique is faster than 2. On the other hand, segmentation is
segmentation. slower than paging.
3. The page table mainly contains the 3. The segment table mainly contains
base address of each page. the segment number and the offset.
4. This technique may lead to Internal 4. Segmentation may lead to External
Fragmentation. Fragmentation.

2. Can Paging and segmentation be used together?


Ans-
However, Segmentation can be combined with Paging to get the best
features out of both the techniques. In Segmented Paging, the main
memory is divided into variable size segments which are further divided
into fixed size pages.
3. Is Segmentation still used?
Ans-
Modern OSes "do not use" segmentation. Its in quotes because they use 4
segments: Kernel Code Segment, Kernel Data Segment, User Code Segment
and User Data Segment.

7.0 Skills Developed

 Communication skills
 Presentation skills
 Leadership
 Risk Management
 Time Management
 Task Management

You might also like