0% found this document useful (0 votes)
415 views35 pages

Os Final Report

This document is a project report on simulating a process scheduler. It was submitted by three students - Joyjit Banerjee, Debasish Das, and Tushar Dineshprabhu - to their professor Mrs. P. Renuka Devi at SRM Institute of Science and Technology in partial fulfillment of their Bachelor of Technology degree. The report documents the development of a process scheduler simulation and includes an abstract, introduction, chapters on scheduling and program code, output results, and conclusion. It was certified by the supervisor and head of department that the work is original and complies with academic standards.

Uploaded by

Joyjit Banerjre
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)
415 views35 pages

Os Final Report

This document is a project report on simulating a process scheduler. It was submitted by three students - Joyjit Banerjee, Debasish Das, and Tushar Dineshprabhu - to their professor Mrs. P. Renuka Devi at SRM Institute of Science and Technology in partial fulfillment of their Bachelor of Technology degree. The report documents the development of a process scheduler simulation and includes an abstract, introduction, chapters on scheduling and program code, output results, and conclusion. It was certified by the supervisor and head of department that the work is original and complies with academic standards.

Uploaded by

Joyjit Banerjre
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/ 35

PROCESS SCHEDULER

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

DEPARTMENT OF COMPUTING TECHNOLOGIES


COLLEGE OF ENGINEERING AND TECHNOLOGY
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
KATTANKULATHUR – 603 203
NOVEMBER 2023
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

KATTANKULATHUR – 603 203

BONAFIDE CERTIFICATE

Certified that this B.Tech project report titled “PROCESS SCHEDULER SIMULATION” is

the bonafide work of Joyjit Banerjee[Reg. No.: RA2211003012007],Debasish Das[Reg.

No.RA2211003011991], Iteesha Jaiswal [Reg. No.RA2211003010991] and Tushar

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

occasion for this or any other candidate.

Mrs. P. Renuka Devi Dr . M Pushpalatha


SUPERVISOR HEAD OF THE DEPARTMENT
Assistant Professor Professor
Department of Computing Technologies Department of Computing Technologies

SIGNATURE OF INTERNAL SIGNATURE OF EXTERNAL


EXAMINER EXAMINER

Department of Computing Technologies

SRM Institute of Science and Technology

2
Own Work Declaration Form

Degree/ Course : B.Tech in Computer Science and Engineering

Student Names : Joyjit Banerjee, Debasish Das, Tushar Dineshprabhu

Registration Number: RA2211003012007, RA2211003011998, RA2211003011991,

Title of Work : Library management system

We hereby certify that this assessment compiles with the University’s Rules and

Regulations relating to Academic misconduct and plagiarism, as listed in the University

Website, Regulations, and the Education Committee guidelines.

We confirm that all the work contained in this assessment is our own except where

indicated, and that we have met the following conditions:

• Clearly references / listed all sources as appropriate

• 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

(e.g. fellow students, technicians, statisticians, external sources) • Compiled with

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:

I am aware of and understand the University’s policy on Academic misconduct and

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

for every student in your group.

ACKNOWLEDGEMENT

We express our humble gratitude to Dr. C. Muthamizhchelvan, Vice-Chancellor, SRM

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.

T.V.Gopal, for his invaluable support.

We wish to thank Dr. Revathi Venkataraman, Professor & Chairperson, School of

Computing, SRM Institute of Science and Technology, for her support throughout the project

work.

We are incredibly grateful to our Head of the Department, Dr. M.PUSHPALATHA,

Professor, Department of Computing Technologies, SRM Institute of Science and

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

inputs during the project reviews and support.

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

support, and encouragement.

JOYJIT BANERJEE [Reg No: RA2211003012007]

DEBASISH DAS [Reg No: RA2211003011991]

TUSHAR DINESHPRABHU [Reg No: RA2211003011988]

TABLE OF CONTENTS

S.No. Content Page No.


1 ABSTRACT 8

2 CHAPTER 1: PROBLEM STATEMENT 9

6
3 CHAPTER 2: SCHEDULING & ITS 11

TYPES

4 CHAPTER 3: PROGRAM CODE 16

5 CHAPTER 4: OUTPUT 32

6 CONCLUSION 33

ABSTRACT: With the advancement of technology, it is imperative to exalt all the


systems into a user-friendly manner. The Library Management system (LMS) acts as a tool
to transform traditional libraries into digital libraries. In traditional libraries, the
students/user has to search for books which are hassle process and there is no proper
maintenance of database about issues/fines. The overall progress of work is slow and it is
impossible to generate a fast report. The librarians have to work allotted for arranging,
sorting books in the book sells. At the same time, they have to check and monitor the
lend/borrow book details with its fine. It is a tedious process to work simultaneously in
different sectors. LMS will assist the librarians to work easily. The LMS supports the
librarians to encounter all the issues concurrently. The users need not stand in a queue for a
long period to return/borrow a book from the library. The single PC contains all the data’s

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:

Inefficient Resource Management:

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.

1. First-Come-First-Serve (FCFS) scheduling is one of the simplest and most


straightforward scheduling algorithms used in operating systems. In FCFS scheduling,
processes are executed in the order they arrive in the ready queue, with the first process to
arrive being the first one to receive the CPU and execute.

Key characteristics of FCFS scheduling:


● Non-preemptive: FCFS is a non-preemptive scheduling algorithm, which means that
once a process starts executing, it continues until it finishes or voluntarily releases the
CPU.
● Simple to implement: FCFS is easy to understand and implement, making it suitable for
simple systems.
● Lack of priority consideration: FCFS does not consider the priority of processes or their
execution times. It simply follows the order in which processes arrive.
● Can lead to the "convoy effect": FCFS can result in the convoy effect, where a long
process holding the CPU can cause shorter processes to wait, leading to inefficient
resource utilization.

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).

Key characteristics of SJF scheduling:


● Preemptive and non-preemptive: SJF can be implemented in both preemptive and
nonpreemptive versions. In the preemptive version, a new job can interrupt the
execution of the currently running job if a shorter job becomes available. In the non-
preemptive version, the running job is not interrupted until it completes its execution.
● Dynamic priority: SJF essentially assigns priorities based on the expected burst time
(time needed for a process to complete). The shorter the burst time, the higher the
priority.
● Minimizes waiting time: SJF scheduling is designed to minimize the waiting time,
which is the time a process spends in the ready queue before it gets CPU time.
● Potential for starvation: While SJF scheduling is efficient in terms of minimizing
waiting times, it can lead to the starvation of longer jobs if a continuous stream of short
jobs keeps arriving.

3. Priority Scheduling - Non-Preemptive (PS-NP) is a CPU scheduling algorithm used in


operating systems. It assigns a priority value to each process, and the process with the
highest priority is selected to run first. Unlike the preemptive version of priority
scheduling, in nonpreemptive priority scheduling, once a process is given the CPU, it
continues to execute until it completes or voluntarily releases the CPU.

12
Key characteristics of Priority Scheduling - Non-Preemptive:

● Priority assignment: Each process is assigned a priority value based on its


characteristics, such as its importance or resource requirements. Higher priority values
indicate higher priority.
● Process selection: The process with the highest priority in the ready queue is selected to
run. If multiple processes share the highest priority, the scheduling algorithm may use
additional criteria, like First-Come-First-Serve (FCFS) within the same priority group.
● Lack of time-sharing: In non-preemptive priority scheduling, a process runs to
completion without interruption. Only when it completes or enters the waiting state
does the CPU become available for other processes with higher priorities.
● Potential for starvation: Lower-priority processes may experience starvation if
higherpriority processes continually arrive in the system. To mitigate this, aging
mechanisms can be implemented to increase the priority of waiting processes over
time.
● Real-time systems: Priority scheduling is commonly used in real-time operating
systems where certain tasks must meet strict timing constraints, and tasks are assigned
priorities based on their deadlines and criticality.

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.

Key characteristics of Priority Scheduling - Preemptive:

● Priority assignment: Each process is assigned a priority value based on various


factors, such as the importance of the task, deadline constraints, or resource
requirements. Higher priority values represent higher priority.

● 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.

● Time-sharing: Preemptive priority scheduling allows the CPU to be shared


among processes more fairly and responsively. High-priority tasks can start
promptly, and lower-priority tasks can still be executed.

● Avoiding starvation: Preemptive priority scheduling can help prevent starvation


of lower-priority processes since they are given the opportunity to execute
when the CPU becomes available.

● Real-time systems: PS-P is often used in real-time operating systems,


particularly when tasks need to meet strict deadlines and the system must
ensure that highpriority tasks are executed without delay.

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.

Key characteristics of Round Robin Scheduling:

● 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).

● Preemptive: Round Robin is a preemptive scheduling algorithm, which means


that if a process does not complete its execution within the time quantum, it is
temporarily removed from the CPU, and the next process in the queue is given
a chance to execute. The interrupted process is placed back at the end of the
queue.

● 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("<== Library Management System ==>\n");

printf("1.Add Book\n");

printf("2.Books List\n");

printf("3.Remove Book\n");

printf("4.Issue Book\n");

printf("5.Issued Book List\n");

printf("0.Exit\n\n");

printf("Enter your choice: ");

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");

printf("Press Any Key To Continue...");

getch();

20
}

return 0;

void addBook(){

char myDate[12];

time_t t = time(NULL);

struct tm tm = *localtime(&t);

sprintf(myDate, "%02d/%02d/%d", tm.tm_mday,


tm.tm_mon+1, tm.tm_year + 1900);

strcpy(b.date, myDate);

fp = fopen("books.txt", "ab");

21
printf("Enter book id: ");

scanf("%d", &b.id);

printf("Enter book name: ");

fflush(stdin);

gets(b.bookName);

printf("Enter author name: ");

fflush(stdin);

gets(b.authorName);

printf("Book Added Successfully");

22
fwrite(&b, sizeof(b), 1, fp);

fclose(fp);

void booksList(){

system("cls");

printf("<== Available Books ==>\n\n");

printf("%-10s %-30s %-20s %s\n\n", "Book id", "Book


Name", "Author", "Date");

fp = fopen("books.txt", "rb");

while(fread(&b, sizeof(b), 1, fp) == 1){

printf("%-10d %-30s %-20s %s\n", b.id, b.bookName,


b.authorName, b.date);

23
}

fclose(fp);

void del(){

int id, f=0;

system("cls");

printf("<== Remove Books ==>\n\n");

printf("Enter Book id to remove: ");

scanf("%d", &id);

FILE *ft;

24
fp = fopen("books.txt", "rb");

ft = fopen("temp.txt", "wb");

while(fread(&b, sizeof(b), 1, fp) == 1){

if(id == b.id){

f=1;

}else{

fwrite(&b, sizeof(b), 1, ft);

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);

sprintf(myDate, "%02d/%02d/%d", tm.tm_mday,


tm.tm_mon+1, tm.tm_year + 1900);

strcpy(s.date, myDate);

int f=0;

system("cls");

printf("<== Issue Books ==>\n\n");

printf("Enter Book id to issue: ");

scanf("%d", &s.id);

27
//Check if we have book of given id

fp = fopen("books.txt", "rb");

while(fread(&b, sizeof(b), 1, fp) == 1){

if(b.id == s.id){

strcpy(s.bookName, b.bookName);

f=1;

break;

if(f==0){

printf("No book found with this id\n");

printf("Please try again...\n\n");

28
return;

fp = fopen("issue.txt", "ab");

printf("Enter Student Name: ");

fflush(stdin);

gets(s.sName);

printf("Enter Student Class: ");

fflush(stdin);

gets(s.sClass);

printf("Enter Student Roll: ");

29
scanf("%d", &s.sRoll);

printf("Book Issued Successfully\n\n");

fwrite(&s, sizeof(s), 1, fp);

fclose(fp);

void issueList(){

system("cls");

printf("<== Book Issue List ==>\n\n");

printf("%-10s %-30s %-20s %-10s %-30s %s\n\n", "S.id",


"Name", "Class", "Roll", "Book Name", "Date");

30
fp = fopen("issue.txt", "rb");

while(fread(&s, sizeof(s), 1, fp) == 1){

printf("%-10d %-30s %-20s %-10d %-30s %s\n", s.id,


s.sName, s.sClass, s.sRoll, s.bookName, s.date);

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:

Efficiency Enhancement:The implementation of this system is


poised to significantly improve the efficiency of library
operations. Automated cataloging, transaction handling, and
reservation management will streamline processes, reducing
manual efforts and enhancing overall productivity.

User-Centric Approach:The user-friendly interface ensures


that both librarians and patrons can navigate the system with
ease. This user-centric approach promotes accessibility and
encourages more widespread adoption of the library
management system.

Data-Driven Decision Making:The inclusion of comprehensive


reporting and analytics empowers librarians with valuable
insights into resource usage, user behaviors, and other critical
metrics. This data-driven approach enables informed decision-
making for resource allocation and policy improvements.

Security and Privacy Assurance:Robust security measures have


been implemented to safeguard sensitive user data and

33
maintain the integrity of the library's digital infrastructure.
This prioritization of security ensures user privacy and protects
against unauthorized access.

Adaptability and Scalability:The system is designed to be


adaptable to the evolving needs of libraries. Its scalable
architecture allows for seamless integration with new
technologies, accommodating the growth of collections and
ensuring the long-term relevance of the library management
system.

Streamlined Fine Management:The automated fine


management system not only enforces borrowing policies more
effectively but also provides a fair and transparent process.
Users receive timely notifications, promoting accountability
and timely return of borrowed items.

Queue Management and Reservation Transparency:The system


addresses the challenges associated with queue management
and reservation by providing transparent and automated
processes. Users can easily check the availability of items, place
holds, and receive notifications, contributing to a smoother user
experience.

In essence, the Library Management System project aspires to


usher libraries into a new era of digital efficiency, accessibility,
and security. By embracing modern technologies and user-
centric design principles, this system not only resolves existing
issues but also sets the stage for continuous improvement and
adaptation to future challenges in the dynamic landscape of
library management.

34
35

You might also like