Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This assignment is not graded. I am writing it in Java. Thanks for the help! Problem Statement You are to develop a project to simulate
This assignment is not graded. I am writing it in Java. Thanks for the help!
Problem Statement You are to develop a project to simulate the execution of processes on one or more CPUs. We will develop the project in 3 phases. The first phase is not graded but serves as a project check point to make sure you have the basic shell in place for the overall project. The system will accept a list of incoming processes (including their arrival time, service time, and priority). We will not use all of the fields in the first pass. The Process input data file format will be comma separated text file lines. Both Java and C# have the ability to parse these files by splitting tokens by the, delimiter. We will keep it fairly simple. I just need a data file where I can store a list of incoming processes to be used in our simulation. An example is provided at the end of this document. Read the input file and create and display) a FIFO process queue on the screen. Create a thread to manage your cpu. The CPU thread will need to get a process from the queue, simulate its execution and then grab the next process. The system should keep up with entry time of a process, when it finished processing (elapsed time from a system start time of O). At any point in time we could use this data to compute throughput (between x and y time, how many processes complete = throughput of processes). The sketches below show the screen after the process queue has been loaded (simple version not showing all details of a process), but while the system simulation is paused. The second shows the CPU in the process of simulating execution. Start System Pause System System Paused Start System Pause System System Running 1 mat-100 Waiting Process Queue Proces Home Service Time Proc 10 Waiting Process Queve Process Name Service Time Process 4 Hace 14 CPU 1 time remaining - n/a HOC CPU 1 exec: Process fime remaining - Pro 14 Use this area to show system report stats (finished processes, current throughput, etc) Use this area to show system report stats (finished processes, current throughput, etc) Use the pause/start button or buttons to pause or allow the system to continue executing. Use the time unit to control the speed of execution so we can watch it. As processes complete they should migrate from the queue to the report area. Thinking Ahead: Eventually we will add more than 1 CPU to grab processes from the queue. Therefore, the queue will be single global shared queue that must be accessed by the thread controlling the cpu and must be properly synchronized and protected from corruption. Phase II will add a 2nd cpu Phase III will separate process queues for each cpu, and implement specific scheduling algorithms other than FIFO. Leave enough space to add columns to the priority queue. Leave some space for >1 CPU. And the final phase will have a queue per CPU. It is okay to have empty space on these intermediate versions of the system. Other Requirements: The Process input data file format will be a comma separated text file where each line represents a single process. We will keep it fairly simple. I just need a data file where I can store a list of incoming processes to be used in our simulation. An example is provided at the end of this document. We may randomly generate processes in the future. Your system should allow me to enter or configure the input file name for testing. EXAMPLE INPUT FILE: The columns/fields in order are: arrival time, process id, service time, priority. Other fields may be added as needed. 0, process a, 10, 1 5, process b, 14, 1 6, process c, 4, 1 Problem Statement You are to develop a project to simulate the execution of processes on one or more CPUs. We will develop the project in 3 phases. The first phase is not graded but serves as a project check point to make sure you have the basic shell in place for the overall project. The system will accept a list of incoming processes (including their arrival time, service time, and priority). We will not use all of the fields in the first pass. The Process input data file format will be comma separated text file lines. Both Java and C# have the ability to parse these files by splitting tokens by the, delimiter. We will keep it fairly simple. I just need a data file where I can store a list of incoming processes to be used in our simulation. An example is provided at the end of this document. Read the input file and create and display) a FIFO process queue on the screen. Create a thread to manage your cpu. The CPU thread will need to get a process from the queue, simulate its execution and then grab the next process. The system should keep up with entry time of a process, when it finished processing (elapsed time from a system start time of O). At any point in time we could use this data to compute throughput (between x and y time, how many processes complete = throughput of processes). The sketches below show the screen after the process queue has been loaded (simple version not showing all details of a process), but while the system simulation is paused. The second shows the CPU in the process of simulating execution. Start System Pause System System Paused Start System Pause System System Running 1 mat-100 Waiting Process Queue Proces Home Service Time Proc 10 Waiting Process Queve Process Name Service Time Process 4 Hace 14 CPU 1 time remaining - n/a HOC CPU 1 exec: Process fime remaining - Pro 14 Use this area to show system report stats (finished processes, current throughput, etc) Use this area to show system report stats (finished processes, current throughput, etc) Use the pause/start button or buttons to pause or allow the system to continue executing. Use the time unit to control the speed of execution so we can watch it. As processes complete they should migrate from the queue to the report area. Thinking Ahead: Eventually we will add more than 1 CPU to grab processes from the queue. Therefore, the queue will be single global shared queue that must be accessed by the thread controlling the cpu and must be properly synchronized and protected from corruption. Phase II will add a 2nd cpu Phase III will separate process queues for each cpu, and implement specific scheduling algorithms other than FIFO. Leave enough space to add columns to the priority queue. Leave some space for >1 CPU. And the final phase will have a queue per CPU. It is okay to have empty space on these intermediate versions of the system. Other Requirements: The Process input data file format will be a comma separated text file where each line represents a single process. We will keep it fairly simple. I just need a data file where I can store a list of incoming processes to be used in our simulation. An example is provided at the end of this document. We may randomly generate processes in the future. Your system should allow me to enter or configure the input file name for testing. EXAMPLE INPUT FILE: The columns/fields in order are: arrival time, process id, service time, priority. Other fields may be added as needed. 0, process a, 10, 1 5, process b, 14, 1 6, process c, 4, 1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started