IS310 Hardware & Network Infrastructure Ronny L IS310 Hardware & Network Infrastructure Ronny L. Bull, MS Lecturer Computer Science Department
Today's Lecture Topics Processes Resource Sharing Deadlock Dining Philosophers OS Security
Processes Process: the activity of executing a program Process State: Current status of the activity Program counter General purpose registers Related portion of main memory Ready: a process is ready if it is within a state in which it can continue Waiting: a process is waiting if the process is delayed until some event occurs Resource allocation
Process Administration Scheduler: adds new processes to the process table removes completed processes from the process table. Process Table: an area in main memory maintained by the process scheduler. Dispatcher: controls the allocation of time slices to the processes in the process table The end of a time slice is signaled by an interrupt
Process Time Sharing Multiprogramming: dividing processor time into short segments (Time Slices) measured in either milliseconds or microseconds Context Switching: the procedure of changing from one process to another
Interrupts Interrupt: a signal that “interrupts” the CPU from its current task CPU completes its current machine cycle Process state is recorded Starts interrupt handler Interrupt handler: Located in a predetermined location in main memory Describes how dispatcher should respond to the interrupt signal
Process Time Sharing
Handling Competition for Resources
Handling Competition for Resources Semaphore: a “control flag” Critical Region: a group of instructions that should be executed by only one process at a time Bank account example Mutual exclusion: Requirement for proper implementation of a critical region Mutex
Deadlock
Deadlock Processes block each other from continuing Conditions required for deadlock (all three must be satisfied) Competition for non-sharable resources Resource requested on a partial basis An allocated resource can not be forcibly retrieved
Security What kind of concerns should we have when it comes to operating system security? What are some ways that can be used to tighten up security on within an operating system What are privilege levels? Privileged instructions?