Based on classroom discussions, develop a solution that allows users to enter "jobs" from terminals. We'll simulate "reading" these by getting them from a Text File, and loading them into a Queue of...

2 answer below »






  1. Based on classroom discussions, develop a solution that allows users to enter "jobs" from terminals. We'll simulate "reading" these by getting them from a Text File, and loading them into a Queue of type "Job". In real life, ppl would constantly be adding jobs to this queue. We're just going to load this "Input Job Queue / Input Job Spool" once.

    Your input file will be a CSV file containing the following information in each record/line:


    Jobname(8 chars max),job class(single u/c character,job priority1-99,runtime in seconds(used to simulate how long the job stays in the processor "running").


    Your solution will then process the Input Job Spool (read whatever's in there and send to the appropriate Job Class Queue. Jobs sitting in this queue will be selected to run by a processor, based on the JobClass (a single character). Higher priority jobs should be selected first.

    A job will only run in the processor dedicated to that JobClass. We'll simulate the time it runs by hardcoding a "runtime" for each job. The processor kicks out the job when the runtime has expired.

    The program ends when there are no more jobs for the processors to run. At this point your program printis out the jobs in the output queue (jobs terminated by the processors) showing job name, start time, end time (columnar listing).

    I will test your solution using my own set of input, so that I'll know by the output whether your solution worked properly.









Job Processor / Job Queue A “job” is a piece of work or ‘transaction’ to be executed on the system. The system has multiple processors; each processor is set up to select jobs assigned to a specific work “class”. This might be so that if a job requires a long amount of time, it’s assigned to a processor dedicated to running such jobs, leaving the other processors available for the shorter jobs. Users at “terminals” (keyboard and monitors) “submit” jobs. A Job reader populates that job into an Input Job Spool (buffer), where the job is held. In essences, it’s a FIFO structure (however a later rule might modify this). The is a routine that takes jobs from this queue, and populates specific Job Queue (based on JobClass). These JobClass queues are priority based, with the highest value (100), having priority over the lower values. Process Manager: Cycles through each processor If so, is there a current job running? If so… is the job finished? Terminate the job (move it to the output queue) Is the processor active? Fetch another job It’s possible to have a job queue for a certain job class, and no processor available to pick up that class of work. Operator command: · Change the jobclass of a processor, so that it will pick up a different jobclass. If there is a running job, that job completes, but the class change for the processor is immediate. · Change a processor from active to inactive, with a ‘stop’ command. The current job finishes. A ‘start’ command activates the processor Processer ManagerJ001 | J002 | J005Job ReaderJ005 | J001J002Input Job SpoolJobClass QueuesJobACLProcessorJ005J002Assign to QueueOutput QueueJob Reader:Get ͞jobs͟�submitted by users, and place into the input ͞spool͟�;�FIFO )Queue Selector:Get jobs from the input spool and assign to the appropriate JobClass queueProcessor Manager:Selects the Job from the appropriate JobClass queue, and loads it into the processor running that job class. Once the job is finished, puts it into the output queue and selects another job from the queue, IF the processor is ͚active͛+Jobname:str+jobclass:char+priority:int+runtime:float/double+jobclass:char+job:Job+status:bool Processer Manager Job002,C=C,P=1 Job001,C=A,P=1 J001 | J002 | J005 Job Reader Job005,C=A,P=25 J005 | J001 J002 Input Job Spool JobClass Queues Job > parameter A C L Processor > parameter J005 J002 Assign to Queue J005 J002 Output Queue Job Reader: Get “jobs” submitted by users, and place into the input “spool” ( FIFO ) Queue Selector: Get jobs from the input spool and assign to the appropriate JobClass queue Processor Manager: Selects the Job from the appropriate JobClass queue, and loads it into the processor running that job class. Once the job is finished, puts it into the output queue and selects another job from the queue, IF the processor is ‘active’ +Jobname:str +jobclass:char +priority:int +runtime:float/double +jobclass:char +job:Job +status:bool
Answered 50 days AfterOct 25, 2022

Answer To: Based on classroom discussions, develop a solution that allows users to enter "jobs" from terminals....

Pratyush answered on Dec 14 2022
40 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here