- Nov 26, 2020
- Nov 24, 2020
-
-
cjsr4d authored
oss.c ----- * Keeps track of write to log.out * In oss.c, the int approved captures the return value from release and request. If approved is > 0 that means some resources were given to processes. * The log file is only written to when the resources' requests are accepted. Therefore, when approved > 0, increment the writes variable resource.c ---------- * Controls for the number of writes were put in. * Each bit vector, whether from resource class or process, needs to be iterated over to get the information contained within.
-
- Nov 23, 2020
-
-
cjsr4d authored
This whole commit is just a rebuild of the resource management system. From message queues to shared memory for clocks and semaphores, the amount of work was insane. The reason nothing was commited was because nothing worked until right now. Commiting buggy code is not acceptable but the fact that this is the next commit with so much sunk into it means that policy will change
-
- Nov 19, 2020
-
-
cjsr4d authored
-
cjsr4d authored
All the uses of the master clock should be set up. The user process will choose to do actions at random times and add it to the clock. oss will also advance the logical time based on specific actions. There are also sneak peeks at some future code implemetations in the comments
-
cjsr4d authored
-
cjsr4d authored
Added semaphores to the advancing of the clock. This protects of simultaneous advances from any number of child processes and oss
-
cjsr4d authored
-
cjsr4d authored
The original file, in the Test/deadlock directory and the copied file in the main directory. types.h removes the circular dependencies that seemed inherent in the resource, queue, and processControl handling of deadlock avoidance
-
cjsr4d authored
Removed the functionality that would empty the run queues and replaced it by functions used to clean up ipc assets when interrupted
-
cjsr4d authored
All of the files changed to work with deadlock avoidance have been copied up into the main directory
-
- Nov 18, 2020
-
-
cjsr4d authored
Ironed out kinks in multi-process, sequential requests and releases. Some output is included that can be used for logging.
-
- Nov 17, 2020
- Nov 16, 2020
- Nov 15, 2020
-
-
cjsr4d authored
When a process requests resource the relevant information from the process is put in the waiting queue for the resource. The Allocator then pages through the waiting list and grants resources to proceses. The granting of resources updates the process control block of the process and the resources's inventory.
-
cjsr4d authored
The files have been shifted around to allow for adding appropriate PCBs to a waiting list for a resource. The PCBs now have fields to keep track of resources requested and resources owned by the process. The resources requested bit vector and the PID of the process are copied into a resource's waiting list upon request.
-
- Nov 14, 2020
-
-
cjsr4d authored
A directory that is being used to test the resource class functions. This is so that the struct and its support functions will work immediately as they go into the master program
-
- Nov 13, 2020
-
-
cjsr4d authored
This commit is mostly for the purpose of having the repository up to date at all locations
-
cjsr4d authored
The user-created interrupt wasn't need
-
cjsr4d authored
* The Clock struct uses unsigned ints now. * There is now a way to get a random amount of nanoseconds based on the minimum and maximum allowed value. * A key was made for a logical clock so it can be accessed in shared memory * The instance of the logical clock in shared memory is in oss.c * Any time a random amount of time is to be added to the logical clock getRandomTime is called, to make things simpler.
-
- Nov 12, 2020
-
-
cjsr4d authored
Initial commit for project 5. All the files come from Project 4, which means they still need to be adjusted and fixed
-
cjsr4d authored
-
cjsr4d authored
-
cjsr4d authored
-
cjsr4d authored
oss.c ===== * Time Accounting * The number of processes moved to the blocked queue needs to be recorded to correctly compute the time the oss took to move all of the Blocked processes *The clock needs to be incremented each loop, when a message is sent to user_proc, the time spent by user_proc to process * Resource classes need to be randomly assigned clock.c ======= * Function to set up and advance the clock struct clock.h ======= Clock struct to keep track of the time elapsed
-
cjsr4d authored
processControl.c ================ * Incorporating Blocked states * Time accounting for time spent blocked and total system time * Utilizing resource classes messageQueue.c ============== * The message queue initialization was easier and better handled here rather that in oss.c * communicate() is intended to send a pre-loaded message struct and receive the response for user_proc.c. The function returns said response
-
cjsr4d authored
queue.c ======= * emptyRunQueue() iterates through the priority queues, running each process but not rescheduling them * Process can be put in the Blocked queue * A function checks for processes in theBlocked state so they can be added to the Blocked queue interrupts.c =========== * The run queues need to be emptied before program stops execution
-
- Nov 09, 2020
-
-
cjsr4d authored
scheduler.c() ============ * addToRunQueue() and addToExpiredQueue() take control blocks queue.c ====== * Same as above interrupts.c ============ * An indicator to denote that the program is interrupted but the queues still need to be emptied * Scheduling interrupts are useful since time is simulated
-
cjsr4d authored
processControl.c ================ * suspend() * Set the state to Waiting so the process can be picked up by the queue later * Adjust CPU run time based on the last burst time * findAllProcesses() * Initialize array of PCB pointers * printPCB() * Adjust for changes in PCB member variables types * killChildren() * Not used anymore processControl.h ================ * Technically 20 processes can exist, so out of an abundance of caution the start of the states is set to 21
-
cjsr4d authored
messageQueue.c ============== * A message needs to be created for a parent and child process * Process messages also need to be initialized messageQueue.h ============== * Macros for message queue keys, message size limit * Message contents holds all relevant information for an active message * Message hilds a type of message and the contents of the message itself
-