???? ????? ??? ?????? I/O ?????? ??? ??? Windows NT ? Windows 2000 ? Windows XP

???? ???????: 156932 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

???? ?????/????? ????? ?? Microsoft Windows NT ? Windows 2000 ? Windows XP ?????? ?? ??? ??????. ?????? ????????? ?? I/O ??????: ??? ??????? ???? I/O ?????? ??? ?????? ????? ???????/???????. I/O ??? ?????? ???? ???? I/O ?????? ??????? ??? ?????? ??????? ?? ????? ????? ???? I/O ?? ????? ?? ???? ????? ??? ??? ????? ??????????. ????? ???? ??????? ?????? ??? ?????? ????? ???????/???????. ????? ?? ???? ???? ???????? ????? ???? ????? ???????/??????? ??????? ???????? ????? ???? ???????.

?????? ??? ?????? I/O ?? ?????? ??? ??? ???? ???? ?? ????? ?????? ?? ????? ????? ????? ????? ???????/???????. ??? ??????? ??????? I/O ??????? ???? ????? I/O ?????? ? ??????? ???? I/O ??????? "/ ??????? ??????". ?????? ??? ??????? ????????? Asynchronous ? ?????? ??????? I/O ??? Windows NT. ????? ??? ??????? ?????? ????? ???????? ????? I/O ??? ??? WriteFile CreateFile ReadFile ? ????? ??????.

???? ????? ?????? ???????/??????? ??? ???????? ???? ?????? ??? ?????? I/O. ????? ?????? ???? ?????? ??? ??????? ?? ??? ??????? ???? ?????? ???????/??????? ????? ???? ??????. ??? ?????? ?? ???? ??? ????? ??????? ??? ?? ???? ??????? I/O ??? ?????? ????? ???????/???????.

????? ?????? ?? ??????? I/O ???????? ????. ?????? ??? ??????? ReadFile ? WriteFile ??????; ????? ????? ???? ReadFileEx ? WriteFileEx. ??? ????? ?? ?? ????? ??? ??????? ???? ??? ????? I/O ? ???? ????? ?????? ?? ??????? ??? ????? ???? ?? I/O I/O ?? ?????? I/O ??????.

??????: ??? ???? ??????? Windows 95 ?? ????? I/O ??? ???????? ??? ????? ????? (??? ????? ?? ?? ???? ??? ????? ???? ?? ????? ?????/?????) ? ????? ?? ???? ??? ???????.

??????? ????

????? I/O ??????

??? ?? ??? ????? ??????? FILE_FLAG_OVERLAPPED CreateFile ??? ??? ?????. ???? ??? ??????? ?????? ???????/??????? ??? ????? ???? ???? ?????? ???? ??? ??????. ????? ??? ????:
   HANDLE hFile;

   hFile = CreateFile(szFileName,
                      GENERIC_READ,
                      0,
                      NULL,
                      OPEN_EXISTING,
                      FILE_FLAG_NORMAL | FILE_FLAG_OVERLAPPED,
                      NULL);

   if (hFile == INVALID_HANDLE_VALUE)
      ErrorOpeningFile();
				
???? ????? ??? ????? ???????/??????? ??? ???????? ??? ?????? ??? ???? ????? ?????? ??? ????? ?????. ????? ??? ?????? ??? ??? ?????? ?????? ??????? ????? ???????/????? ???? ?? ??? ????? ???? ?????? ?? ???? ??? ?????? ???? ????. ???? ????? ???????? ???????? ?????? ???.

???? ?????? ?? ??????? ???? ???? ?????? ????? ?????? ???????? ??? ????????? ??????, ??? ???????? ?????? ????? ????????? ?? ?????? ????? ???????. ??? ???? ??????? ????? ???????? ???????? ??????? ???? ???? ???????? ? ??? ??????? ????? ????? ???????. ??? ?? ???? ??? ??? ???? ?? ???????? ???????/??????? ??????? ??????:
   if (!ReadFile(hFile,
                 pDataBuf,
                 dwSizeOfBuffer,
                 &NumberOfBytesRead,
                 &osReadOperation )
   {
      if (GetLastError() != ERROR_IO_PENDING)
      {
         // Some other error occurred while reading the file.
         ErrorReadingFile();
         ExitProcess(0);
      }
      else
         // Operation has been queued and
         // will complete in the future.
         fOverlapped = TRUE;
   }
   else
      // Operation has completed immediately.
      fOverlapped = FALSE;

   if (fOverlapped)
   {
      // Wait for the operation to complete before continuing.
      // You could do some background work if you wanted to.
      if (GetOverlappedResult( hFile,
                               &osReadOperation,
                               &NumberOfBytesTransferred,
                               TRUE))
         ReadHasCompleted(NumberOfBytesTransferred);
      else
         // Operation has completed, but it failed.
         ErrorReadingFile();
   }
   else
      ReadHasCompleted(NumberOfBytesRead);
				
????????? ???? ?? ??????? ??? ReadFile NumberOfBytesRead ????? ?? & NumberOfBytesTransferred ???? ?? ??????? ??? GetOverlappedResult. ??? ?? ????? ????? ??? ???????, ??? ??????? GetOverlappedResult ?????? ??? ????? ?????? ??????? ?? ??????? ??? ?? ????? ??????. &??????? NumberOfBytesRead ?? ?????? ??? ReadFile.

??? ?? ????? ????? ????? ????? ??????? ?? & NumberOfBytesRead ???? ?? ??????? ??? ?????? ReadFile ??? ????? ?????? ????????. ?? ??? ??????? ????? ???? OVERLAPPED ?? ?????? ??? ReadFile; ?? ??????? ?? GetOverlappedResult ?? WaitForSingleObject.

caveat ??? ?????? ??????? ??? ????????? ???? ??? ??? ??????? ??? ???? OVERLAPPED ??? ?????? ????? ????? ????? ??. ????? ???? ??? ??? ???? ???? ?????? ???????/??????? ??????? ??? ???? ??????? ????? OVERLAPPED ???????. ??? ??? ?????? ????????? ??? ???? OVERLAPPED ??? ????? ????? ??? ?????? ?? ?????? ???????/??????? ?? ?? ????? ??? ?? ????????. ???????? ??? ???? ??? ?? ????? ?? ??????? ??? ???? OVERLAPPED ????? ?????? ?? ??? ?? ????? ????? ???????? ??? ????? ????? ????? ??? ???? ???? ????? ???? ???? ?? ???? ?????? ??? ?????? ???? ??? ????? ?????.

??? ????? ??? ??? ??????? ??? ?????? ?????? ???????? ???? ?? ???????? ?? ?????. ?????? ???? ???????? ??? ?? ?? ??????? ?? ??????? ??? ?????? ????? ???????/??????? ????? ?? ???????; ????? ?? ????? ?????? ?????? ???? ?? ???? ?????? ?? ???????? ????????.

??? ?????? I/O ?????? ?? ??????

??? ??? ????? ????? ????????? ???????? ?? ??? ??????? ??? ????? ?? ???? ???? ?????? ???????/??????? ?? ???? ????? ????? ???? ?????? ?? ????? ????? ? ?? ?? ?????? ReadFile ????? FALSE ??? GetLastError() ????? ERROR_IO_PENDING ? ???? ??? ?? ??? ???? ??? ????? ????? ??. ????? ???? ??? ?

???? ????? ????? ????? ?????? ???????/??????? ??? ??? ?? ????? ????? ??? ??????? ???? ??????:

?????

???? ?????? ?????? ??? ????? ??? ??????? ??? NTFS. ?????? ????? ???? ??????? ??? ?? ?????? ??????? ???????? ???? ??? ??????; ????? ?? ???? ???????? ??? ????? ??????. ?? ??? ????? ??? ??? ??????? ???? ?? ????? ???????? ??????? ???????? ?????? ????? ?? PKZIP.

????? NTFS

???? ??? ???? ????? ??? ?????? ????? ???? ?????? I/O ??? ?????? ??? ??????. ??? ??? ??? ?? ????? ??????? ???? ????? ?????/????? ??? ??????.

????? ???

?? ??? ??? ??? ????? ?????? ???????/??????? ???? ?????? ???????? ?????. ??? Windows NT ?? ?? ????? ??????? ??? ??? ???? ???? ???? ????? ??????.

??????: ??????? ???? ??? ????? ??????? ??????? ????? ?????? ??? ???????? ?????? ????? "??? ???????? ???????" ???? ???????? ?????? SetFileValidData ??? ?? ???? ??? WriteFile.

???????? SetFileValidData (????? ????? ?? Windows XP ?????????? ???????) ? ??????? ???? ?????? ????? ??????? ???? ???? ???? ???? ?????? ??? ????? ??? ?????.

???? ?? ??? ???? ??????? NTFS - ????? ???????? ??? ??? ???????? ??????? (VDL) ????? ?????? SetFileValidData ??? ?????? ?? ?????? ?????? ??? ????? ?? ??? ????? ????? ???? ?? ??????? ?????? ?????? ??????? ??????. ????? SetFileValidData ????? ?? ?????? SeManageVolumePrivilege ???? ????? (???? ??????? ??? ?????? ??? ????????? ???). ???? Microsoft ????? ISVs ?????? ?????? ?? ??????? ??? ??????.

????? ??????? ??????

????? ???? ????? ????? I/O (????? ????????? ? ???????) ??? ???? ???? ??? ???? ????? ??????? ??? ??? ???? ????? ??? I/O "??????" ? ? ????? ?????? ReadFile ?? WriteFile TRUE. ?? ???? ??? ???? ??? ??????? ?? ?????? ??? ??????. ?????? ??? ???? ??? ???? ???? ???? ?????/????? (I/O) ???? ?? ??? ??????? "?????" ??? ????? ???????? ?????? ?? ???????.

?????? ??? ?? ????? ??????? ??????

???? ?? ???? ???? ????? ??????? ?????? ????? ??, ??? ????? ?? ???? ??? ?? ??? ???????? ?? ????? ??????? ??????. ??? ????? ????? ??????? ?????? Windows NT ??????? ???????? ??????? ?????. ?? ???? ????? ??????? ?? Windows NT ???? ??? ???? ??? ?????? ?????? ??????? ????? ???????? ?? ??? ????? ????? ??????? ??????. ??? ???? ????? ?????? ????? ????? ??????? ?????? ?? ??? ???? ?????? ???????? ?? ??????? ??? ?? ???? ????? ????? ?????? ?????? ??? ?????? ??????? ???? ?? ??????? ?????? ????? ???? ??????? ????? ?? ?? ???? ???? ??????? ????? ?? ??? ?????? ????? ?????? ???? ?????? ?????? ????? worker. ??? ????? ?????? ??? ???????? ??? ????? ???????? ReadFile ?? ????? ?????? ?????.

???? ??? ???? ??? ???? ???? ?? ????? ???? ??? ???? ?????? ??????? ?????? ?????? (?????? ????? ??? ???? 16 ???? ????) ? ???? ?? ???? ??? ?? ????? ??? ??? ????? ???????? ??? ?????? ????? ????? ?? ??? ????. ??? ???? ?? ?????? ???????/??????? ??? ?????? ??? ?????? ?? ????? ??????? ?????? ??? ??????? "????? ????? ??????? ??????" ? "???? ??????? ??? ??? ????? ????? ??????? ????????.

???? ????? ?? ????? ???? ????? ????? ??????? ?????? ???????? ???????? ??? ?? ??? ??? ?????? ??? ??? ???? ?????? ?? ???? ??????. ??? ?????? ????? ????? ??????? ?????? ?????? ??? ?????? ??? ??????? ???? ??????. ???? ????? ????? FILE_FLAG_SEQUENTIAL_SCAN ?? ??????? CreateFile ????? ??????? ?????? ???? ????? ?? ??????. ??? ???? ??? ??? ??????? ??? ??????? ?????? ??????? ?????? ??????? FILE_FLAG_RANDOM_ACCESS ?? CreateFile ?????? ????? ????? ??????? ?????? ?????? ????? ?????? ????????.

?? ??????? ????? ??????? ??????

????? FILE_FLAG_NO_BUFFERING ????? ???? ??? ???? ???? ??????? ????? ??? ???????. ??? ?? ???? ????? ????? ?? ??? ????? I/O ??? ????????? ??????. ???? ??? ??? ??? ??????? ?? ???? ????? ??????? ?????? ?? ?? ???? ?????.

?????: ???? ??? ?????? ??? ??????? ??? ??????? ???? ?????? ?????? ?????? ?????? ???????? ??? ???? ??????. ???? ???? ?????? ?? ????? ?????? CreateFile ?????? ??? ???? ?? ????????? ??? ??????? ??? ??????? ???? ????.

????? ????????? ????????

????? ????? ?????? ??????? ?? "???? ??????? ?? Microsoft":
Asynczip.exe
?????? ??? ??????? ?????? ??? ????? ????? ????? ??? Microsoft "? ???? ??? ??? ??????? ?????? ?????? ??" ????? ??????? ?? Microsoft:
119591????? ?????? ??? ????? ??? Microsoft ?? ??????? ??? ????????
???? Microsoft ???? ??? ????? ????? ?? ?????????. ??????? Microsoft ???? ?? ?????? ??? ??????? ??????? ??? ??????? ???? ?? ??? ?????. ??? ????? ????? ??? ?????? ????? ?????? ???? ????? ??? ??? ????? ??? ??????? ??? ???? ??? ??? ?????. ???? ????? ???????? ???????? ???????? ??? ??????? ??????? ?????? ???????? ???? ??? ????????. ??? ????? ???????? ???????? ?????? ???? ???? ??? Windows NT. ???? ????? ??? ??????? ??????? ?????? ?? ??????:
   Asynchio
   Usage: asynchio [options]

   Options:
      /fFilePattern  Files to use for I/O.
      /s    Specifies synchronous operation.
      /n    Specifies that no buffering should be used
      /r    Use FILE_FLAG_RANDOM_ACCESS
      /l    Use FILE_FLAG_SEQUENTIAL_SCAN
      /o###    Issue ### operations
      /e    First read entire file, then issue smaller reads
      /?    Display this usage message.
				
??? ???? ??????: /n /f*.bmp asynchio
??????? ?????????? ?? ??? ???????? ??????? ?????? ??? ??????. ???? ???????? ??? ??? ?????? ???????/??????? 500.

????? ?????? ???? ???????

???? ??? ??? ????? ???????? ?? ????? ???????? ????????. ????? ??????? ?????? ??? ??? ????? ?? ??????? ??? ??????? ???? ??????? ????? ?????? ?? ????? ????? illuminates ??? ???? ??? ???????? ??? ??????.

????? ???? ???? ??????? ?????? ??? ???:
  • ?????? 1
    Asynchronous, unbuffered I/O:  asynchio /f*.dat /n
    
       Operations completed out of the order in which they were requested.
       500 requests queued in 0.224264 seconds.
       500 requests completed in 4.982481 seconds.
    						
    ??? ???????? ???? ?? ?????? ??????? ????? ????? I/O 500 ????? ??? ????? ???? ?? ????? ?????? ???? ?? ????? ?????? ?? ?????.
  • ???????? 2
    Synchronous, unbuffered I/O: asynchio /f*.dat /s /n
    
       Operations completed in the order issued.
       500 requests queued and completed in 4.495806 seconds.
    						
    ???? ??? ???????? ???? ??????? ??? ???????? ????? 4.495880 ??????? ReadFile ?????? ?? ?????? ????? ???????? ?????? 1 ????? 0.224264 ?????? ????? ??? ???. ?? ?????? 2 ? ??? ???? ?? ??? "??????" ??????? ?????? ?? ??? ???????.
  • ?????? 3
    Asynchronous, buffered I/O: asynchio /f*.dat
    
       Operations completed in the order issued.
       500 requests issued and completed in 0.251670 seconds.
    						
    ???? ??? ???????? ?????? ????? ????? ??????? ??????. ?? ????? ??????? ???? ??? ????? ???????? 0.251670. ????? ???? ?? ????? ??????? ??? ????????? ???? ??????. ???? ??? ???????? ????? ???? ???? ????? ????? ??????? ?????? ????? ???? ???????? ?? ????? ??????? ??????.
  • ?????? 4
    Synchronous, buffered I/O: asynchio /f*.dat /s
    
       Operations completed in the order issued.
       500 requests and completed in 0.217011 seconds.
    						
    ???? ??? ???????? ??? ??????? ??? ?? ?????? 3. ???? ?? ?????? ???????? ?? ????? ??????? ?????? ????? ???? ?????? ?? ??????? ??? ????????? ?? ????? ??????? ??????. ???? ??? ???????? ????? ???? ???? ????? ????? ??????? ?????? ????? ???? ???????? ?? ????? ??????? ??????.

?????

????? ?? ???? ??????? ?? ?????? ??? ??? ???? ????? ??? ??? ???? ??? ?????? ????? ????????.

?????? ??? ??????? ????????? ???? ????? ?? ?????? ???? ??? CreateFile ????? ?????? ? ??????? ??????.

??????: ?? ??? ??? ??? ???? ??? ?????? ???????? ?? ??? ????? ??? ?????? ????? ???? ??????? ??? predictive ??? ?????? ??????? ????? ? ??? ?????? ??????? ????? ???????? ???????. ??? ????? ?? ?? ??? ?? ???? s ??????? [ASCII 146] I/O ??? ?????????, ??? ?????? ????? ???????? ?????? ?? ????????? ?????.

??? ??? ?? ????? ????? ??????? ????? ?? ??? ???????, ?? ????? ??? ?????? ??? ????? ????? ????? ??????? ?????? ?????? ????? ???? ??????? ?????????? ?????? ?? ??? ???????. ????? ????? ????? ????? ??????? ?? ?????? ReadFile ?? WriteFile ??? ?? ?????? ??? ????? ??? ????? ???? ???????? ??????? I/O ?????? ?????? ????? ??????. ??? ?? ???? ???? ????? ?? ?????? ?????? I/O ?? ? ?? ?????/????? ???? ??? ???? ????? ???? ??????. ??? ???? ??? ????? ???????? ????? ????? I/O ????? ?????? ?????? ????? ???? ??????? ??????? I/O ??????, ?? ??? ??? ??????? ?? ?????? ????? ???? ??? ??????. ?????? ????? ???????? ???????? ???????? ?????? ?? ??? ??????? ?????? QueryPerformanceCounter ?????? ?????? ?? ????? ????? ?????.

?????? ?????? ????? ??? ????? ????? ??????? ???????? ???????? ?????? ????? ??????? ??????. ????? ???? ?? ?? ?????? ?????? ???? ??????? ?????? ???? ????? ????? ??????? ??????. ????? ???? ?????? ?????? ??????? ????? ??????? "??" ????? ??????? ???? ????? ?????.

???? ??? ????? ?????? ????? ?? ?????? ??????; PerfMon ? DiskPerf ????? ???? ???. ????? ????? ???????? ??? ???? ????? ??????? ???? ??? ????? ????? -y diskperf ?????. ??? ?????? ????? ??? ????? ????? ?????? ???? ????? ????????.

?????

????? ?? ????????? ??? ??? ??????? ???????? "?" ?????? ?????? ???? ???? ??????? "?????? Windows NT" ?? ????? Windows NT Resource Kit.
????? ???? SQL ????? ???? ? ???? ??????? ??? ????? ?????????? ? ??? ?? ???? ?? ??? ?????? Microsoft SQL Server Always-On ??????? ???? ??????. ??????????? ?? ????????? ??? ??????? ??????? ???? ????? ?????? SQL Server "? ???? ??? ??? ??????? ?????? ?????? ??" ????? ??????? ?? Microsoft:
967576??????? ???????/??????? ???? ????? ?????? ???? Microsoft SQL

???????

???? ???????: 156932 - ????? ??? ??????: 11/???/1430 - ??????: 5.1
????? ???
  • Microsoft Win32 ????? ????? ???????, ????? ?????? ??:
    • Microsoft Windows NT 3.51 Service Pack 5
    • Microsoft Windows NT 4.0
    • the operating system: Microsoft Windows 2000
    • the operating system: Microsoft Windows XP
  • Microsoft SQL Server 2008 Developer
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 Express
  • Microsoft SQL Server 2008 Standard
????? ??????: 
kbmt kbapi kbfileio kbinfo kbkernbase KB156932 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????156932

????? ???????