Bài giảng Hệ điều hành nâng cao (Operating System-OS): Chương 4 - Phan Vĩnh Thuần

Chương 4 - virtual memory. Bài giảng gồm có những nội dung chính sau: Basic memory management, swapping, virtual memory, page replacement algorithms, modeling page replacement algorithms, design issues for paging systems, implementation issues, segmentation. | Chapter 6. Threads OBJECTIVES To introduce the notion of a thread - a fundamental unit of CPU utilization that forms the basis of multithreaded computer systems. To discuss the APIs for Pthreads, Win32, and Java thread libraries. To examine issues related to multithreaded programming. . Overview A thread is a basic unit of CPU utilization. Thread comprises A thread ID A program counter A register set A stack Thread shares with other threads belonging to the same process its code section, data section, and other operating-system resources, such as open files and signals. A traditional (or heavyweight) process has a single thread of control. If a process has multiple threads of control, it can perform more than one task at a time Figure . Single-threaded and multithreaded processes. . Motivation Many software packages that run on modern desktop PCs are multithreaded. An application typically is implemented as a separate process with several threads of control. Example: A web browser might have one thread display images or text while another thread retrieves data from the network. Many operating system kernels are now multithreaded; several threads operate in the kernel, and each thread performs a specific task, such as managing devices or interrupt handling. . Benefits Responsiveness. Multithreading an interactive application may allow a program to continue running even if part of it is blocked or is performing a lengthy operation, thereby increasing responsiveness to the user. Resource benefit of sharing code and data is that it allows an application to have several different threads of activity within the same address space. Economy. Because threads share resources of the process to which they belong, it is more economical to create and context-switch threads. Utilization of multiprocessor architectures. In a multiprocessor architecture, where threads may be running in parallel on different processors. A singlethreaded process can only | Chapter 6. Threads OBJECTIVES To introduce the notion of a thread - a fundamental unit of CPU utilization that forms the basis of multithreaded computer systems. To discuss the APIs for Pthreads, Win32, and Java thread libraries. To examine issues related to multithreaded programming. . Overview A thread is a basic unit of CPU utilization. Thread comprises A thread ID A program counter A register set A stack Thread shares with other threads belonging to the same process its code section, data section, and other operating-system resources, such as open files and signals. A traditional (or heavyweight) process has a single thread of control. If a process has multiple threads of control, it can perform more than one task at a time Figure . Single-threaded and multithreaded processes. . Motivation Many software packages that run on modern desktop PCs are multithreaded. An application typically is implemented as a separate process with several threads of control. Example: A web

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
157    81    1    22-05-2024
Đã 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.