Os Final Report
Os Final Report
SIMULATION
A PROJECT REPORT
Submitted by
JOYJIT BANERJEE[Reg No: RA22110030102007]
TUSHAR DINESHPRABHU [Reg No: RA2211003011988]
DEBASISH DAS [Reg No: RA2211003011991]
Under the Guidance of
Mrs. P. Renuka Devi
Assistant Professor, Department of Computing Technologies In partial
fulfilment of the requirements for the degree of
BACHELOR OF TECHNOLOGY in COMPUTER SCIENCE
AND ENGINEERING
BONAFIDE CERTIFICATE
Certified that this B.Tech project report titled “PROCESS SCHEDULER SIMULATION” is
Dineshprabhu [Reg. No.RA2211003011988] who carried out the project work under my
supervision. Certified further, that to the best of my knowledge the work reported herein does
not form part of any other thesis or dissertation on the basis of which a degree or award was
conferred on an earlier
2
Own Work Declaration Form
We hereby certify that this assessment compiles with the University’s Rules and
We confirm that all the work contained in this assessment is our own except where
• Referenced and put in inverted commas all quoted text (from books, web, etc.)
• Given the sources of all pictures, data etc. that are not my own
• Not made any use of the report(s) or essay(s) of any other student(s) either past or
present
3
• Acknowledged in appropriate places any help that I have received from others
any other plagiarism criteria specified in the Course handbook / University website
I understand that any false claim for this work will be penalized in accordance with the
University policies and regulations.
DECLARATION:
plagiarism and I certify that this assessment is my / our own work, except where indicated by
referring, and that I have followed the good academic practices noted above.
If you are working in a group, please write your registration numbers and sign with the date
ACKNOWLEDGEMENT
Institute of Science and Technology, for the facilities extended for the project work and his
continued support.
4
We extend our sincere thanks to Dean-CET, SRM Institute of Science and Technology, Dr.
Computing, SRM Institute of Science and Technology, for her support throughout the project
work.
Technology, for her suggestions and encouragement at all the stages of the project work.
We want to convey our thanks to our Mrs. P. Renuka Devi , Assistant Professor and members,
Department of Computing Technologies, SRM Institute of Science and Technology, for their
We register our immeasurable thanks to our Faculty Advisor, Dr. V Bibin Christopher,
Assistant Professor, Department of Data Science and Business Systems, SRM Institute of
Science and Technology, for leading and helping us to complete our course.
Our inexpressible respect and thanks to our guide, Mrs. P. Renuka Devi , Assistant
Professor, Department of Data Science and Business Systems, SRM Institute of Science and
Technology, for providing us with an opportunity to pursue our project under his mentorship.
He provided us with the freedom and support to explore the research topics of our interest.
5
His passion for solving problems and making a difference in the world has always been
inspiring.
We sincerely thank the Data Science and Business Systems Department staff and students,
SRM Institute of Science and Technology, for their help during our project. Finally, we would
like to thank parents, family members, and friends for their unconditional love, constant
TABLE OF CONTENTS
6
3 CHAPTER 2: SCHEDULING & ITS 11
TYPES
5 CHAPTER 4: OUTPUT 32
6 CONCLUSION 33
7
in it. The librarians have to assess the system and provide an entry in it. Through LMS the
librarian can find the book in the bookshelves. The LMS is designed with the basic features
such as librarian can add/view/update/delete books and students' details in it. Once he/she
ingress into the system they can modify any data’s in the database. The complete model is
developed in Dot net technology, the C# language is used to build the front end application
Journal of Xi'an University of Architecture & Technology Volume XII, Issue XI, 2020
ISSN No : 1006-7930 Page No: 743 whereas the SQL server is exploiting as database. The
authorized person can only access the LMS system, they have to log in with their user id
and password. As aforementioned that the LMS is designed in a user-friendly manner, so
the admin can smoothly activate the system without expert advice. Every data is storing
and retrieving from the SQL database so it is highly secure. Thus our system contributes its
new approach towards the digital library setup.
8
PROBLEM STAEMENT:
Libraries play a crucial role in education and research institutions, serving as repositories of
knowledge and resources. However, many libraries still rely on outdated or manual systems for
managing their collections, leading to several challenges. The implementation of a Library
Management System (LMS) within the operating system environment aims to address these
issues and enhance the overall efficiency of library operations. The key problems to be addressed
include:
Libraries often struggle with manual cataloging and classification of resources, leading to
inefficiencies in resource retrieval. The lack of a centralized system results in difficulty tracking
the availability and location of items.
Poor Transaction Handling:
Current systems may lack automation in handling transactions such as borrowing and returning
of items. This can result in errors, delays, and challenges in maintaining accurate transaction
records.
Limited User Accessibility:
Traditional library systems may not provide users with convenient and intuitive interfaces. This
can hinder accessibility for both librarians and patrons, impacting the overall user experience.
Reservation and Queue Management Issues:
Managing reservations and queues for popular items is often a manual and time-consuming
process. Lack of automation can lead to confusion and frustration among users waiting for
specific resources.
Ineffective Fine Management:
Libraries face challenges in enforcing borrowing policies and managing fines for overdue items.
Manual tracking and notification processes are prone to errors and may result in inconsistencies.
Lack of Comprehensive Reporting:
9
Libraries often struggle to generate comprehensive reports and analytics on resource usage,
popular items, and overdue materials. This lack of data-driven insights hampers informed
decision-making.
Security and Data Integrity Concerns:
Libraries deal with sensitive user data and resource information. Inadequate security measures
may expose the system to unauthorized access, compromising user privacy and data integrity.
Scalability and Adaptability Issues:
Many existing library systems lack the scalability and adaptability needed to accommodate the
evolving needs of modern libraries. This limits their ability to integrate with new technologies
and accommodate growing collections.
Addressing these challenges through the development and implementation of a robust Library
Management System within the operating system environment is essential for enhancing the
overall efficiency, user experience, and security of library operations. This proposed system seeks
to leverage technology to streamline processes, improve accessibility, and provide data-driven
insights for better decision-making within library management.
10
Scheduling and It’s Types
Scheduling, in the context of computer science and operating systems, refers to the process of
determining the order in which tasks, processes, or jobs are executed by a computer or other
computing systems. It involves the allocation of system resources, primarily the central
processing unit (CPU), to various tasks to ensure efficient utilization and effective management
of these resources. Scheduling algorithms aim to prioritize and execute tasks in a manner that
optimizes factors such as system responsiveness, throughput, fairness, and resource utilization.
Different scheduling algorithms are employed based on the specific goals and constraints of the
computing system, and they determine which task gets access to the CPU and for how long.
Scheduling plays a vital role in ensuring the effective operation of multitasking, multi-user
systems and is crucial in real-time computing applications, where meeting specific timing
constraints is essential.
11
● Poor for interactive systems: FCFS is not well-suited for interactive or real-time
systems where responsiveness is critical because it may result in long response times.
2. Shortest Job First (SJF) scheduling is a CPU scheduling algorithm used in operating
systems. It aims to minimize the average waiting time of processes by giving preference to
the shortest job (process) in the ready queue. SJF is also known as Shortest Job Next (SJN)
or Shortest Job First-Come-First-Served (SJF-FCFS).
12
Key characteristics of Priority Scheduling - Non-Preemptive:
13
4. Priority Scheduling - Preemptive (PS-P) is a CPU scheduling algorithm used in
operating systems. It assigns a priority value to each process, and the process with the
highest priority that is ready to run is given the CPU. However, unlike non-preemptive
priority scheduling, in PS-P, a process currently executing can be preempted if a higher-
priority process becomes available.
● Process selection: The process with the highest priority in the ready queue is
allowed to run on the CPU. If a higher-priority process arrives or becomes
ready to run, the currently executing process can be preempted and moved back
to the ready queue.
14
5. Round Robin Scheduling (RR) is a widely used CPU scheduling algorithm in operating
systems. It is designed to provide fair access to the CPU and ensure that no process
monopolizes it for an extended period. In Round Robin scheduling, each process is
assigned a fixed time quantum, and processes take turns executing for their allocated time,
moving in a circular queue.
● Time quantum: The most defining feature of Round Robin scheduling is the
time quantum or time slice, which is a fixed amount of time allocated to each
process. When a process's turn arrives, it is allowed to run for the time quantum
or until it voluntarily yields the CPU (e.g., due to I/O operations).
● Fairness: Round Robin aims to provide fair access to the CPU for all processes.
Because of the fixed time quantum, no process can monopolize the CPU for an
extended period, ensuring that all processes get a chance to execute.
● Response time: Round Robin provides good response times for interactive
processes since they get a chance to execute frequently. However, it may not be
as efficient as other scheduling algorithms for long-running CPU-bound tasks.
15
PROGRAM CODE:
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
struct books{
int id;
char bookName[50];
char authorName[50];
char date[12];
}b;
struct student{
16
int id;
char sName[50];
char sClass[50];
int sRoll;
char bookName[50];
char date[12];
}s;
FILE *fp;
int main(){
int ch;
17
while(1){
system("cls");
printf("1.Add Book\n");
printf("2.Books List\n");
printf("3.Remove Book\n");
printf("4.Issue Book\n");
printf("0.Exit\n\n");
scanf("%d", &ch);
switch(ch){
case 0:
18
exit(0);
case 1:
addBook();
break;
case 2:
booksList();
break;
case 3:
del();
break;
19
case 4:
issueBook();
break;
case 5:
issueList();
break;
default:
printf("Invalid Choice...\n\n");
getch();
20
}
return 0;
void addBook(){
char myDate[12];
time_t t = time(NULL);
struct tm tm = *localtime(&t);
strcpy(b.date, myDate);
fp = fopen("books.txt", "ab");
21
printf("Enter book id: ");
scanf("%d", &b.id);
fflush(stdin);
gets(b.bookName);
fflush(stdin);
gets(b.authorName);
22
fwrite(&b, sizeof(b), 1, fp);
fclose(fp);
void booksList(){
system("cls");
fp = fopen("books.txt", "rb");
23
}
fclose(fp);
void del(){
system("cls");
scanf("%d", &id);
FILE *ft;
24
fp = fopen("books.txt", "rb");
ft = fopen("temp.txt", "wb");
if(id == b.id){
f=1;
}else{
if(f==1){
printf("\n\nDeleted Successfully.");
}else{
25
printf("\n\nRecord Not Found !");
fclose(fp);
fclose(ft);
remove("books.txt");
rename("temp.txt", "books.txt");
void issueBook(){
26
char myDate[12];
time_t t = time(NULL);
struct tm tm = *localtime(&t);
strcpy(s.date, myDate);
int f=0;
system("cls");
scanf("%d", &s.id);
27
//Check if we have book of given id
fp = fopen("books.txt", "rb");
if(b.id == s.id){
strcpy(s.bookName, b.bookName);
f=1;
break;
if(f==0){
28
return;
fp = fopen("issue.txt", "ab");
fflush(stdin);
gets(s.sName);
fflush(stdin);
gets(s.sClass);
29
scanf("%d", &s.sRoll);
fclose(fp);
void issueList(){
system("cls");
30
fp = fopen("issue.txt", "rb");
fclose(fp);
31
OUTPUT:
32
CONCLUSION: In conclusion, the Library Management
System project represents a significant stride towards
modernizing and optimizing library operations within the
operating system environment. By addressing the identified
challenges and incorporating advanced functionalities, this
project aims to revolutionize the way libraries manage and
provide access to their vast collections. The following key points
summarize the significance and potential impact of the Library
Management System:
33
maintain the integrity of the library's digital infrastructure.
This prioritization of security ensures user privacy and protects
against unauthorized access.
34
35