0% found this document useful (0 votes)
18 views15 pages

OSYMICROPROJECTFINAL

Uploaded by

Swagat Rajage
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views15 pages

OSYMICROPROJECTFINAL

Uploaded by

Swagat Rajage
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Shivajirao.S.

Jondhale Polytechnic, Ambernath

Micro-Project On

Computer Department
Shivajirao.S.Jondhale Polytechnic, Ambernath

MAHARASHTRA STATE
BOARD OF TECHNICAL
EDUCATION

Certificate
th
This is to certify that Mr./Ms. of 5 Semester of Diploma in COMPUTER TECHNOLOGY of
Institute, SHIVAJIRAO SAMARTH JONDHALE POLYTECHNIC (Code:0147) has completed the
Micro Project satisfactorily in Subject: OSY for the academic year (2022- 2023) as prescribed in
the curriculum.

SR NO. Name of Students Roll No. Enrollment No. Seat No.

1 Swagat Rajage 1418 2001470012

2 Kartik Sonawane 1423 2001470009

3 Rohan Gawande 1406 2001470026

4 Anuj Singh 1401 2001470010

Place: AMBERNATH. Date:

Subject Teacher Head of the Department Principal

Computer Department
Shivajirao.S.Jondhale Polytechnic, Ambernath
II

Computer Department
Shivajirao.S.Jondhale Polytechnic, Ambernath

INDEX

SR NO. CONTENT PAGE NO.

I
1 TITLE

CERTIFICATE II
2
III
INDEX
3

4 ABSTRACT 1

5
INTRODUCTION 2

6 LITERATURE SURVEY 3
7
PROPOSED SYSTEM 4
PAGE REPLACEMENT 5
8
ALGORITM

9 CONCLUSION 9

10 REFERENCE 9

III

Computer Department
Shivajirao.S.Jondhale Polytechnic, Ambernath

ABSTRACT

operating system (OS), Software that controls the operation of a computer, directs the input
and output of data, keeps track of files, and controls the processing of computer programs. Its
roles include managing the functioning of the computer hardware, running the applications
programs, serving as an interface between the computer and the user, and allocating computer
resources to various functions. When several jobs reside in the computer simultaneously and
share resources (multitasking), the OS allocates fixed amounts of CPU time and memory in
turn or allows one job to read data while another writes to a printer and still another performs
computations. Through a process called time-sharing, a large computer can handle interaction
with hundreds of users simultaneously, giving each the perception of being the sole user.
Modern computer operating systems are becoming increasingly machine-independent,
capable of running on any hardware platform; a widely used platform-independent operating
system in use today on mainframe computers is UNIX. Most personal computers run on
Microsoft’s Windows operating system, which grew out of and eventually replaced MS-
DOS. The operating system is the performance of a computer system hardware abstraction,
through which people control the hardware, and to use the resources of the computer system.
Course groups is proposed, using a variety of measures to uphold the theory and practice,
both innovative strategies to improve teaching effectiveness, develop computer applications
personnel. In order to cultivate the students' basic knowledge, practical ability, innovation
and system design capability for the subject to course through software and hardware as a
method.

Computer Department
Shivajirao.S.Jondhale Polytechnic, Ambernath
1

Computer Department
Shivajirao.S.Jondhale Polytechnic, Ambernath

1. INTRODUCTION
An operating system (OS) manages all other applications and programs in a computer, and it is
loaded into the computer by a boot program. It enables applications to interact with a
computer’s hardware. Through a designated application programmer interface, the application
programmers request services from the operating system (API). The kernel is the software that
contains the operating system’s core components. To run other programmers, every computer
has to have at least one operating system installed.

Operating System
Windows, Linux, and Android are examples of operating systems that enable the user to use
programs like MS Office, Notepad, and games on the computer or mobile phone. It is
necessary to have at least one operating system installed in the computer in order to run basic
programs like browsers.
• An operating system (OS) is the programme that controls all other
application programmes in a computer after being installed into the system first
by a boot programme.

• Running system (OS), Computer operating system software that coordinates data
input and output, manages files, and regulates the execution of computer
programmes

• To sum up, an operating system is a piece of software that controls computer


hardware and software resources and offers common services for software
applications.

Page Replacement Algorithm decides which page to remove, also called swap out when a new
page needs to be loaded into the main memory. Page Replacement happens when a requested
page is not present in the main memory and the available space is not sufficient for allocation
to the requested page.When the page that was selected for replacement was paged out, and
referenced again, it has to read in from disk, and this requires for I/O completion. This process
determines the quality of the page replacement algorithm: the lesser the time waiting for page-
ins, the better is the algorithm.A page replacement algorithm tries to select which pages
should be replaced so as to minimize the total number of page misses. There are many
different page replacement algorithms. These algorithms are evaluated by running them on a
particular string of memory reference and computing the number of page faults. The fewer is
the page faults the better is the algorithm for that situation.Page Replacement Algorithms are
First In First Out (FIFO),Least Recently Used (LRU) & Optimal Page Replacement.

Computer Department
Shivajirao.S.Jondhale Polytechnic, Ambernath

2. LITERATURE SURVEY

There are several algorithms of page replacement proposed by experts, namely :


1. First in First out (FIFO): This is the simplest page changing algorithm. In this algorithm, the
operating system keeps track of all the pages in memory that are in the queue, namely page that
has been in front of the queue the longest. When a page has to be replaced the page at the front
of the queue is chosen to be deleted. An average of hit ratio of 50 percent is reported by FIFO
algorithm. The advantages and disadvantages of FIFO algorithm: Easy to understand, very easy
to be implemented, Performance not always good.
2. Optimal Page Replacement: In this algorithm, pages are replaced which will not be used for
the next longest duration of time. Optimal page replacement is a good algorithm, but it is
impossible to implement practically, because the operating system will not know the next
request. The use of this algorithm is to create benchmarks so that other replacement algorithms
can be analyzed against this algorithm. On this algorithm, system select victim whole reference
is furthest. This algorithm has the best page fault behavior reported .
3. Least Recently Used: In this algorithm, the page will be replaced the least used (least recently
used). An average of 60 % hit ratio is reported by LRU algorithm. This algorithm selects the
victim page as that which is not been demanded for access for along time.

Computer Department
Shivajirao.S.Jondhale Polytechnic, Ambernath
3. PROPOSED SYSTEM

In this research, we proposed a new concept for page replacement, which is based on block
reading of pages from the secondary store-age. As we know that disc, access is time consuming
because of the complex mechanism of secondary storage, which lead to slow processing of
data. It is always better to read a block of data whenever there is frequent disc access. In
my research, whenever there will be a page fault, instead of reading a missed page only, I
retrieve asset of pages equal to number of frames allotted for that process. By this way, we can
definitely minimize number of page miss, which will improve hit ratio too.

Computer Department
Shivajirao.S.Jondhale Polytechnic, Ambernath

4. PAGE REPLACEMENT ALGORITHM

Page replacement algorithms are the techniques using which an Operating System decides
which memory pages to swap out, write to disk when a page of memory needs to be allocated.
Paging happens whenever a page fault occurs and a free page cannot be used for allocation
purpose accounting to reason that pages are not available or the number of free pages is lower
than required pages. When the page that was selected for replacement and was paged out, is
referenced again, it has to read in from disk, and this requires for I/O completion. This process
determines the quality of the page replacement algorithm: the lesser the time waiting for page-
ins, the better is the algorithm. A page replacement algorithm looks at the limited information
about accessing the pages provided by hardware, and tries to select which pages should be
replaced to minimize the total number of page misses, while balancing it with the costs of
primary storage and processor time of the algorithm itself. There are many different page
replacement algorithms. We evaluate an algorithm by running it on a particular string of
memory reference and computing the number of page faults.
FIFO (First in First out) Page Replacement Algorithm − It is one of the simplest page
replacement algorithm. The oldest page, which has spent the longest time in memory is
chosen and replaced. This algorithm is implemented with the help of FIFO queue to hold
the pages in memory. A page is inserted at the rear end of the queue and is replaced at
the front of the queue. Advantages and disadvantages of FIFO Algorithm:- FIFO is easy
to understand, It is very easy to implement, Not always good at performance. It may
replace an active page to bring a new one and thus may cause a page fault of that
page immediately.
EXAMPLE

5
Computer Department
Shivajirao.S.Jondhale Polytechnic, Ambernath
Implementation FIFO

1-frame = No of page fault - 20


2-frame= No of page fault -15
3-frame= No of page fault -15
4-frame= No of page fault -10
5-frame= No of page fault - 9

LRU (Least Recently Used) Algorithm − The Least Recently algorithm replaces the page that has
not been used for the longest period of time. It is based on the observation that pages that have
not been used for long time will probably remain unused for the longest time and are to be
replaced.
Advantages and disadvantages of LRU Algorithm:-

 LRU page replacement algorithm is quiet efficient.


 It does not suffer from Belady's Anomaly.
 Its implementation is not very easy.
 Its implementation may require substantial hardware assistance used (LRU)
EXAMPLE

Implementation
LRU
1-frame= No of page fault -20
2-frame= No of page fault -17
3-frame= No of page fault - 12
4-frame= No of page fault – 8
5-frame=No of page fault -7

Computer Department
Shivajirao.S.Jondhale Polytechnic, Ambernath

Optimal Page Replacement Algorithm

An optimal page-replacement algorithm has the lowest page-fault rate of all


algorithms. An optimal page- replacement algorithm exists, and has been called
OPT or MIN.
Replace the page that will not be used for the longest period of time. Use the time
when a page is to be used.
Advantages and disadvantages of Optimal Page Replacement

 Lowest page fault rate.


 Twice as good as first in first out page replacement algorithm.
 Difficult to implement.
 It need forecast.

EXAMPLE

Imlementation OPR
1-frame=No of page fault-20
2-frame=No of page fault-13
3-frame=No of page fault-9
4-frame=No of page fault-8
5-frame=No of page fault-7

Computer Department
Shivajirao.S.Jondhale Polytechnic, Ambernath

String 2-1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6

COMPARISON BETWEEN FIFO, LRU AND OPR

NUMBER NO. OF NO. OF NO. OF


OF PAGE FAULT PAGE FAULT PAGE FAULT
FRAMES IN FIFO IN IN OPR
LRU

1-FRAME 20 20 20
STING 1
2-FRAME 15 17 13
3-FRAME 15 12 9
4-FRAME 10 8 8
5-FRAME 9 7 7
1-FRAME 20 20 20
STRING 2
2-FRAME 18 18 15
3-FRAME 15 16 11
4-FRAME 10 14 8
5-FRAME 8 10 7

Performance analysis of page replacement algorithms for sting 1 & string 2

Computer Department
Shivajirao.S.Jondhale Polytechnic, Ambernath

CONCLUSION:

Page Replacement Algorithms is used to prevent overallocation of memory by modifying


page-fault service routine to include page replacement. It will use dirty (modify) bit to reduce
overhead of page transfers; only modified pages written back to disk. Page replacement
completes separation between logical memory and physical memory; large virtual memory
can be provided on smaller physical memory.

REFERENCES

Textbook/OSY

https://www.geeksforgeeks.org/operating-systems/

https://www.educba.com/operating-system/

https://www.wikipedia.com

Computer Department
Shivajirao.S.Jondhale Polytechnic, Ambernath

Shivajirao S. Jondhale Polytechnic, Ambernath (E)

Teacher Evaluation Sheet

Academic Year 2022-2023

Program Title: Make a comparative statement to calculate page fault for given reference string by
using different page replacement algorithm.

Semester: Fifth Semester.

Aims/Benefits of the Micro-Project:


Course Outcomes Achieved:
a) Interpret features of Operating System.
b) To provide users a convenient interface to use the computer system.
c) To act as an intermediary between the hardware and its users, making it easier
for the users to access and use other resources.
d) To manage the resources of a computer system.

Skill Developed / Learning outcomes of this Micro-Project:

Applications of this Micro- Project:


• Learned to calculate the page fault easily.
• Learned to calculate the page fault of FIFO.
• Learned to calculate the page fault of LRU.
• Learned to calculate the page fault of OPR.

10

Computer Department

You might also like