Windows Internals Covering Windows Server 2008 and Windows Vista phần 9

Bạn cũng có thể thấy hệ thống cửa sổ áp dụng tăng 2 cho các chủ đề giao diện thức dậy để xử lý các cửa sổ tin nhắn bằng cách giám sát các ưu tiên hiện nay của một ứng dụng giao diện đồ họa và di chuyển chuột qua cửa sổ. Chỉ cần làm theo các bước sau: | 426 Windows Internals Fifth Edition jCfl EXPERIMENT Watching Priority Boosts on GUI Threads You can also see the windowing system apply its boost of 2 for GUI threads that wake up to process window messages by monitoring the current priority of a GUI application and moving the mouse across the window. Just follow these steps 1. Open the System utility in Control Panel or right-click on your computer name s icon on the desktop and choose Properties . Click the Advanced System Settings label select the Advanced tab click the Settings button in the Performance section and finally click the Advanced tab. Be sure that the Programs option is selected. This causes PsPrioritySeperation to get a value of 2. 2. Run Notepad from the Start menu by selecting Programs Accessories Notepad. 3. Start the Performance tool by selecting Programs from the Start menu and then selecting Reliability And Performance Monitor from the Administrative Tools menu. Click on the Performance Monitor entry under Monitoring Tools. 4. Click the Add Counter toolbar button or press Ctrl I to bring up the Add Counters dialog box. 5. Select the Thread object and then select the Processor Time counter. 6. In the Instances box select All instances and then click Search. Scroll down until you see Notepad thread 0. Click it click the Add button and then click OK. 7. As in the previous experiment select Properties from the Action menu. Change the Vertical Scale Maximum to 16 set the interval to Sample Every N Seconds in the Graph Elements area and click OK. 8. You should see the priority of thread 0 in Notepad at 8 9 or 10. Because Notepad entered a wait state shortly after it received the boost of 2 that threads in the foreground process receive it might not yet have decayed from 10 to 9 and then to 8. 9. With Reliability and Performance Monitor in the foreground move the mouse across the Notepad window. Make both windows visible on the desktop. You ll see that the priority sometimes remains at 10 and .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
84    211    1    28-06-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.