Báo cáo tài liệu vi phạm
Giới thiệu
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
THỊ TRƯỜNG NGÀNH HÀNG
NÔNG NGHIỆP, THỰC PHẨM
Gạo
Rau hoa quả
Nông sản khác
Sữa và sản phẩm
Thịt và sản phẩm
Dầu thực vật
Thủy sản
Thức ăn chăn nuôi, vật tư nông nghiệp
CÔNG NGHIỆP
Dệt may
Dược phẩm, Thiết bị y tế
Máy móc, thiết bị, phụ tùng
Nhựa - Hóa chất
Phân bón
Sản phẩm gỗ, Hàng thủ công mỹ nghệ
Sắt, thép
Ô tô và linh kiện
Xăng dầu
DỊCH VỤ
Logistics
Tài chính-Ngân hàng
NGHIÊN CỨU THỊ TRƯỜNG
Hoa Kỳ
Nhật Bản
Trung Quốc
Hàn Quốc
Châu Âu
ASEAN
BẢN TIN
Bản tin Thị trường hàng ngày
Bản tin Thị trường và dự báo tháng
Bản tin Thị trường giá cả vật tư
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
NGÀNH HÀNG
NÔNG NGHIỆP, THỰC PHẨM
Gạo
Rau hoa quả
Nông sản khác
Sữa và sản phẩm
Thịt và sản phẩm
Dầu thực vật
Thủy sản
Thức ăn chăn nuôi, vật tư nông nghiệp
CÔNG NGHIỆP
Dệt may
Dược phẩm, Thiết bị y tế
Máy móc, thiết bị, phụ tùng
Nhựa - Hóa chất
Phân bón
Sản phẩm gỗ, Hàng thủ công mỹ nghệ
Sắt, thép
Ô tô và linh kiện
Xăng dầu
DỊCH VỤ
Logistics
Tài chính-Ngân hàng
NGHIÊN CỨU THỊ TRƯỜNG
Hoa Kỳ
Nhật Bản
Trung Quốc
Hàn Quốc
Châu Âu
ASEAN
BẢN TIN
Bản tin Thị trường hàng ngày
Bản tin Thị trường và dự báo tháng
Bản tin Thị trường giá cả vật tư
Thông tin
Tài liệu Xanh là gì
Điều khoản sử dụng
Chính sách bảo mật
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
Thành Trung
112
38
ppt
Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG
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
Đã 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.