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
 
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
 
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
 
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
 
9th Comp Ch 1 LQ.pdf
9th Comp Ch 1 LQ.pdf9th Comp Ch 1 LQ.pdf
9th Comp Ch 1 LQ.pdfNaeem Mughal
 

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
 
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
 
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.
 
9th Comp Ch 1 LQ.pdf
9th Comp Ch 1 LQ.pdf9th Comp Ch 1 LQ.pdf
9th Comp Ch 1 LQ.pdf
 

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

Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 

Recently uploaded (20)

Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 

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.