SlideShare a Scribd company logo
PRIORITY SCHEDULING
AIM
To develop a scheduling algorithm for the processor to process on the basis of priority as
priority scheduling.
ALGORITHM
1. Start the program.
2. Read the number of processes,burst time and CPU time.
3. Initialize large=1 and small=i.
4. Initialize max=min=a[i] and index i is equal to 2 to n.
5. Calculate total time,wait time,average wait time.
6. Calculate the turn around time and the average turn around time.
7. Display the gannt chart.
8. Stop the program.
ROUND ROBIN SCHEDULING
AIM
To write a c program for performing round robin scheduling.
ALGORITHM
1. Start the program.
2. Read the no. of process,burst time and quantum time.
3. Arrange all the processes on the basis of their quantum time such that a process is
made to repeat once again till the entire process is completed.
4. All the processes are arranged in a similar manner.
5. Prepare a gannt chart and display it.
6. Calculate the total execution time,average waiting time and average turn around
time.
7. Stop the program.
BARBER SHOP PROBLEM
AIM:
To write a c program to solve the barber shop problem.
ALGORITHM:
1. get the number of customers who came to barber shop.
2. allocate the customers to the available seats when there are more number of customers
than that of available seats,then make the remaining customers stay in the waiting list.
3. the barbers has to choose to which customers he has to serve.
4. when corresponding customers is choosen the following questions are asked whether he
wants to cut the hair,shaving or trimming.the customers wish is received.
5. the amount for corresponding job is noted.
6. the next customer occupies his seat and questions are coded to the customer when
previous customer leaves the shop.
7. then again the barber chooses the customer and does the his job. Then the customer
leaves the shop after paying barber.
8. the job is completed only when the barber completed only when the barber completes his
work for all the customers
9. atlast when all the customers have gone the profit of the day is calculated.
10. get the number of customers who came to barber shop.
11. allocate the customers to the available seats when there are more number of customers
than that of available seats,then make the remaining customers stay in the waiting list.
12. the barbers has to choose to which customers he has to serve.
13. when corresponding customers is choosen the following questions are asked whether he
wants to cut the hair,shaving or trimming.the customers wish is received.
14. the amount for corresponding job is noted.
15. the next customer occupies his seat and questions are coded to the customer when
previous customer leaves the shop.
DINING PHILOSOPHER’S PROBLEM
AIM
To develop a c program for performing dining philosophers problem.
ALGORITHM
1. Start the program.
2. Get the no of philosophers.
3. Using switch case get the choice for what action to be performed.
4. Then enter which philosopher is going to eat.
5. The status of the philosophers will be displayed.
6. If the philosopher has to wait then the message the chopsticks are engaged will be
displayed.
7. Enter the choice to exit the menu.
8. Stop the program.
BANKER’S ALGORITHM
AIM:
To develop a program to solve the banker’s algorithm to overcome deadlock situation.
ALGORITHM:
1. Start.
2. Input the maximum value and available resources value.
3. For i=1 to n do
4. Check if request I is less than or equal to i. If so proceed step 5.
5. Check if request is available.
6. Compare available as available request and complete allocation as allocation request.
7. Compare need[i] as need[i],request[i].
8. Repeat step 3 until the process get their need as 0.
9. Output the allocated resource values.
10. End.
FIRST IN FIRST OUT PAGE REPLACEMENT ALGORITHM
AIM:
To develop a page replacement algorithm on the basis of first in first out.
ALGORITHM:
1. Initialize the size of the frame size three.
2. Initialize the number of pages which arrives in the queue as 12.
3. Initialize the page numbers.
4. Initially, the contents of the frame are set as -1.
5. As the frame arrives, it is initially placed in the frame.
6. Page fault is calculated when the particular page is not in the frame.
7. The first page which arrives in the frame is the one, which is to be replaced
8. Increment the page fault value.
9. Display the contents of the frame and the page fault value.
10. End the processing.
LEAST RECENTLY USED PAGE REPLACMENT ALGORITHM
AIM:
To develop a page replacement algorithm on the basis of least recently used.
ALGORITHM:
1. Initialize the size of the frame size three.
2. Initialize the number of pages which arrives in the queue as 12.
3. Initialize the page numbers.
4. Initially, the contents of the frame are set as -1.
5. As the page arrives, it is initially placed in the frame.
6. Page fault is calculated when the particular page is not in the frame.
7. The page which is not used frequently, is to be replaced.
8. Increment the page fault value.
9. Display the contents of the frame and the page fault value.
10. End the processing.

More Related Content

Similar to Operating Systems lab Programs Algorithm - Fourth Semester - Engineering

A_CH04_EXPV1_H1_Instructions.docxOffice 2013 – myitlabgra.docx
A_CH04_EXPV1_H1_Instructions.docxOffice 2013 – myitlabgra.docxA_CH04_EXPV1_H1_Instructions.docxOffice 2013 – myitlabgra.docx
A_CH04_EXPV1_H1_Instructions.docxOffice 2013 – myitlabgra.docx
ikirkton
 
Using splunk6.2 labs
Using splunk6.2 labsUsing splunk6.2 labs
Using splunk6.2 labs
Jagadish a
 
Learning Web Development with Ruby on Rails Launch
Learning Web Development with Ruby on Rails LaunchLearning Web Development with Ruby on Rails Launch
Learning Web Development with Ruby on Rails Launch
Thiam Hock Ng
 
phases of algorithm
phases of algorithmphases of algorithm
phases of algorithm
sti meycauayan
 
Assignment2 A
Assignment2 AAssignment2 A
Assignment2 A
Mahmoud
 
How to use Salesforce composite request connector in Mule
How to use Salesforce composite request connector in MuleHow to use Salesforce composite request connector in Mule
How to use Salesforce composite request connector in Mule
Alexandra N. Martinez
 
АНТОН СЕРПУТЬКО « Якісний перфоманс сценарій в Jmeter, це як?» Online QADay ...
АНТОН СЕРПУТЬКО « Якісний перфоманс сценарій в Jmeter, це як?»  Online QADay ...АНТОН СЕРПУТЬКО « Якісний перфоманс сценарій в Jmeter, це як?»  Online QADay ...
АНТОН СЕРПУТЬКО « Якісний перфоманс сценарій в Jmeter, це як?» Online QADay ...
QADay
 
Basics of Algorithm Unit 1 part 1 algorithm
Basics of Algorithm Unit 1 part 1  algorithmBasics of Algorithm Unit 1 part 1  algorithm
Basics of Algorithm Unit 1 part 1 algorithm
JIMS LAJPAT NAGAR
 
Automation anywhere Training Materials
Automation anywhere Training MaterialsAutomation anywhere Training Materials
Automation anywhere Training Materials
Shekar S
 
DAA Unit 1.pdf
DAA Unit 1.pdfDAA Unit 1.pdf
DAA Unit 1.pdf
Nirmalavenkatachalam
 
Sysanal
SysanalSysanal
Sysanal
Galo Chiu
 
Use cases - As approach to building shared vision
Use cases - As approach to building shared visionUse cases - As approach to building shared vision
Use cases - As approach to building shared vision
Abhilash Gopalakrishnan
 
osd ncc education assingment l4dc
osd ncc education assingment l4dcosd ncc education assingment l4dc
osd ncc education assingment l4dc
David Parker
 
library circulation department manual with web stuff
library circulation department manual with web stufflibrary circulation department manual with web stuff
library circulation department manual with web stuff
csufcirc
 
Extreme Interview Questions
Extreme Interview QuestionsExtreme Interview Questions
Extreme Interview Questions
Ehtisham Ali
 
Unit V.pdf
Unit V.pdfUnit V.pdf
[DevDay2018] Let’s all get along. Clean Code please! - By: Christophe K. Ngo,...
[DevDay2018] Let’s all get along. Clean Code please! - By: Christophe K. Ngo,...[DevDay2018] Let’s all get along. Clean Code please! - By: Christophe K. Ngo,...
[DevDay2018] Let’s all get along. Clean Code please! - By: Christophe K. Ngo,...
DevDay Da Nang
 
Work Based Project
Work Based ProjectWork Based Project
Work Based Project
Shimab23
 
LKCE18 Steve McGee - KMM Cultural Appraisal and Practical Guidance for Leaders
LKCE18 Steve McGee - KMM Cultural Appraisal and Practical Guidance for LeadersLKCE18 Steve McGee - KMM Cultural Appraisal and Practical Guidance for Leaders
LKCE18 Steve McGee - KMM Cultural Appraisal and Practical Guidance for Leaders
Lean Kanban Central Europe
 
What Is A Hook In Writing An Essay. Online assignment writing service.
What Is A Hook In Writing An Essay. Online assignment writing service.What Is A Hook In Writing An Essay. Online assignment writing service.
What Is A Hook In Writing An Essay. Online assignment writing service.
Nicole Savoie
 

Similar to Operating Systems lab Programs Algorithm - Fourth Semester - Engineering (20)

A_CH04_EXPV1_H1_Instructions.docxOffice 2013 – myitlabgra.docx
A_CH04_EXPV1_H1_Instructions.docxOffice 2013 – myitlabgra.docxA_CH04_EXPV1_H1_Instructions.docxOffice 2013 – myitlabgra.docx
A_CH04_EXPV1_H1_Instructions.docxOffice 2013 – myitlabgra.docx
 
Using splunk6.2 labs
Using splunk6.2 labsUsing splunk6.2 labs
Using splunk6.2 labs
 
Learning Web Development with Ruby on Rails Launch
Learning Web Development with Ruby on Rails LaunchLearning Web Development with Ruby on Rails Launch
Learning Web Development with Ruby on Rails Launch
 
phases of algorithm
phases of algorithmphases of algorithm
phases of algorithm
 
Assignment2 A
Assignment2 AAssignment2 A
Assignment2 A
 
How to use Salesforce composite request connector in Mule
How to use Salesforce composite request connector in MuleHow to use Salesforce composite request connector in Mule
How to use Salesforce composite request connector in Mule
 
АНТОН СЕРПУТЬКО « Якісний перфоманс сценарій в Jmeter, це як?» Online QADay ...
АНТОН СЕРПУТЬКО « Якісний перфоманс сценарій в Jmeter, це як?»  Online QADay ...АНТОН СЕРПУТЬКО « Якісний перфоманс сценарій в Jmeter, це як?»  Online QADay ...
АНТОН СЕРПУТЬКО « Якісний перфоманс сценарій в Jmeter, це як?» Online QADay ...
 
Basics of Algorithm Unit 1 part 1 algorithm
Basics of Algorithm Unit 1 part 1  algorithmBasics of Algorithm Unit 1 part 1  algorithm
Basics of Algorithm Unit 1 part 1 algorithm
 
Automation anywhere Training Materials
Automation anywhere Training MaterialsAutomation anywhere Training Materials
Automation anywhere Training Materials
 
DAA Unit 1.pdf
DAA Unit 1.pdfDAA Unit 1.pdf
DAA Unit 1.pdf
 
Sysanal
SysanalSysanal
Sysanal
 
Use cases - As approach to building shared vision
Use cases - As approach to building shared visionUse cases - As approach to building shared vision
Use cases - As approach to building shared vision
 
osd ncc education assingment l4dc
osd ncc education assingment l4dcosd ncc education assingment l4dc
osd ncc education assingment l4dc
 
library circulation department manual with web stuff
library circulation department manual with web stufflibrary circulation department manual with web stuff
library circulation department manual with web stuff
 
Extreme Interview Questions
Extreme Interview QuestionsExtreme Interview Questions
Extreme Interview Questions
 
Unit V.pdf
Unit V.pdfUnit V.pdf
Unit V.pdf
 
[DevDay2018] Let’s all get along. Clean Code please! - By: Christophe K. Ngo,...
[DevDay2018] Let’s all get along. Clean Code please! - By: Christophe K. Ngo,...[DevDay2018] Let’s all get along. Clean Code please! - By: Christophe K. Ngo,...
[DevDay2018] Let’s all get along. Clean Code please! - By: Christophe K. Ngo,...
 
Work Based Project
Work Based ProjectWork Based Project
Work Based Project
 
LKCE18 Steve McGee - KMM Cultural Appraisal and Practical Guidance for Leaders
LKCE18 Steve McGee - KMM Cultural Appraisal and Practical Guidance for LeadersLKCE18 Steve McGee - KMM Cultural Appraisal and Practical Guidance for Leaders
LKCE18 Steve McGee - KMM Cultural Appraisal and Practical Guidance for Leaders
 
What Is A Hook In Writing An Essay. Online assignment writing service.
What Is A Hook In Writing An Essay. Online assignment writing service.What Is A Hook In Writing An Essay. Online assignment writing service.
What Is A Hook In Writing An Essay. Online assignment writing service.
 

More from Yogesh Santhan

Career Enhancement Trainings
Career Enhancement TrainingsCareer Enhancement Trainings
Career Enhancement Trainings
Yogesh Santhan
 
Tamil Resume Template
Tamil Resume TemplateTamil Resume Template
Tamil Resume Template
Yogesh Santhan
 
HUMAR RESOURCES HR RECRUITER RESUME TEMPLATE
HUMAR RESOURCES HR RECRUITER RESUME TEMPLATEHUMAR RESOURCES HR RECRUITER RESUME TEMPLATE
HUMAR RESOURCES HR RECRUITER RESUME TEMPLATE
Yogesh Santhan
 
Desire - An Angler
Desire - An AnglerDesire - An Angler
Desire - An Angler
Yogesh Santhan
 
Operating Systems Third Unit - Fourth Semester - Engineering
Operating Systems Third Unit  - Fourth Semester - EngineeringOperating Systems Third Unit  - Fourth Semester - Engineering
Operating Systems Third Unit - Fourth Semester - Engineering
Yogesh Santhan
 
Operating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - EngineeringOperating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - Engineering
Yogesh Santhan
 
Operating Systems Unit One - Fourth Semester - Engineering
Operating Systems Unit One - Fourth Semester - EngineeringOperating Systems Unit One - Fourth Semester - Engineering
Operating Systems Unit One - Fourth Semester - Engineering
Yogesh Santhan
 
Operating Systems lab Programs - Fourth Semester - Engineering
Operating Systems lab Programs - Fourth Semester - EngineeringOperating Systems lab Programs - Fourth Semester - Engineering
Operating Systems lab Programs - Fourth Semester - Engineering
Yogesh Santhan
 
A STUDY ON CUSTOMER’S SATISFACTION MARKS CARGO PRIVATE LIMITED - 2
A STUDY ON CUSTOMER’S SATISFACTION MARKS CARGO PRIVATE LIMITED -  2A STUDY ON CUSTOMER’S SATISFACTION MARKS CARGO PRIVATE LIMITED -  2
A STUDY ON CUSTOMER’S SATISFACTION MARKS CARGO PRIVATE LIMITED - 2
Yogesh Santhan
 
INTERNSHIP ON EXPORT-IMPORT PROCEDURES AT MARKS CARGO PRIVATE LIMITED, PUDUCH...
INTERNSHIP ON EXPORT-IMPORT PROCEDURES AT MARKS CARGO PRIVATE LIMITED, PUDUCH...INTERNSHIP ON EXPORT-IMPORT PROCEDURES AT MARKS CARGO PRIVATE LIMITED, PUDUCH...
INTERNSHIP ON EXPORT-IMPORT PROCEDURES AT MARKS CARGO PRIVATE LIMITED, PUDUCH...
Yogesh Santhan
 
INTERNSHIP ON EXPORT-IMPORT PROCEDURES AT MARKS CARGO PRIVATE LIMITED, PUDUCH...
INTERNSHIP ON EXPORT-IMPORT PROCEDURES AT MARKS CARGO PRIVATE LIMITED, PUDUCH...INTERNSHIP ON EXPORT-IMPORT PROCEDURES AT MARKS CARGO PRIVATE LIMITED, PUDUCH...
INTERNSHIP ON EXPORT-IMPORT PROCEDURES AT MARKS CARGO PRIVATE LIMITED, PUDUCH...
Yogesh Santhan
 
Template transfer or change of ownership – no objection letter - mobile number
Template   transfer or change of ownership – no objection letter - mobile numberTemplate   transfer or change of ownership – no objection letter - mobile number
Template transfer or change of ownership – no objection letter - mobile number
Yogesh Santhan
 
Project - UG - BTech IT - Cluster based Approach for Service Discovery using ...
Project - UG - BTech IT - Cluster based Approach for Service Discovery using ...Project - UG - BTech IT - Cluster based Approach for Service Discovery using ...
Project - UG - BTech IT - Cluster based Approach for Service Discovery using ...
Yogesh Santhan
 
Research Questionnaire - Employee Referral Program
Research Questionnaire - Employee Referral ProgramResearch Questionnaire - Employee Referral Program
Research Questionnaire - Employee Referral Program
Yogesh Santhan
 
Cluster based approach for Service Discovery using Pattern Recognition
Cluster based approach for Service Discovery using Pattern RecognitionCluster based approach for Service Discovery using Pattern Recognition
Cluster based approach for Service Discovery using Pattern Recognition
Yogesh Santhan
 

More from Yogesh Santhan (15)

Career Enhancement Trainings
Career Enhancement TrainingsCareer Enhancement Trainings
Career Enhancement Trainings
 
Tamil Resume Template
Tamil Resume TemplateTamil Resume Template
Tamil Resume Template
 
HUMAR RESOURCES HR RECRUITER RESUME TEMPLATE
HUMAR RESOURCES HR RECRUITER RESUME TEMPLATEHUMAR RESOURCES HR RECRUITER RESUME TEMPLATE
HUMAR RESOURCES HR RECRUITER RESUME TEMPLATE
 
Desire - An Angler
Desire - An AnglerDesire - An Angler
Desire - An Angler
 
Operating Systems Third Unit - Fourth Semester - Engineering
Operating Systems Third Unit  - Fourth Semester - EngineeringOperating Systems Third Unit  - Fourth Semester - Engineering
Operating Systems Third Unit - Fourth Semester - Engineering
 
Operating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - EngineeringOperating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - Engineering
 
Operating Systems Unit One - Fourth Semester - Engineering
Operating Systems Unit One - Fourth Semester - EngineeringOperating Systems Unit One - Fourth Semester - Engineering
Operating Systems Unit One - Fourth Semester - Engineering
 
Operating Systems lab Programs - Fourth Semester - Engineering
Operating Systems lab Programs - Fourth Semester - EngineeringOperating Systems lab Programs - Fourth Semester - Engineering
Operating Systems lab Programs - Fourth Semester - Engineering
 
A STUDY ON CUSTOMER’S SATISFACTION MARKS CARGO PRIVATE LIMITED - 2
A STUDY ON CUSTOMER’S SATISFACTION MARKS CARGO PRIVATE LIMITED -  2A STUDY ON CUSTOMER’S SATISFACTION MARKS CARGO PRIVATE LIMITED -  2
A STUDY ON CUSTOMER’S SATISFACTION MARKS CARGO PRIVATE LIMITED - 2
 
INTERNSHIP ON EXPORT-IMPORT PROCEDURES AT MARKS CARGO PRIVATE LIMITED, PUDUCH...
INTERNSHIP ON EXPORT-IMPORT PROCEDURES AT MARKS CARGO PRIVATE LIMITED, PUDUCH...INTERNSHIP ON EXPORT-IMPORT PROCEDURES AT MARKS CARGO PRIVATE LIMITED, PUDUCH...
INTERNSHIP ON EXPORT-IMPORT PROCEDURES AT MARKS CARGO PRIVATE LIMITED, PUDUCH...
 
INTERNSHIP ON EXPORT-IMPORT PROCEDURES AT MARKS CARGO PRIVATE LIMITED, PUDUCH...
INTERNSHIP ON EXPORT-IMPORT PROCEDURES AT MARKS CARGO PRIVATE LIMITED, PUDUCH...INTERNSHIP ON EXPORT-IMPORT PROCEDURES AT MARKS CARGO PRIVATE LIMITED, PUDUCH...
INTERNSHIP ON EXPORT-IMPORT PROCEDURES AT MARKS CARGO PRIVATE LIMITED, PUDUCH...
 
Template transfer or change of ownership – no objection letter - mobile number
Template   transfer or change of ownership – no objection letter - mobile numberTemplate   transfer or change of ownership – no objection letter - mobile number
Template transfer or change of ownership – no objection letter - mobile number
 
Project - UG - BTech IT - Cluster based Approach for Service Discovery using ...
Project - UG - BTech IT - Cluster based Approach for Service Discovery using ...Project - UG - BTech IT - Cluster based Approach for Service Discovery using ...
Project - UG - BTech IT - Cluster based Approach for Service Discovery using ...
 
Research Questionnaire - Employee Referral Program
Research Questionnaire - Employee Referral ProgramResearch Questionnaire - Employee Referral Program
Research Questionnaire - Employee Referral Program
 
Cluster based approach for Service Discovery using Pattern Recognition
Cluster based approach for Service Discovery using Pattern RecognitionCluster based approach for Service Discovery using Pattern Recognition
Cluster based approach for Service Discovery using Pattern Recognition
 

Recently uploaded

A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 

Recently uploaded (20)

A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 

Operating Systems lab Programs Algorithm - Fourth Semester - Engineering

  • 1. PRIORITY SCHEDULING AIM To develop a scheduling algorithm for the processor to process on the basis of priority as priority scheduling. ALGORITHM 1. Start the program. 2. Read the number of processes,burst time and CPU time. 3. Initialize large=1 and small=i. 4. Initialize max=min=a[i] and index i is equal to 2 to n. 5. Calculate total time,wait time,average wait time. 6. Calculate the turn around time and the average turn around time. 7. Display the gannt chart. 8. Stop the program. ROUND ROBIN SCHEDULING AIM To write a c program for performing round robin scheduling. ALGORITHM 1. Start the program. 2. Read the no. of process,burst time and quantum time. 3. Arrange all the processes on the basis of their quantum time such that a process is made to repeat once again till the entire process is completed. 4. All the processes are arranged in a similar manner. 5. Prepare a gannt chart and display it. 6. Calculate the total execution time,average waiting time and average turn around time. 7. Stop the program.
  • 2. BARBER SHOP PROBLEM AIM: To write a c program to solve the barber shop problem. ALGORITHM: 1. get the number of customers who came to barber shop. 2. allocate the customers to the available seats when there are more number of customers than that of available seats,then make the remaining customers stay in the waiting list. 3. the barbers has to choose to which customers he has to serve. 4. when corresponding customers is choosen the following questions are asked whether he wants to cut the hair,shaving or trimming.the customers wish is received. 5. the amount for corresponding job is noted. 6. the next customer occupies his seat and questions are coded to the customer when previous customer leaves the shop. 7. then again the barber chooses the customer and does the his job. Then the customer leaves the shop after paying barber. 8. the job is completed only when the barber completed only when the barber completes his work for all the customers 9. atlast when all the customers have gone the profit of the day is calculated. 10. get the number of customers who came to barber shop. 11. allocate the customers to the available seats when there are more number of customers than that of available seats,then make the remaining customers stay in the waiting list. 12. the barbers has to choose to which customers he has to serve. 13. when corresponding customers is choosen the following questions are asked whether he wants to cut the hair,shaving or trimming.the customers wish is received. 14. the amount for corresponding job is noted. 15. the next customer occupies his seat and questions are coded to the customer when previous customer leaves the shop.
  • 3. DINING PHILOSOPHER’S PROBLEM AIM To develop a c program for performing dining philosophers problem. ALGORITHM 1. Start the program. 2. Get the no of philosophers. 3. Using switch case get the choice for what action to be performed. 4. Then enter which philosopher is going to eat. 5. The status of the philosophers will be displayed. 6. If the philosopher has to wait then the message the chopsticks are engaged will be displayed. 7. Enter the choice to exit the menu. 8. Stop the program. BANKER’S ALGORITHM AIM: To develop a program to solve the banker’s algorithm to overcome deadlock situation. ALGORITHM: 1. Start. 2. Input the maximum value and available resources value. 3. For i=1 to n do 4. Check if request I is less than or equal to i. If so proceed step 5. 5. Check if request is available. 6. Compare available as available request and complete allocation as allocation request. 7. Compare need[i] as need[i],request[i]. 8. Repeat step 3 until the process get their need as 0. 9. Output the allocated resource values. 10. End. FIRST IN FIRST OUT PAGE REPLACEMENT ALGORITHM AIM: To develop a page replacement algorithm on the basis of first in first out. ALGORITHM: 1. Initialize the size of the frame size three.
  • 4. 2. Initialize the number of pages which arrives in the queue as 12. 3. Initialize the page numbers. 4. Initially, the contents of the frame are set as -1. 5. As the frame arrives, it is initially placed in the frame. 6. Page fault is calculated when the particular page is not in the frame. 7. The first page which arrives in the frame is the one, which is to be replaced 8. Increment the page fault value. 9. Display the contents of the frame and the page fault value. 10. End the processing. LEAST RECENTLY USED PAGE REPLACMENT ALGORITHM AIM: To develop a page replacement algorithm on the basis of least recently used. ALGORITHM: 1. Initialize the size of the frame size three. 2. Initialize the number of pages which arrives in the queue as 12. 3. Initialize the page numbers. 4. Initially, the contents of the frame are set as -1. 5. As the page arrives, it is initially placed in the frame. 6. Page fault is calculated when the particular page is not in the frame. 7. The page which is not used frequently, is to be replaced. 8. Increment the page fault value. 9. Display the contents of the frame and the page fault value. 10. End the processing.