Joshua Kellogg
Chapter #4 Homework Exercise
7/9/05
#1. A process is a routine that is done over and over again in order. A program performs a process or a sequence of events to complete a task.
#2. Multi-programming or multi-tasking is the capability of initiating and executing more than one program at a time. These programs, usually called processes, are time-shared, each receiving a slice of CPU time on a round-robin basis.
#5. The process scheduler tracks all the processes in the memory with the help of the process table. it basically makes sure every process gets it's own fare share of time to work.
#6. Multi-processing is basically multiple processors simultaneously executeing multiple processes or threads. Multi-programming share a single cpu and get time when it gives it.
#9. Two processes are said to be concurrent when they are indenpendant of each other and execute simultaneously.
#10. Race Condition is when a lock is set to a particular value by a process and then other processes check the value of the lock befor starting. if the lock is present by another process the other processes that need acess to the data have to wait until the current process is complete.
#12. A lock is a simple mechanism to achive mutual exclusion to a shared resource. It is set to a particular value by a process and util that current process is done with it, the other processes have to wait.
#14. SLEEP helps change the state of a process to waiting, and WAKEUP informs the process when it can execute.
#15. Deadlock happens when a process has to wait endlessly for a resource. The four types of deadlock are:
1. Mutual exclusion: Only one process can use a resource at time.
2. Hold-and-Wait: Is when a process has one resource and request another one.
3. No Preemption: resources can not be removed forcibly from a process. A process has to release it by itself.
4. Circular Wait: Each process waits for a resource held by the next process. As a result the first process in the sequence ends up waiting for the resource held by the last process.