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
Bài giảng Hệ điều hành nâng cao (Operating System-OS): Chương 6 - Phan Vĩnh Thuần
Đang chuẩn bị liên kết để tải về tài liệu:
Bài giảng Hệ điều hành nâng cao (Operating System-OS): Chương 6 - Phan Vĩnh Thuần
Ánh Thơ
82
38
ppt
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Chương 6 - threads. Bài giảng gồm có những nội dung chính sau: Introduction to multimedia, multimedia files, video compression, multimedia process scheduling, multimedia file system paradigms, file placement, caching, disk scheduling for multimedia. | Chapter 6. Process Synchronization OBJECTIVES We discuss various mechanisms to ensure the orderly execution of cooperating processes that share a logical address space, so that data consistency is maintained. To introduce the critical-section problem, whose solutions can be used to ensure the consistency of shared data. To present both software and hardware solutions of the critical-section problem. 8.1. Background The bounded buffer can be used to enable processes to share memory. The following variables reside in a region of memory shared by the producer and consumer processes See 3.4.1-page 97 #define BUFFER_SIZE 10 typedef struct{ . . . } item; item buffer[BUFFER_SIZE]; int in = 0; int out = 0; The shared buffer is implemented as a circular array with two logical pointers: in and out. The variable in points to the next free position in the buffer; out points to the first full position in the buffer. The buffer is empty when in == out The buffer is full when ((in+1)%BUFFER_SIZE) == out. The producer process has a local variable nextProduced in which the new item to be produced is stored. The consumer process has a local variable nextConsumed in which the item to be consumed is stored. The producer process. while (true) { /* produce an item in nextProduced */ while (((in + 1) % BUFFER_SIZE) == out) ; /* do nothing */ buffer[in] = nextProduced; in = (in + 1) % BUFFER_SIZE; } The consumer process. while (true) { while (in == out) ; //do nothing nextConsumed = buffer[out]; out = (out + 1) % BUFFER_SIZE; /* consume the item in nextConsumed */ } This is a model of a system consisting of cooperating sequential processes, all running asynchronously and possibly sharing data. This scheme allows at most BUFFER_SIZE-1 items in the buffer at the same time. Suppose we want to modify the algorithm to remedy this deficiency. One possibility is to add an integer variable counter initialized to 0. counter is incremented every time we add a new item to the buffer. counter is . | Chapter 6. Process Synchronization OBJECTIVES We discuss various mechanisms to ensure the orderly execution of cooperating processes that share a logical address space, so that data consistency is maintained. To introduce the critical-section problem, whose solutions can be used to ensure the consistency of shared data. To present both software and hardware solutions of the critical-section problem. 8.1. Background The bounded buffer can be used to enable processes to share memory. The following variables reside in a region of memory shared by the producer and consumer processes See 3.4.1-page 97 #define BUFFER_SIZE 10 typedef struct{ . . . } item; item buffer[BUFFER_SIZE]; int in = 0; int out = 0; The shared buffer is implemented as a circular array with two logical pointers: in and out. The variable in points to the next free position in the buffer; out points to the first full position in the buffer. The buffer is empty when in == out The buffer is full when ((in+1)%BUFFER_SIZE) ==
TÀI LIỆU LIÊN QUAN
Advanced Operating Systems: Lecture 1 - Mr. Farhan Zaidi
Advanced Operating Systems: Lecture 22 - Mr. Farhan Zaidi
Bài giảng Hệ điều hành nâng cao - Chapter 2: Operating - System Structures
Advanced Operating Systems: Lecture 19 - Mr. Farhan Zaidi
Bài giảng Hệ điều hành nâng cao (Operating System-OS): Chương 0 - Phan Vĩnh Thuần
Bài giảng Hệ điều hành nâng cao (Operating System-OS): Chương 1 - Phan Vĩnh Thuần
Bài giảng Hệ điều hành nâng cao (Operating System-OS): Chương 2 - Phan Vĩnh Thuần2
Bài giảng Hệ điều hành nâng cao (Operating System-OS): Chương 3 - Phan Vĩnh Thuần
Bài giảng Hệ điều hành nâng cao (Operating System-OS): Chương 4 - Phan Vĩnh Thuần
Bài giảng Hệ điều hành nâng cao (Operating System-OS): Chương 5 - Phan Vĩnh Thuần
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.