170 likes | 412 Views
Pertemuan 7 Masalah-masalah pada Komunikasi antar Proses dan Penjadwalan Batch. Matakuliah : T0316/sistem Operasi Tahun : 2005 Versi/Revisi : 5. Learning Outcomes. Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu :
E N D
Pertemuan 7Masalah-masalah pada Komunikasi antar ProsesdanPenjadwalan Batch Matakuliah : T0316/sistem Operasi Tahun : 2005 Versi/Revisi : 5
Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : • mendemonstrasikan masalah klasik dalam komunikasi antar proses dan mendemonstrasikan penjadwalan proses pada sistem batch (C3)
Outline Materi Classical IPC Problems • Dining Philosophers problem • The Reader and Writers problem • The Sleeping Barber problem • Batch Scheduling • FCFS • Shortest Job First • Shortest Remaining Time Next • Three-Level Scheduling
Dining Philosophers (1) • Philosophers eat/think • Eating needs 2 forks • Pick one fork at a time • How to prevent deadlock
Dining Philosophers (2) A non-solution to the dining philosophers problem
Dining Philosophers (3) Solution to dining philosophers problem (part 1)
Dining Philosophers (4) Solution to dining philosophers problem (part 2)
The Readers and Writers Problem A solution to the readers and writers problem
The Sleeping Barber Problem (2) Solution to sleeping barber problem.
Introduction to Scheduling (1) • Bursts of CPU usage alternate with periods of I/O wait • a CPU-bound process • an I/O bound process
Introduction to Scheduling (2) Scheduling Algorithm Goals
Scheduling in Batch Systems (1) • First-Come First-Serve Processes are assigned the CPU in the order they request it Adv: Easy to understand and easy to program Disadv: Short job may wait too long if long job is in front of it
Scheduling in Batch Systems (2) • Shortest job first scheduling • Only optimal when all jobs are available simultaneously • the run time must be known in advance • Shortest remaining time next • The scheduler always chooses the process whose remaining run time is the shortest • the run time must be known in advance
Scheduling in Batch Systems (3) • Three level scheduling