SlideShare a Scribd company logo
1 of 4
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

Algorithm week2(technovation)
Algorithm week2(technovation)Algorithm week2(technovation)
Algorithm week2(technovation)than sare
 
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.docxikirkton
 
Using splunk6.2 labs
Using splunk6.2 labsUsing splunk6.2 labs
Using splunk6.2 labsJagadish 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 LaunchThiam Hock Ng
 
Assignment2 A
Assignment2 AAssignment2 A
Assignment2 AMahmoud
 
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 MuleAlexandra N. Martinez
 
АНТОН СЕРПУТЬКО « Якісний перфоманс сценарій в Jmeter, це як?» Online QADay ...
АНТОН СЕРПУТЬКО « Якісний перфоманс сценарій в Jmeter, це як?»  Online QADay ...АНТОН СЕРПУТЬКО « Якісний перфоманс сценарій в Jmeter, це як?»  Online QADay ...
АНТОН СЕРПУТЬКО « Якісний перфоманс сценарій в Jmeter, це як?» Online QADay ...GoQA
 
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 algorithmJIMS LAJPAT NAGAR
 
Automation anywhere Training Materials
Automation anywhere Training MaterialsAutomation anywhere Training Materials
Automation anywhere Training MaterialsShekar S
 
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 visionAbhilash Gopalakrishnan
 
osd ncc education assingment l4dc
osd ncc education assingment l4dcosd ncc education assingment l4dc
osd ncc education assingment l4dcDavid 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 stuffcsufcirc
 
Extreme Interview Questions
Extreme Interview QuestionsExtreme Interview Questions
Extreme Interview QuestionsEhtisham Ali
 
[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.org
 
Work Based Project
Work Based ProjectWork Based Project
Work Based ProjectShimab23
 
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 LeadersLean Kanban Central Europe
 

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

Algorithm week2(technovation)
Algorithm week2(technovation)Algorithm week2(technovation)
Algorithm week2(technovation)
 
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
 

More from Yogesh Santhan

Career Enhancement Trainings
Career Enhancement TrainingsCareer Enhancement Trainings
Career Enhancement TrainingsYogesh Santhan
 
HUMAR RESOURCES HR RECRUITER RESUME TEMPLATE
HUMAR RESOURCES HR RECRUITER RESUME TEMPLATEHUMAR RESOURCES HR RECRUITER RESUME TEMPLATE
HUMAR RESOURCES HR RECRUITER RESUME TEMPLATEYogesh 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 - EngineeringYogesh 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 - EngineeringYogesh 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 - EngineeringYogesh 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 - EngineeringYogesh 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 - 2Yogesh 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 numberYogesh 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 ProgramYogesh 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 RecognitionYogesh 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

Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint23600690
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
How to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 InventoryHow to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 InventoryCeline George
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45MysoreMuleSoftMeetup
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhleson0603
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17Celine George
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 
Poster_density_driven_with_fracture_MLMC.pdf
Poster_density_driven_with_fracture_MLMC.pdfPoster_density_driven_with_fracture_MLMC.pdf
Poster_density_driven_with_fracture_MLMC.pdfAlexander Litvinenko
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptxPoojaSen20
 
Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024CapitolTechU
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppCeline George
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...Nguyen Thanh Tu Collection
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 

Recently uploaded (20)

Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
How to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 InventoryHow to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 Inventory
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
Poster_density_driven_with_fracture_MLMC.pdf
Poster_density_driven_with_fracture_MLMC.pdfPoster_density_driven_with_fracture_MLMC.pdf
Poster_density_driven_with_fracture_MLMC.pdf
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 

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.