mtfuller / os-team-project

This is the main repository for the OS Team Project for CS 3502.
0 stars 0 forks source link

Hoping to merge a finished/tested version of Phase 1 #35

Closed mtfuller closed 7 years ago

mtfuller commented 7 years ago

Hey everybody!

Just added 3 Test methods to test each PCB sorting algorithm we have. Ran into a few errors, turns out the STS was actually only running 15 jobs, which is why we were getting the large negative numbers in the result table. I rewrote a bit of the logic in the STS, and it seems like it is working. All the test methods I wrote are passing. I hope we can merge this into our master branch. Let me know what everybody thinks. See everyone soon!

-T

Modifications:

ghost commented 7 years ago

In Phase 1, the STS could only fit 15 jobs on the RAM at a time, which is why there are two (or more) calls to the class in the Driver, within the loop. But if your version corrects the analysis data that was collected, then we should merge.

Also, what's the purpose of the readyQueue that's different from the pcbQueue in the Kernel?

mtfuller commented 7 years ago

The purpose of the readyQueue is to hold all jobs "waiting" for a turn on CPU. When a job on the readyQueue is put on the CPU, that job is removed for the queue. I was thinking the pcbQueue would act more like a list of all PCBs in the system, and the readyQueue is a queue of all CPUs that are ONLY "Waiting" to be run.

I understand that the STS only runs 15 jobs on the first run. However, on the later runs of the STS, I saw that it was still getting hung up on the "Ended" status, and wouldn't ever run a job on the CPU.

Let me know if we need to look at anything else before we merge

ghost commented 7 years ago

I'm good with merging and the two queues - but are the sorting algos being run on the readyQueue now? Or is it just a copy of the pcbQueue that's shortened as jobs are sent to CPUs? We can talk about it on Saturday if that's easier. :)

mtfuller commented 7 years ago

Alrighty. The sorting algos still sort the pcbQueue. The flow is essentially the same, except the LTS adds the PCBs (that are placed into RAM) to the readyQueue. When the STS runs, it simple keeps running, handing out jobs to the CPUs, until the readyQueue is empty. Definitely will talk this Saturday. See everyone soon!