Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Hệ điều hành
Lecture Operating systems: Lesson 23 - Dr. Syed Mansoor Sarwar
Đang chuẩn bị liên kết để tải về tài liệu:
Lecture Operating systems: Lesson 23 - Dr. Syed Mansoor Sarwar
Bích Châu
56
24
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Lecture Operating systems: Lesson 23 - Dr. Syed Mansoor Sarwar. The main topics covered in this lesson include: busy waiting, new definition of semaphore, process synchronization, deadlock and starvation, binary and counting semaphores, semaphore implementation, problems with semaphores, . | Operating Systems Lecture 23 Syed Mansoor Sarwar Agenda for Today Review of previous lecture Busy waiting New definition of semaphore Process synchronization Deadlock and starvation Binary and counting semaphores Recap of lecture 28 April 2022 Copyright Virtual University of Pakistan Review of Lecture 22 A good hardware based solution Semaphores Semaphore-based solution for the critical section problem Busy waiting 28 April 2022 Copyright Virtual University of Pakistan Busy Waiting Processes wait by executing CPU instructions Problem Wasted CPU cycles Solution Modify the definition of semaphore 28 April 2022 Copyright Virtual University of Pakistan Semaphore Implementation Define a semaphore as a record typedef struct int value struct process L semaphore 28 April 2022 Copyright Virtual University of Pakistan Semaphore Implementation Assume two simple operations block suspends the process that invokes it. wakeup P resumes the execution of a blocked process P. 28 April 2022 Copyright Virtual University of Pakistan Semaphore Implementation The negative value of S.value indicates the number of processes waiting for the semaphore A pointer in the PCB needed to maintain a queue of processes waiting for a semaphore 28 April 2022 Copyright Virtual University of Pakistan Semaphore wait Semaphore operations now defined as void wait semaphore S S.value- if S.value lt 0 add this process to S.L block 28 April 2022 Copyright Virtual University of Pakistan Semaphore signal void signal semaphore S S.value if S.value Two Implementations Busy-waiting version is better when critical sections are small and queue-waiting version is better for long critical sections when waiting is for longer periods of time . 28 April 2022 Copyright Virtual University of Pakistan Process Synchronization Execute statement B in Pj only after statement A has been executed in Pi Use semaphore S initialized to 0 Pi Pj A wait S signal S 28 April 2022 B Copyright Virtual University of Pakistan Process .
TÀI LIỆU LIÊN QUAN
Lecture Operating systems: Lesson 3 - Dr. Syed Mansoor Sarwar
Lecture Operating systems: Lesson 4 - Dr. Syed Mansoor Sarwar
Lecture Operating systems: Lesson 2 - Dr. Syed Mansoor Sarwar
Lecture Operating systems: Lesson 1 - Dr. Syed Mansoor Sarwar
Lecture Operating systems: Lesson 5 - Dr. Syed Mansoor Sarwar
Lecture Operating systems: Lesson 6 - Dr. Syed Mansoor Sarwar
Lecture Operating systems: Lesson 7 - Dr. Syed Mansoor Sarwar
Lecture Operating systems: Lesson 8 - Dr. Syed Mansoor Sarwar
Lecture Operating systems: Lesson 9 - Dr. Syed Mansoor Sarwar
Lecture Operating systems: Lesson 10 - Dr. Syed Mansoor Sarwar
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.