Skip to content
  1. Nov 26, 2020
  2. Nov 24, 2020
    • cjsr4d's avatar
      Printing to a File · b67e6dad
      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.
      b67e6dad
  3. Nov 23, 2020
    • cjsr4d's avatar
      This whole commit is just a rebuild of the resource management system. From... · c34acabb
      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
      c34acabb
  4. Nov 19, 2020
  5. Nov 18, 2020
  6. Nov 17, 2020
  7. Nov 16, 2020
  8. Nov 15, 2020
    • cjsr4d's avatar
      When a process requests resource the relevant information from the process is... · c9bd1714
      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.
      c9bd1714
    • cjsr4d's avatar
      The files have been shifted around to allow for adding appropriate PCBs to a... · a9e1c5ad
      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.
      a9e1c5ad
  9. Nov 14, 2020
  10. Nov 13, 2020
    • cjsr4d's avatar
      Small Edits · fcfa274c
      cjsr4d authored
      This commit is mostly for the purpose of having the repository up to date at all locations
      fcfa274c
    • cjsr4d's avatar
      Cutting Unnecessary Functions from Interrupt Handlers · 4b64175c
      cjsr4d authored
      The user-created interrupt wasn't need
      4b64175c
    • cjsr4d's avatar
      Fleshing Out of the Clock · 6c80e211
      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.
      6c80e211
  11. Nov 12, 2020
    • cjsr4d's avatar
      Initial commit for project 5. All the files come from Project 4, which means... · 62731bfc
      cjsr4d authored
      Initial commit for project 5. All the files come from Project 4, which means they still need to be adjusted and fixed
      62731bfc
    • cjsr4d's avatar
      All the directories in the correct format · d2483768
      cjsr4d authored
      d2483768
    • cjsr4d's avatar
    • cjsr4d's avatar
      Small Changes to Existing Files · fe159402
      cjsr4d authored
      fe159402
    • cjsr4d's avatar
      Time Accounting · 06ace663
      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
      06ace663
    • cjsr4d's avatar
      Child Process Handling · db431f7f
      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
      db431f7f
    • cjsr4d's avatar
      Emptying the Queue After a Termination Signal · 90bfefac
      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
      90bfefac
  12. Nov 09, 2020
    • cjsr4d's avatar
      Account for Adding to Queues Taking PCBs · e1ca7d3a
      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
      e1ca7d3a
    • cjsr4d's avatar
      Process Control · 9a9a9bd8
      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
      9a9a9bd8
    • cjsr4d's avatar
      Message Queue Implementation · 7bc21362
      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
      7bc21362