Question: 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
scheduling/execution 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 =3, Shortest Job First =1, Round Robin =4, FCFS =2).
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
00001 byte ?? priority
000132 bytes ?? process name
00334 bytes ?? process id
00371 byte ?? activity status
00384 bytes ?? CPU burst time
00424 bytes ?? base register
00468 bytes ?? limit register
00544 bytes ?? number of files
00588 bytes ?? check sum
00661 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!