Osy Report
Osy Report
Micro Project On
Submitted by
60.Sujal Patade
Under Guidance of
Mr. U. S. Shirshetti
Sinhgad Institutes
Sinhgad Technical Education Society’s
SOU. VENUTAI CHAVAN POLYTECHNIC, PUNE - 411041
ACADEMIC YEAR 2024– 2025
Maharashtra State Board of technical
Education Certificate
This is to certify that Mast. Sujal Patade with Roll No. 60 of Third
Semester of Diploma in Information Technology of Institute Sou.
Venutai Chavan Polytechnic (Code:0040) has successfully
completed the Micro-Project in Operating System (22516) for
the academic year 2024-2025.
A. BRIEF INTRODUCTION:
An operating system (OS) is the foundational software that manages a computer's hardware and
software resources, enabling users and applications to interact with the system efficiently. It plays
a crucial role in program execution, resource allocation, security, and protection, while offering
different views to users and the system. Key OS features include virtual memory, which optimizes
memory management through techniques like paging and segmentation, and various page
replacement algorithms that maintain system performance. Additionally, access methods and file
allocation strategies ensure effective data storage and retrieval, making the operating system an
essential component of modern computing.
The aim of this report is to explore and understand the fundamental concepts, operations, and
mechanisms of modern operating systems. This includes examining the key components such as
program and resource management, security, and protection, as well as understanding advanced
concepts like virtual memory, page replacement algorithms, and file management methods. By
gaining insight into these topics, the report aims to highlight how operating systems efficiently
manage system resources and ensure optimal performance and security in computing environments.
Name of Resource
Sr. No. Specification
Required
1. Laptop Dell - i7 ,16 GB RAM
2. Operating system Windows 11
3. Software Google chrome
E. ACTION PLAN:
GROUP MEMBERS:
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.
The process for this micro project is to make a " Report on Operating System, Virtual
Memory, Page Replacement Algorithms and Access Methods "
We collect information and organize by following points:
1. Collect the information on Notepad.
2. Show the information to faculty.
3. Learn about layers of atmospheres.
4. First make a raw report and then correct it.
5. After all the corrections make a proposal.
6. Prepare a project on “Report on Operating System, Virtual Memory, Page Replacement
Algorithms and Access Methods”
7. Make pdf of report and print it.
ANNEXURE III
Evaluation Sheet for the Micro Project
Title of the project: " Report on Operating System, Virtual Memory, PageReplacement Algorithms
and Access Methods."
S. No Course Outcomes
a. Install operating system and configure it.
e. Calculate efficiency of different memory management techniques.
f. Apply file management techniques
Almost all operating systems have a user interface (UI). Two fundamental approaches
or users to interface with the
operating system are command-line interface and graphical user interface or GUI.
Command interpreter executes next
user-specified command. A GUI provides a mouse-based window and menu system as
an interface.
2. Program Execution
The operating system provides an environment to run users programs efficiently. The
resources needed to theprograms to complete execution are provided by operating
system ensuring optimum utilization of computer system.
Memory allocation and deallocation, processor allocation and scheduling, multitasking
etc functions are performed by operating system. The operating system has all rights of
resource management. User program does not given these rights.
3. I/O Device Management
The I/O device management component is an I/O manager that hides the details of
hardware devices and manages the main memory for devices using cache and spooling.
This component provides a buffer cache and general device driver code that allows the
system to manage the main memory and the hardware devices connected to it. It also
provides and manages custom drivers for particular hardware devices.
The purpose of the I/O system is to hide the details of hardware devices from the
application programmer. An I/O device management component allows highly efficient
resource utilization while minimizing errors and making programming easy on the
entire range of devices available in their systems.
4. Security Management
The security mechanisms in an operating system ensure that authorized programs have
access to resources, and unauthorized programs have no access to restricted resources.
Security management refers to the various processes where the user changes the file,
memory, CPU, and other hardware resources that should have authorization from the
operating system.
1. User View
The user view depends on the system interface that is used by the users. Some systems
are designed for a single user to monopolize the resources to maximize the user's task.
In these cases, the OS is designed primarily for ease of use, with little emphasis on
quality and none on resource utilization.
The user viewpoint focuses on how the user interacts with the operating system through
the usage of various application programs. In contrast, the system viewpoint focuses on
how the hardware interacts with the operating system to complete various tasks.
2. System View
The OS may also be viewed as just a resource allocator. A computer system comprises
various sources, such as hardware and software, which must be managed effectively.
The operating system manages the resources, decides between competing demands,
controls the program execution, etc. According to this point of view, the operating
system's purpose is to maximize performance. The operating system is responsible for
managing hardware resources and allocating them to programs and users to ensure
maximum performance.
From the user point of view, we've discussed the numerous applications that require
varying degrees of user participation. However, we are more concerned with how the
hardware interacts with the operating system than with the user from a system
viewpoint.
Virtual Memory
Virtual memory is a memory management technique used by operating systems to give the
appearance of a large, continuous block of memory to applications, even if the physical
memory (RAM) is limited. It allows the system to compensate for physical memory shortages,
enabling larger applications to run on systems with less RAM.
• Introduction to Paging
Paging is a memory management scheme that eliminates the need for a contiguous
allocation of physical memory. The process of retrieving processes in the form of pages
from the secondary storage into the main memory is known as paging. The basic purpose
of paging is to separate each procedure into pages. Additionally, frames will be used to
split the main memory. This scheme permits the physical address space of a process to be
non – contiguous.
In paging, the physical memory is divided into fixed-size blocks called page frames, which
are the same size as the pages used by the process. The process’s logical address space is
also divided into fixed-size blocks called pages, which are the same size as the page
frames. When a process requests memory, the operating system allocates one or more page
frames to the process and maps the process’s logical pages to the physical page frames.
The mapping between logical pages and physical page frames is maintained by the page
table, which is used by the memory management unit to translate logical addresses into
physical addresses. The page table maps each logical page number to a physical page frame
number
• Segmentation
A process is divided into Segments. The chunks that a program is divided into which are
not necessarily all of the exact sizes are called segments. Segmentation gives the user’s
view of the process which paging does not provide. Here the user’s view is mapped to
physical memory.
Segment Table
It maps a two-dimensional Logical address into a one-dimensional Physical address. It’s
each table entry has:
o Base Address: It contains the starting physical address where the segments reside in
memory.
o Segment Limit: Also known as segment offset. It specifies the length of the segment.
Advantages of Segmentation in Operating System :-
• Fragmentation
The process of dividing a computer file, such as a data file or an executable program file,
into fragments that are stored in different parts of a computer’s storage medium, such as
its hard disc or RAM, is known as fragmentation in computing.
Types of Fragmentation
o . Internal Fragmentation
Internal fragmentation occurs when there is unused space within a memory block.
For example, if a system allocates a 64KB block of memory to store a file that is
only 40KB in size, that block will contain 24KB of internal fragmentation. When
the system employs a fixed-size block allocation method, such as a memory
allocator with a fixed block size, this can occur.
o External Fragmentation
Fragmentation can also occur at various levels within a system. File
fragmentation, for example, can occur at the file system level, in which a file is
divided into multiple non-contiguous blocks and stored on a storage medium.
Memory fragmentation can occur at the memory management level, where the
system allocates and deallocated memory blocks dynamically. Network
fragmentation occurs when a packet of data is divided into smaller fragments for
transmission over a network.
• Page Fault
This is the simplest page replacement algorithm. In this algorithm, the operating system
keeps track of all pages in the memory in a queue, the oldest page is in the front of the
queue. When a page needs to be replaced page in the front of the queue is selected for
removal.
Example:-
Initially, all slots are empty, so when 1, 3, 0 came they are allocated to the empty
slots → 3 Page Faults.
when 3 comes, it is already in memory so→0 Page Faults. Then 5 comes, it is not
available in memory so it replaces the oldest page slot i.e 1. → 1 Page Fault. 6
comes, it is also not available in memory so it replaces the oldest page slot i.e 3 →
1 Page Fault. Finally, when 3 come it is not available so it replaces 0 1 page fault.
• Least Recently Used
LRU stands for Least Recently Used. As the name suggests, this algorithm is based on
the strategy that whenever a page fault occurs, the least recently used page will be
replaced with a new page. So, the page not utilized for the longest time in the memory
(compared to all other pages) gets replaced. This strategy is known as LRU paging.
Example:-
o Consider the page reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 3 with 4
page frames. Finding number of page faults.
Initially, all slots are empty, so when 7 0 1 2 are allocated to the empty slots →
4 Page faults
0 is already their so → 0 Page fault. when 3 came it will take the place of 7
because it is least recently used→ 1 Page fault
0 is already in memory so → 0 Page fault .
4 will takes place of 1 → 1 Page Fault
Now for the further page reference string → 0 Page fault because they are
already available in the memory.
• Optimal Page Replacement
Example:-
Initially, all slots are empty, so when 7 0 1 2 are allocated to the empty slots →
4 Page faults
0 is already there so → 0 Page fault. when 3 came it will take the place of 7
because it is not used for the longest duration of time in the future. → 1 Page
fault. 0 is already there so → 0 Page fault. 4 will takes place of 1→1 Page
Fault.
Access Methods
File access methods in an operating system are the techniques and processes used to read from
and write to files stored on a computer’s storage devices. There are several ways to access this
information in the file. Some systems provide only one access method for files. Other systems,
such as those of IBM, support many access methods, and choosing the right one for a particular
application is a major design problem.
These methods determine how data is organized, retrieved, and modified within a file system.
Understanding file access methods is crucial for efficient data management and system
performance. In this article, we are going to discuss different types of methods to access the
file.
• Sequential Access
The operating system reads the file word by word in a sequential access method of file
accessing. A pointer is made, which first links to the file's base address. If the user wishes
to read the first word of the file, the pointer gives it to them and raises its value to the
next word. This procedure continues till the file is finished. It is the most basic way of
file access. The data in the file is evaluated in the order that it appears in the file and that
is why it is easy and simple to access a file's data using a sequential access mechanism.
For example, editors and compilers frequently use this method to check the validity of
the code.
A Direct/Relative file access mechanism is mostly required with the database systems.
In the majority of the circumstances, we require filtered/specific data from the database,
and in such circumstances, sequential access might be highly inefficient. Assume that
each block of storage holds four records and that the record we want to access is stored
in the tenth block. In such a situation, sequential access will not be used since it will have
to traverse all of the blocks to get to the required record, while direct access will allow
us to access the required record instantly.
The direct access mechanism requires the OS to perform some additional tasks but
eventually leads to much faster retrieval of records as compared to sequential access.
Swapping in an operating system is a process that moves data or programs between the
computer’s main memory (RAM) and a secondary storage (usually a hard disk or SSD).
This helps manage the limited space in RAM and allows the system to run more programs
than it could otherwise handle simultaneously.
It’s important to remember that swapping is only used when data isn’t available in RAM.
Although the swapping process degrades system performance, it allows larger and
multiple processes to run concurrently. Because of this, swapping is also known as
memory compaction. The CPU scheduler determines which processes are swapped in
and which are swapped out. Consider a multiprogramming environment that employs a
priority-based scheduling algorithm. When a high-priority process enters the input queue,
a low-priority process is swapped out so the high-priority process can be loaded and
executed. When this process terminates, the low-priority process is swapped back into
memory to continue its execution.
o If there is low main memory resource and user is executing too many processes
and suddenly the power of system goes off there might be a scenario where data
get erase of the processes which are took parts in swapping.
o Chances of number of page faults occur
• File Allocation Method
The File allocation methods in OS are different ways that are used for storing the file on
the hard disk. There are different ways in which we can store the files on the hard disk in
such a manner that there is efficient utilization of disk space and the file can be accessed
faster by the Operating System.
In contiguous file allocation, the block is allocated in such a manner that all the allocated
blocks in the hard disk are adjacent.
Assuming a file needs 'n' number of blocks in the disk and the file begins with a block at
position'x', the next blocks to be assigned to it will be x+1,x+2,x+3,...,x+n-1 so that they
are in a contiguous manner.
Example
o We have three different types of files that are stored in a contiguous manner on
the hard disk.
In the above image on the left side, we have a memory diagram where we can see the
blocks of memory. At first, we have a text file named file1.txt which is allocated using
contiguous memory allocation, it starts with the memory block 0 and has a length of 4 so
it takes the 4 contiguous blocks 0,1,2,3. Similarly, we have an image file and video file
named sun.jpg and mov.mp4 respectively, which you can see in the directory that they
are stored in the contiguous blocks. 5,6,7 and 9,10,11 respectively.
Advantages Contiguous File Allocation
o It is very easy to implement.
o There is a minimum amount of seek time.
Disadvantages Contiguous File Allocation
o At the time of creation, the file size must be initialized.
o As it is pre-initialized, the size cannot increase.
The Linked file allocation overcomes the drawback of contiguous file allocation. Here
the file which we store on the hard disk is stored in a scattered manner according to the
space available on the hard disk. Now, you must be thinking about how the OS
remembers that all the scattered blocks belong to the same file. So as the name linked
File Allocation suggests, the pointers are used to point to the next block of the same file,
therefore along with the entry of each file each block also stores the pointer to the next
block.
Example:-
o Here we have one file which is stored using Linked File Allocation.
In the above image on the right, we have a memory diagram where we can see
memory blocks. On the left side, we have a directory where we have the
information like the address of the first memory block and the last memory block.
In this allocation, the starting block given is 0 and the ending block is 15,
therefore the OS searches the empty blocks between 0 and 15 and stores the files
in available blocks, but along with that it also stores the pointer to the next block
in the present block. Hence it requires some extra space to store that link.
The indexed file allocation is somewhat similar to linked file allocation as indexed
file allocation also uses pointers but the difference is here all the pointers are put
together into one location which is called index block. That means we will get all the
locations of blocks in one index file. The blocks and pointers were spread over the
memory in the Linked Allocation method, where retrieval was accomplished by visiting
each block sequentially. But here in indexed allocation, it becomes easier with the index
block to retrieve.
Example:-
o As shown in the diagram below block 19 is the index block which contains all
the addresses of the file named text1. In order, the first storage block is 9,
followed by 16, 1, then 10, and 25. The negative number -1 here denotes the
empty index block list as the file text1 is still too small to fill more blocks.
https://www.scaler.com/topics/file-allocation-methods-in-os/
https://www.geeksforgeeks.org/swapping-in-operating-system/
https://www.scaler.com/topics/file-access-methods-in-os/
https://www.geeksforgeeks.org/file-access-methods-in-operating-system/
https://www.geeksforgeeks.org/program-for-least-recently-used-lru-page-replacement-
algorithm/
https://www.scaler.com/topics/optimal-page-replacement-algorithm/
https://www.geeksforgeeks.org/page-fault-handling-in-operating-system/
https://www.scaler.com/topics/lru-page-replacement-algorithm/
Conclusion
In conclusion, the operating system plays a critical role in managing hardware and software
resources efficiently, ensuring smooth execution of programs and user interaction with the
system. By examining core components such as program management, resource allocation, and
security, we gain a deeper understanding of how operating systems support multitasking and
protection mechanisms.
Virtual memory concepts like paging and segmentation help optimize memory usage, while
page replacement algorithms, including FIFO, LRU, and Optimal, ensure efficient
management of memory pages during execution. These mechanisms are essential to preventing
fragmentation and reducing page faults, which can slow down system performance.
Furthermore, access methods such as sequential and direct access, along with file allocation
techniques, provide robust mechanisms for organizing and retrieving data. These methods,
whether contiguous, linked, or indexed, help manage files in storage efficiently while
minimizing delays caused by seeking and swapping.
Overall, understanding the operations, management, and optimization techniques within an
operating system is vital for improving performance, enhancing security, and maximizing
resource utilization in modern computing environments. This knowledge equips us to build
better systems that meet both user and system demands efficiently.