Answered step by step
Verified Expert Solution
Link Copied!

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
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions