随笔分类 - Operating System
摘要:问题1: 15ms 内多次调用 GetSystemTime / GetLocalTime(java 中对应的函数为 System.currentTimeMillis()), 返回相同的值 解决办法, 使用GetSystemTime 作为baseline, 然后用windows 提供的高精度计时器 QueryPerformanceCounter(java 中相应的函数为 System.nanoTime()) 做计时,精确时钟为baseline + 计时器时间。问题2: QueryPerformanceCounter/QueryPerformanceFrequency 的问题这个问题主要取决与wi
阅读全文
摘要:When a transition between user mode and kernel mode is required in an operating system, a context switch is not necessary; a mode transition is not by itself a context switch. However, depending on the operating system, a context switch may also take place at this time.
阅读全文
摘要:http://news.ddaaoo.com/Topic/view/id-57255 关于Linux的消息队列: mq_open用于日志记录中,当有新日志添加到队列中,我就mq_send一个消息,日志记录线程就开始记录数据,直至日志队列为空,然后继续等待。但是,遇到了第一个情况:近乎死锁的长时间等待!因为如果设置为阻塞的,mq_send将在发送胜利后之后返回!这很容易导致死锁!试想,如果大量的消息...
阅读全文
摘要:windows platform1) GetSystemFirmwareTable 不支持windows XP 32bit , windows 2000 2) WMI 需要安装WMI Software Developer Kitlinux
阅读全文
摘要:Dr. Insung Park and Alex BendetovWelcome back for the second part of our two-part article series: Core Instrumentation Events in Windows 7. In the first article, we presented a high-level overview ...
阅读全文
摘要:Dr. Insung Park and Alex BendetoversToday's computer software constantly breaks new grounds. Consumer software applications offer a sophisticated set of features that enable rich new experiences. P...
阅读全文
摘要:http://blogs.msdn.com/b/ryanmy/archive/2005/05/27/422772.aspx Uniformity. If you're debugging systemic problems involving multiple components, and all the involved components use ETW, you can have the...
阅读全文
摘要:1 create and write the manifest.xml代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<instrumentationManifestxmlns="http://schemas.microsoft.com/wi...
阅读全文
摘要:1.#ifdef CONSOLE AllocConsole(); SetConsoleTitle(_T("Debug Console")); freopen("conin$", "r+t", stdin); freopen("conout$", "w+t", stdout); freopen("conout$", "w+t", stderr); #endif....................
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--//EventLogging.cpp:Definestheentrypointfortheconsoleapplication.//#include"stdafx.h"#include<wind...
阅读全文
摘要:http://blogs.technet.com/b/winserverperformance/archive/2008/06/26/designing-applications-for-high-performance-part-iii.aspx25 Jun 2008 7:44 PM Comments 14 Rick Vicik - Architect, Windows Server Perfo...
阅读全文
摘要:http://blogs.technet.com/b/winserverperformance/archive/2008/05/21/designing-applications-for-high-performance-part-ii.aspx 20 May 2008 9:48 PM Comments 1 Rick Vicik - Architect, Windows Server Perfo...
阅读全文
摘要:http://msdn.microsoft.com/zh-cn/magazine/cc163437.aspx事件跟踪 使用 ETW 改善调试和性能优化 Dr. Insung Park andRicky Buch 本文讨论: 了解 ETW 体系结构Windows Vista 中 ETW 的新功能使用事件提供程序 API 进行编程 本文使用了以下技术: Windows Vista 目录 Wind...
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#ifndef_PERF_TIMER_H_#define_PERF_TIMER_H_#ifdef_WIN32#include<windows.h>#else#include<sys/...
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--/**main.cpp**Createdon:Feb9,2010*Author:weiyuwang*/#include<signal.h>#include<unistd.h>#...
阅读全文
摘要:http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3Content: The ProblemWhat is PIC?What are "relocations"?Case 1: Broken compilerCase 2: Broken `-fPIC' support checks in config...
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#ifdef_MSC_VERBOOLWINAPIconsole_handler(DWORDcevent){switch(cevent){caseCTRL_C_EVENT:caseCTRL_BREAK_...
阅读全文
摘要:这个bug搞了我两天, 大致就是说select 函数在linux 下 每次调用都会重置timeout参数值, 所以需要在每次调用select 函数之前, 重新设置timeout (window下面不会重置timeout)。-----------------------------------------------------------------------------------------...
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#include<unistd.h>#include<sys/types.h>#include<sys/wait.h>#include<signal.h>...
阅读全文

浙公网安备 33010602011771号