SlideShare une entreprise Scribd logo
1  sur  9
You must create a data file for the project. You can use format
(shown below) for the data file.
You must have large number of process in your file at least
1000 processes.
You can assume to have your process
1. Expected execution time is distributed between 16ut and
512ut
2. IO time is distributed between 5ut to 50ut
3. Memory sizes are uniformly distributed between 16KB and
16384KB
************ Sample Data File **********************
PN:ZEU,CPU:21,MEM:22,IO:15,CPU:28,MEM:9,IO:25,CPU:15
,MEM:-7,IO:59,CPU:24,MEM:7,
CPU:-1
PN:VSM,CPU:43,MEM:12,IO:62,CPU:37,MEM:8,IO:77,CPU:1
4,MEM:7,IO:91,CPU:28,MEM:8,C
PU:-1
PN:VBU,CPU:31,MEM:21,IO:14,CPU:34,MEM:-
5,IO:74,CPU:41,MEM:-1,IO:65,CPU:23,MEM:-5
,CPU:-1
PN:TLA,CPU:16,MEM:19,IO:40,CPU:45,MEM:-
3,IO:70,CPU:43,MEM:7,IO:6,CPU:16,MEM:-3,C
PU:-1
PN:SYC,CPU:31,MEM:23,IO:81,CPU:10,MEM:-
8,IO:52,CPU:17,MEM:-2,IO:95,CPU:22,MEM:2,
CPU:-1
PN:SFY,CPU:27,MEM:12,IO:21,CPU:33,MEM:-
5,IO:83,CPU:14,MEM:-8,IO:40,CPU:16,MEM:8,
CPU:-1
…
...
…
…
...
…
King Saud University
Computer Science Department
CSC227: Operating Systems
Course Project
Instructions:
-April-2019
and explains the
implementation.
Topic Multiprogramming OS Simulation Batch processing and
Memory Allocation
Introduction
It is required in this project, to write a program in Java that
simulates the behavior of the
multiprogramming operating system. At the end of the
simulation, you are expected to
output some statistics regarding the behavior of the system and
submit a report. In the
following sections, we will introduce the hardware
specification, the multiprogramming
OS features and the jobs requirements.
Available computer system for the simulation has:
Hardware:
The computer hardware is assumed to have:
1. A RAM of size 256MB, where 16MB is used to store the OS.
2. A single core CPU that executes one instruction each unit of
time.
3. An I/O device for input and output operations.
4. An internal clock that allows to measure time in
milliseconds.
Operating System:
The operating system is the multiprogramming OS. We would
be interested in only two
features in this simulation: The Job and CPU scheduling.
1. Job Scheduling: The system implements multiprogramming
batch processing.
2. A long term scheduler selects jobs in sequence and allocates
them the needed
memory until the 80% of the memory is full. A job is loaded
only if there is enough
memory to satisfy its first memory requirement.
3. Each required memory block should be contiguous but a
process may have more than
one block of memory in different locations of the memory
4. The short term scheduler will allocate processes to the CPU
following a multi-level
feedback queue scheduling.
5. A process will have several CPU-burst / IO burst sequences
at described in the
example below. In each CPU burst a process may require
additional memory or
decide to free part of its memory.
6. If a process requires additional memory and there is not
enough memory to satisfy its
request, it should be put in Waiting state until there is enough
memory for it.
7. If all processes are in Waiting state, only if all waiting for
memory allocation, this is a
deadlock. The system should declare a deadlock and select the
largest waiting process
to be killed in order to get some free memory for the other
processes.
8. At any moment the processes will have one of the states,
READY, WAITING,
RUNNING, TERMINATED, KILLED.
9. When the job queue is empty and all processes are killed or
terminated, the system
should write a file containing statistics about all processes and
their final status
TERMINATED or KILLED.
10. Every 100 milliseconds, the long term scheduler will wake-
up, check the memory and
load more jobs until the 80% of the memory is full.
Instructions:
1. You MUST use multithreading where the long-term (Job)
scheduler runs in one
thread while the short-term (CPU) scheduler runs in another
thread.
2. Design the multi-level feedback queue however you see fit.
Your design and
implementation should include:
a. Number of queues.
b. Scheduling algorithms for each queue.
c. Method used to determine when to upgrade a process.
d. Method used to determine when to demote a process.
Program specifications:
Each job in the jobs queue is defined as a sequence of several
CPU-burst / IO burst as
follows:
Job description Explanation
Name
15 11
3
5 4
6
3 -6
1
3 0
-1
Process name
CPU-burst of 15ms – Memory required 11 MB
I/O burst of 3ms
CPU-burst of 5ms – Additional memory required 4 MB
I/O burst of 6ms
CPU-burst of 3ms – Free 6 MB of the allocated memory
I/O burst of 1ms
CPU-burst of 3ms – No change in memory
Job terminates after the last CPU-burst
Initialization phase:
You should perform the following steps before running the
simulation:
1. Load all jobs in the jobs file into a jobs queue in memory
2. Start the system clock (in milliseconds)
3. Start the long term scheduler that check the first job in the
job queue, check if there is
enough memory for it and then:
a. create a process for that job,
b. allocate its memory
c. put it in the Ready queue,
d. remove it from the jobs queue
4. Load the RAM with the maximum number of user programs,
then go to sleep for
200ms.
5. Start the simulation run which consists of a simulation of the
Machine Execution
Cycle. At each millisecond, the scheduler will check if a job
CPU-burst has ended
and if the I/O burst of a process has ended. It should also check
if any waiting process
can be reactivated and put in the ready queue.
Output from the simulation:
A text file containing statistics about all processes and their
final status TERMINATED
or KILLED. Statistics about a process should contain:
a. Process ID
b. Program name
c. When it was loaded into the ready queue.
d. Number of times it was in the CPU.
e. Total time spent in the CPU
f. Number of times it performed an IO.
g. Total time spent in performing IO
h. Number of times it was waiting for memory.
i. Time it terminated or was killed
j. Its final state: Killed or Terminated
k. CPU Utilization
l. Waiting time.
m. Turnaround time.
You also should provide average waiting time and the average
turnaround time for
Report:
A report is expected to discuss your design of the multi-level
feedback queue scheduling,
justification of your design, and expectations in terms of
performance, and analysis of the
results obtained. Visualize the waiting time and the turnaround
time of the processes
using plots.
Bonus:
Build a graphical interface representing the multi-level
feedback queue, CPU and the
memory and showing dynamically how memory is allocated or
released by processes. In
addition, it has to show the processes waiting in the multi-level
feedback queue. This
interface should show the time and the process under execution
at any moment.

Contenu connexe

Similaire à You must create a data file for the project. You can use forma.docx

Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docx
Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docxSheet1Address60741024Offsetaddress0102450506074120484026230723002p.docx
Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docxbagotjesusa
 
1.CPU INSTRUCTION AND EXECUTION CYCLEThe primary function of the .pdf
1.CPU INSTRUCTION AND EXECUTION CYCLEThe primary function of the .pdf1.CPU INSTRUCTION AND EXECUTION CYCLEThe primary function of the .pdf
1.CPU INSTRUCTION AND EXECUTION CYCLEThe primary function of the .pdfaniyathikitchen
 
Cpu scheduling final
Cpu scheduling finalCpu scheduling final
Cpu scheduling finalmarangburu42
 
CHAPTER READING TASK OPERATING SYSTEM
CHAPTER READING TASK OPERATING SYSTEMCHAPTER READING TASK OPERATING SYSTEM
CHAPTER READING TASK OPERATING SYSTEMNur Atiqah Mohd Rosli
 
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERSVTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERSvtunotesbysree
 
Unix operating system basics
Unix operating system basicsUnix operating system basics
Unix operating system basicsSankar Suriya
 
Cpu scheduling pre final formatting
Cpu scheduling pre final formattingCpu scheduling pre final formatting
Cpu scheduling pre final formattingmarangburu42
 
operating system question bank
operating system question bankoperating system question bank
operating system question bankrajatdeep kaur
 

Similaire à You must create a data file for the project. You can use forma.docx (20)

Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docx
Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docxSheet1Address60741024Offsetaddress0102450506074120484026230723002p.docx
Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docx
 
1.CPU INSTRUCTION AND EXECUTION CYCLEThe primary function of the .pdf
1.CPU INSTRUCTION AND EXECUTION CYCLEThe primary function of the .pdf1.CPU INSTRUCTION AND EXECUTION CYCLEThe primary function of the .pdf
1.CPU INSTRUCTION AND EXECUTION CYCLEThe primary function of the .pdf
 
Operating System
Operating SystemOperating System
Operating System
 
Cpu scheduling final
Cpu scheduling finalCpu scheduling final
Cpu scheduling final
 
Os task
Os taskOs task
Os task
 
CHAPTER READING TASK OPERATING SYSTEM
CHAPTER READING TASK OPERATING SYSTEMCHAPTER READING TASK OPERATING SYSTEM
CHAPTER READING TASK OPERATING SYSTEM
 
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERSVTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
 
UNIT II - CPU SCHEDULING.docx
UNIT II - CPU SCHEDULING.docxUNIT II - CPU SCHEDULING.docx
UNIT II - CPU SCHEDULING.docx
 
Unit 2 notes
Unit 2 notesUnit 2 notes
Unit 2 notes
 
Process Management
Process ManagementProcess Management
Process Management
 
Co notes3 sem
Co notes3 semCo notes3 sem
Co notes3 sem
 
Completeosnotes
CompleteosnotesCompleteosnotes
Completeosnotes
 
UNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdfUNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdf
 
Unix operating system basics
Unix operating system basicsUnix operating system basics
Unix operating system basics
 
Lec 3
Lec 3 Lec 3
Lec 3
 
Cpu scheduling pre final formatting
Cpu scheduling pre final formattingCpu scheduling pre final formatting
Cpu scheduling pre final formatting
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
Complete Operating System notes
Complete Operating System notesComplete Operating System notes
Complete Operating System notes
 
Process
ProcessProcess
Process
 
operating system question bank
operating system question bankoperating system question bank
operating system question bank
 

Plus de davezstarr61655

you must read two articles which are from the field of Human Resou.docx
you must read two articles which are from the field of Human Resou.docxyou must read two articles which are from the field of Human Resou.docx
you must read two articles which are from the field of Human Resou.docxdavezstarr61655
 
You must produce a minimum of a 5 pages paper. You must use a minimu.docx
You must produce a minimum of a 5 pages paper. You must use a minimu.docxYou must produce a minimum of a 5 pages paper. You must use a minimu.docx
You must produce a minimum of a 5 pages paper. You must use a minimu.docxdavezstarr61655
 
You must provide a references for entire posting. Please use APA for.docx
You must provide a references for entire posting. Please use APA for.docxYou must provide a references for entire posting. Please use APA for.docx
You must provide a references for entire posting. Please use APA for.docxdavezstarr61655
 
you must present your findings to the IT supervisor before the s.docx
you must present your findings to the IT supervisor before the s.docxyou must present your findings to the IT supervisor before the s.docx
you must present your findings to the IT supervisor before the s.docxdavezstarr61655
 
You must produce a minimum of a 10 pages paper. You must use a m.docx
You must produce a minimum of a 10 pages paper. You must use a m.docxYou must produce a minimum of a 10 pages paper. You must use a m.docx
You must produce a minimum of a 10 pages paper. You must use a m.docxdavezstarr61655
 
You must produce a minimum of a 10 pages paper. You must use a minim.docx
You must produce a minimum of a 10 pages paper. You must use a minim.docxYou must produce a minimum of a 10 pages paper. You must use a minim.docx
You must produce a minimum of a 10 pages paper. You must use a minim.docxdavezstarr61655
 
You must include the resources you used if any.. THese papers are op.docx
You must include the resources you used if any.. THese papers are op.docxYou must include the resources you used if any.. THese papers are op.docx
You must include the resources you used if any.. THese papers are op.docxdavezstarr61655
 
You must include the Textbook definition and a picture f.docx
You must include the Textbook definition and a picture f.docxYou must include the Textbook definition and a picture f.docx
You must include the Textbook definition and a picture f.docxdavezstarr61655
 
You must include 6 references, two that must come peer-reviewed .docx
You must include 6 references, two that must come peer-reviewed .docxYou must include 6 references, two that must come peer-reviewed .docx
You must include 6 references, two that must come peer-reviewed .docxdavezstarr61655
 
You must have the Project Libre to create this! Develop a chart .docx
You must have the Project Libre to create this! Develop a chart .docxYou must have the Project Libre to create this! Develop a chart .docx
You must have the Project Libre to create this! Develop a chart .docxdavezstarr61655
 
You must have experience doing PhD proposal , so the topic of th.docx
You must have experience doing PhD proposal , so the topic of th.docxYou must have experience doing PhD proposal , so the topic of th.docx
You must have experience doing PhD proposal , so the topic of th.docxdavezstarr61655
 
You must have at least 3 sources. Sources should be cited within you.docx
You must have at least 3 sources. Sources should be cited within you.docxYou must have at least 3 sources. Sources should be cited within you.docx
You must have at least 3 sources. Sources should be cited within you.docxdavezstarr61655
 
You must have access to the book needed for the Case Study part. I w.docx
You must have access to the book needed for the Case Study part. I w.docxYou must have access to the book needed for the Case Study part. I w.docx
You must have access to the book needed for the Case Study part. I w.docxdavezstarr61655
 
You must give the Source(s) of your answers (textbook - WITH SPECIFI.docx
You must give the Source(s) of your answers (textbook - WITH SPECIFI.docxYou must give the Source(s) of your answers (textbook - WITH SPECIFI.docx
You must give the Source(s) of your answers (textbook - WITH SPECIFI.docxdavezstarr61655
 
You must create a court system for the newly created state of Puerto.docx
You must create a court system for the newly created state of Puerto.docxYou must create a court system for the newly created state of Puerto.docx
You must create a court system for the newly created state of Puerto.docxdavezstarr61655
 
You must conduct an informational interview as part of this course. .docx
You must conduct an informational interview as part of this course. .docxYou must conduct an informational interview as part of this course. .docx
You must conduct an informational interview as part of this course. .docxdavezstarr61655
 
You must complete an Electronic Presentation on Black Culture.docx
You must complete an Electronic Presentation on Black Culture.docxYou must complete an Electronic Presentation on Black Culture.docx
You must complete an Electronic Presentation on Black Culture.docxdavezstarr61655
 
You must complete an Electronic Presentation on Black Cu.docx
You must complete an Electronic Presentation on Black Cu.docxYou must complete an Electronic Presentation on Black Cu.docx
You must complete an Electronic Presentation on Black Cu.docxdavezstarr61655
 
You must choose from the approved list below1. Angels .docx
You must choose from the approved list below1. Angels .docxYou must choose from the approved list below1. Angels .docx
You must choose from the approved list below1. Angels .docxdavezstarr61655
 
You must be proficient in all MS office. I am looking for someon.docx
You must be proficient in all MS office. I am looking for someon.docxYou must be proficient in all MS office. I am looking for someon.docx
You must be proficient in all MS office. I am looking for someon.docxdavezstarr61655
 

Plus de davezstarr61655 (20)

you must read two articles which are from the field of Human Resou.docx
you must read two articles which are from the field of Human Resou.docxyou must read two articles which are from the field of Human Resou.docx
you must read two articles which are from the field of Human Resou.docx
 
You must produce a minimum of a 5 pages paper. You must use a minimu.docx
You must produce a minimum of a 5 pages paper. You must use a minimu.docxYou must produce a minimum of a 5 pages paper. You must use a minimu.docx
You must produce a minimum of a 5 pages paper. You must use a minimu.docx
 
You must provide a references for entire posting. Please use APA for.docx
You must provide a references for entire posting. Please use APA for.docxYou must provide a references for entire posting. Please use APA for.docx
You must provide a references for entire posting. Please use APA for.docx
 
you must present your findings to the IT supervisor before the s.docx
you must present your findings to the IT supervisor before the s.docxyou must present your findings to the IT supervisor before the s.docx
you must present your findings to the IT supervisor before the s.docx
 
You must produce a minimum of a 10 pages paper. You must use a m.docx
You must produce a minimum of a 10 pages paper. You must use a m.docxYou must produce a minimum of a 10 pages paper. You must use a m.docx
You must produce a minimum of a 10 pages paper. You must use a m.docx
 
You must produce a minimum of a 10 pages paper. You must use a minim.docx
You must produce a minimum of a 10 pages paper. You must use a minim.docxYou must produce a minimum of a 10 pages paper. You must use a minim.docx
You must produce a minimum of a 10 pages paper. You must use a minim.docx
 
You must include the resources you used if any.. THese papers are op.docx
You must include the resources you used if any.. THese papers are op.docxYou must include the resources you used if any.. THese papers are op.docx
You must include the resources you used if any.. THese papers are op.docx
 
You must include the Textbook definition and a picture f.docx
You must include the Textbook definition and a picture f.docxYou must include the Textbook definition and a picture f.docx
You must include the Textbook definition and a picture f.docx
 
You must include 6 references, two that must come peer-reviewed .docx
You must include 6 references, two that must come peer-reviewed .docxYou must include 6 references, two that must come peer-reviewed .docx
You must include 6 references, two that must come peer-reviewed .docx
 
You must have the Project Libre to create this! Develop a chart .docx
You must have the Project Libre to create this! Develop a chart .docxYou must have the Project Libre to create this! Develop a chart .docx
You must have the Project Libre to create this! Develop a chart .docx
 
You must have experience doing PhD proposal , so the topic of th.docx
You must have experience doing PhD proposal , so the topic of th.docxYou must have experience doing PhD proposal , so the topic of th.docx
You must have experience doing PhD proposal , so the topic of th.docx
 
You must have at least 3 sources. Sources should be cited within you.docx
You must have at least 3 sources. Sources should be cited within you.docxYou must have at least 3 sources. Sources should be cited within you.docx
You must have at least 3 sources. Sources should be cited within you.docx
 
You must have access to the book needed for the Case Study part. I w.docx
You must have access to the book needed for the Case Study part. I w.docxYou must have access to the book needed for the Case Study part. I w.docx
You must have access to the book needed for the Case Study part. I w.docx
 
You must give the Source(s) of your answers (textbook - WITH SPECIFI.docx
You must give the Source(s) of your answers (textbook - WITH SPECIFI.docxYou must give the Source(s) of your answers (textbook - WITH SPECIFI.docx
You must give the Source(s) of your answers (textbook - WITH SPECIFI.docx
 
You must create a court system for the newly created state of Puerto.docx
You must create a court system for the newly created state of Puerto.docxYou must create a court system for the newly created state of Puerto.docx
You must create a court system for the newly created state of Puerto.docx
 
You must conduct an informational interview as part of this course. .docx
You must conduct an informational interview as part of this course. .docxYou must conduct an informational interview as part of this course. .docx
You must conduct an informational interview as part of this course. .docx
 
You must complete an Electronic Presentation on Black Culture.docx
You must complete an Electronic Presentation on Black Culture.docxYou must complete an Electronic Presentation on Black Culture.docx
You must complete an Electronic Presentation on Black Culture.docx
 
You must complete an Electronic Presentation on Black Cu.docx
You must complete an Electronic Presentation on Black Cu.docxYou must complete an Electronic Presentation on Black Cu.docx
You must complete an Electronic Presentation on Black Cu.docx
 
You must choose from the approved list below1. Angels .docx
You must choose from the approved list below1. Angels .docxYou must choose from the approved list below1. Angels .docx
You must choose from the approved list below1. Angels .docx
 
You must be proficient in all MS office. I am looking for someon.docx
You must be proficient in all MS office. I am looking for someon.docxYou must be proficient in all MS office. I am looking for someon.docx
You must be proficient in all MS office. I am looking for someon.docx
 

Dernier

Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 

Dernier (20)

Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 

You must create a data file for the project. You can use forma.docx

  • 1. You must create a data file for the project. You can use format (shown below) for the data file. You must have large number of process in your file at least 1000 processes. You can assume to have your process 1. Expected execution time is distributed between 16ut and 512ut 2. IO time is distributed between 5ut to 50ut 3. Memory sizes are uniformly distributed between 16KB and 16384KB ************ Sample Data File ********************** PN:ZEU,CPU:21,MEM:22,IO:15,CPU:28,MEM:9,IO:25,CPU:15 ,MEM:-7,IO:59,CPU:24,MEM:7, CPU:-1 PN:VSM,CPU:43,MEM:12,IO:62,CPU:37,MEM:8,IO:77,CPU:1 4,MEM:7,IO:91,CPU:28,MEM:8,C PU:-1 PN:VBU,CPU:31,MEM:21,IO:14,CPU:34,MEM:- 5,IO:74,CPU:41,MEM:-1,IO:65,CPU:23,MEM:-5 ,CPU:-1 PN:TLA,CPU:16,MEM:19,IO:40,CPU:45,MEM:- 3,IO:70,CPU:43,MEM:7,IO:6,CPU:16,MEM:-3,C PU:-1 PN:SYC,CPU:31,MEM:23,IO:81,CPU:10,MEM:- 8,IO:52,CPU:17,MEM:-2,IO:95,CPU:22,MEM:2, CPU:-1 PN:SFY,CPU:27,MEM:12,IO:21,CPU:33,MEM:- 5,IO:83,CPU:14,MEM:-8,IO:40,CPU:16,MEM:8, CPU:-1 … ...
  • 2. … … ... … King Saud University Computer Science Department CSC227: Operating Systems Course Project Instructions: -April-2019 and explains the implementation. Topic Multiprogramming OS Simulation Batch processing and Memory Allocation Introduction It is required in this project, to write a program in Java that simulates the behavior of the multiprogramming operating system. At the end of the simulation, you are expected to
  • 3. output some statistics regarding the behavior of the system and submit a report. In the following sections, we will introduce the hardware specification, the multiprogramming OS features and the jobs requirements. Available computer system for the simulation has: Hardware: The computer hardware is assumed to have: 1. A RAM of size 256MB, where 16MB is used to store the OS. 2. A single core CPU that executes one instruction each unit of time. 3. An I/O device for input and output operations. 4. An internal clock that allows to measure time in milliseconds. Operating System: The operating system is the multiprogramming OS. We would be interested in only two features in this simulation: The Job and CPU scheduling. 1. Job Scheduling: The system implements multiprogramming batch processing. 2. A long term scheduler selects jobs in sequence and allocates them the needed memory until the 80% of the memory is full. A job is loaded only if there is enough
  • 4. memory to satisfy its first memory requirement. 3. Each required memory block should be contiguous but a process may have more than one block of memory in different locations of the memory 4. The short term scheduler will allocate processes to the CPU following a multi-level feedback queue scheduling. 5. A process will have several CPU-burst / IO burst sequences at described in the example below. In each CPU burst a process may require additional memory or decide to free part of its memory. 6. If a process requires additional memory and there is not enough memory to satisfy its request, it should be put in Waiting state until there is enough memory for it. 7. If all processes are in Waiting state, only if all waiting for memory allocation, this is a deadlock. The system should declare a deadlock and select the largest waiting process to be killed in order to get some free memory for the other processes. 8. At any moment the processes will have one of the states, READY, WAITING, RUNNING, TERMINATED, KILLED.
  • 5. 9. When the job queue is empty and all processes are killed or terminated, the system should write a file containing statistics about all processes and their final status TERMINATED or KILLED. 10. Every 100 milliseconds, the long term scheduler will wake- up, check the memory and load more jobs until the 80% of the memory is full. Instructions: 1. You MUST use multithreading where the long-term (Job) scheduler runs in one thread while the short-term (CPU) scheduler runs in another thread. 2. Design the multi-level feedback queue however you see fit. Your design and implementation should include: a. Number of queues. b. Scheduling algorithms for each queue. c. Method used to determine when to upgrade a process. d. Method used to determine when to demote a process. Program specifications: Each job in the jobs queue is defined as a sequence of several CPU-burst / IO burst as follows: Job description Explanation
  • 6. Name 15 11 3 5 4 6 3 -6 1 3 0 -1 Process name CPU-burst of 15ms – Memory required 11 MB I/O burst of 3ms CPU-burst of 5ms – Additional memory required 4 MB I/O burst of 6ms CPU-burst of 3ms – Free 6 MB of the allocated memory I/O burst of 1ms CPU-burst of 3ms – No change in memory Job terminates after the last CPU-burst
  • 7. Initialization phase: You should perform the following steps before running the simulation: 1. Load all jobs in the jobs file into a jobs queue in memory 2. Start the system clock (in milliseconds) 3. Start the long term scheduler that check the first job in the job queue, check if there is enough memory for it and then: a. create a process for that job, b. allocate its memory c. put it in the Ready queue, d. remove it from the jobs queue 4. Load the RAM with the maximum number of user programs, then go to sleep for 200ms. 5. Start the simulation run which consists of a simulation of the Machine Execution Cycle. At each millisecond, the scheduler will check if a job CPU-burst has ended and if the I/O burst of a process has ended. It should also check if any waiting process can be reactivated and put in the ready queue. Output from the simulation:
  • 8. A text file containing statistics about all processes and their final status TERMINATED or KILLED. Statistics about a process should contain: a. Process ID b. Program name c. When it was loaded into the ready queue. d. Number of times it was in the CPU. e. Total time spent in the CPU f. Number of times it performed an IO. g. Total time spent in performing IO h. Number of times it was waiting for memory. i. Time it terminated or was killed j. Its final state: Killed or Terminated k. CPU Utilization l. Waiting time. m. Turnaround time. You also should provide average waiting time and the average turnaround time for Report: A report is expected to discuss your design of the multi-level feedback queue scheduling, justification of your design, and expectations in terms of performance, and analysis of the results obtained. Visualize the waiting time and the turnaround time of the processes using plots.
  • 9. Bonus: Build a graphical interface representing the multi-level feedback queue, CPU and the memory and showing dynamically how memory is allocated or released by processes. In addition, it has to show the processes waiting in the multi-level feedback queue. This interface should show the time and the process under execution at any moment.