Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Given a binary file containing PCB ( Process Control Block ) information about multiple processes the processes being written in sequential order ( one after
Given a binary file containing PCB Process Control Block information about multiple
processes the processes being written in sequential order one after another simulate a CPU
schedulingexecution using different scheduling algorithms and different processors on an
imaginary computer. Each processor is running completely independent governed by a certain
scheduling algorithm Priority Scheduling Shortest Job First Round Robin FCFS
Make sure to provide load balancing when such operation is necessary.
Overview
PCB is a data structure holding information about processes, such as id name, activity status,
CPU burst time, priority, files open per process, etc. This data descriptor is necessary for the CPU
to know which process is running, what is the current state of the process, where the program is
in its execution, etc.
Instructions
The input binary file contains multiple PCB descriptors in sequential order. In our case it will be
not a real PCB descriptor see sched.h for such a descriptor but each process has the following
fields:
Offset Type Value Description
byte priority
bytes process name
bytes process id
byte activity status
bytes CPU burst time
bytes base register
bytes limit register
bytes number of files
bytes check sum
bytes process type
Notes
Read the binary file and print out the number of processes available in the file, the total
number of memory allocated by the processes and the overall number of open files
considering all the processes. The binary file with the PCBs will be provided as command
line argument with the structure described above. The test file will be same in structure
Step 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