Research on Windows System Technology

Source: Internet
Author: User

Research on Windows System Technology

Pan aimin, 2008.5.23

Over the past two years, I have been studying the Windows system technology. The reason for doing this is due to an idea two years ago. I want to see how the Windows system responds to user requests, especially when the system performance is poor, you may want to know what your applications and operating systems are busy.

A seemingly simple idea has taken a lot of detours in the implementation process. Many college students and graduate students from the best schools in China are exploring with me. I really want to thank them, otherwise I may not be able to stick to it.

To some extent, I feel that I have almost realized my original ideas. Although there are still many details to be completed, it is not very important. We have a systematic approach to uncover many mysteries. It feels really good whenever you find the root cause of some unexpected problems. The following are two interesting examples to share with you.

(1) On one of my computers, every time I enter a directory, the window is stuck for a while. Sometimes, this problem occurs when I right-click the menu. This gave me a bad feeling. I made up my mind to find the reason. Reproducible problems are always difficult to find the root cause, especially for curious and patient people. Later, we found that this is because a file type is associated with a remote path, and the machine indicated by the remote path does not exist. Therefore, when Explorer processes such a file type (such as displaying icons and adding related menu items), the remote request will wait until the time-out, if a remote request occurs in the user interface thread, the interface will be stuck.

(2) One night at home, my system was very abnormal when searching for wireless networks, and it could not be reproduced. Fortunately, I opened a tool we developed, taking down the record information and analyzing it, we found the cause quickly in semi-automated and semi-manual mode. In a driver at the bottom of windows, there is a 5000 cycle. In a loop, it checks a tag value and then sleeps for 1 ms. But I can clearly see that the actual sleep time in the cycle is always 15 or 16 milliseconds. Therefore, the intention of the program code itself is to execute 5000*1 Ms = 5 seconds, but the actual execution time exceeds 5000*15 Ms = 75 seconds. As for why sleep (1 ms) is changed to sleep (15 ms), I will only explain it briefly. In modern operating systems, the thread scheduling accuracy is almost 10 ms, and Windows XP of multi-core versions is 15 ms.

The process of research is very interesting. We figured out how the threads under Windows collaborate to do things. Looking at these points, I believe that most abnormal behaviors can be clearly explained, but it is not easy to automate them.

In fact, I write very few programs, but our understanding of the program is constantly deepening. At first, I paid special attention to the call stack, and later I paid more attention to the global collaboration of the system, step-by-Step experience accumulation allows us to constantly resolve the complexity of the system. It is very interesting to challenge the complexity of the system!

In addition to the implementation of existing operating systems, we are also studying and thinking about the development and transformation of modern operating systems. After all, the rapid development of hardware technology has led to a qualitative change in the system environment of personal computers. The popularization of multi-core processors and 64-bit systems will bring challenges and opportunities.

By the way, based on the past few years of work experience, I found that there are too few talents proficient in system technology, and there are few students or practitioners in the industry, it may be because I have too few contacts. I hope to do some work to drive some people, but it seems that my personal efforts are always very small. If students are very interested in system technology and have a good foundation, I would like to talk with you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.