Question: Program 2 . Simulate batch processing with Multiprogramming.Requirements: 1 . The program will ask for the initial number of jobs, and then create batches with
Program Simulate batch processing with Multiprogramming.Requirements:
The program will ask for the initial number of jobs, and then create batches with a maximum capacity of see Program Requirements
In this simulation the information for each job will be generated internally, that is it will no longer be necessary to enter data from the keyboard, the information to be generated is: a Number of each process, validate that it is unique. Can be consecutive b Estimated Maximum Time will be generated randomly, validating that it is greater than range between and
c Operation remainder to be performed with its operands validate operations randomly.
NOTE: In the previous practice, the programmer's name was captured; in this practice, that information is no longer required it is eliminated
Jobs will be executed according to their assigned number ID
Processes once running can be Interrupted by EntryExit or terminated by Error Note the difference in the table
Interruption and termination of running jobs will be generated by keys. The keys to use are:
Key
Which indicates?
What are you doing?
AND
Interrupt by input output
The process that is in use of the processor execution must exit it and go to the queue of the processes of the batch in execution current
IN
Error
The process that is running at that moment will terminate by error, that is it will exit the processor and will be displayed as finished. In this case, since the process did not terminate, an error will normally be displayed instead of a result.
P
Break
Stops the execution of your program momentarily, the simulation resumes when the C key is pressed.
C
Continue
Pressing this key will resume the program previously paused with P
It should be displayed on the screen:
to Waiting Processes corresponding to the Batch in execution:
Yo Program Number.
ii Estimated Maximum Time.
iii. Show elapsed time. If the process has not yet been executed, will be displayed.
b Number of Pending Batches: Specify the number of pending batches to be executed, if there are none, will be displayed.
c Running Process:
Yo All data corresponding to the process will be displayed.
ii Time that has already been executed.
iii. Remaining time to execute
d Completed Jobs::
Program Number.
ii Operation
iii. Result of the operation or ERROR when the process has been terminated with the key that generates the error.
and. Clock General Accountant
Upon completion of the running batch, it will continue with the next waiting batch. The program will end when all operations for all batches have been performed Pause
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
