Professional Documents
Culture Documents
CHAPTER 1
-Have 4 component of a Computer system
Advantages: Tính modules (đơn giảng hoá việc gõ rối và kiểm tra hệ thống)
Disadvantages: Định nghĩa các tầng, kém hiệu quả (ineffective), mất thời gian thực hiện lâu
hơn khi thực hiện trên hệ thống không phân tầng
CHAPTER 3 Processes
A process include: program counter, stack, data section
One program can be several processes
Process state:
5 trạng thái: new, running, waiting, ready, terminated
Process Scheduling
Maintains scheduling queues of processes: Job queue, ready queue, device queue(tuỳ
vào số thiết bị sẽ có có device tương ứng)
Witch: giảm chi phí chuyển ngữ cảnh-reduce the cost of context witching
Long-term in job queue (The long-term scheduler controls the degree of
multiprogramming)
Short-term in ready queue
Processes can be described as either: I/O bound(có khuynh hướng ko sd cpu), CPU
bound(tiến trình có khuynh hương sd cpu đến khi ht thời gian giành cho nó)
A process that has terminated, but whose parent has not yet called wait(), is
known as a zombie process.
Now consider what would happen if a parent did not invoke wait() and
instead terminated, thereby leaving its child processes as orphans
Two models of IPC: shared memory, message passing
CHAPTER 4 CPU Scheduling
Dispatch latency time it takes for the dispatcher to stop one
process and start another running
Turnaround time of submission of a process to the time of completion (từ lúc tới cho đến khi
hoàn thành công việc)
Waiting time amount of time that a process spends waiting in the ready
Responsen time is the time from the submission of a request until the first response is
produced
-Priority Scheduling
Problem=Starvation low priority processes may never execute
A major problem with priority scheduling algorithms is indefinit blocking, or
starvation
CHAPTER 6 Deadlocks
-4 conditions for Deadlock
Mutual exclusion
Hold and wait
No preemption
Circular wait
Đồ thị cấp phát tài nguyên(1 tn-1 th.hiện)
Cách phát hiện deadlocks Banker’s(1tn-nhiều thể hiện)
If graph contains no cycles no deadlock
if only one instance per resource type, then deadlock
if several instances per resource type, possibility of deadlock
Ensure that the system will never enter a deadlock state:
Deadlock prevention
Deadlock avoidance
Deadlock Prevention
Mutual Exclusion
Hold and Wait
No Preemption
Circular Wait