亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? 設(shè)計(jì)報(bào)告.txt

?? 主要功能: 1、 包括顧客信息、貨品信息、定單信息的管理。 2、 按月統(tǒng)計(jì)銷售業(yè)績(jī)。 3、 報(bào)表設(shè)計(jì)。 4、 系統(tǒng)維護(hù)。
?? TXT
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
一、基本信息
實(shí)踐題目:同步對(duì)象實(shí)現(xiàn)P、V操作
二、實(shí)踐內(nèi)容簡(jiǎn)要描述
實(shí)踐目標(biāo):
用Win32提供的同步對(duì)象實(shí)現(xiàn)P、V操作,并解決任務(wù)4中有限緩沖區(qū)問(wèn)題
實(shí)踐內(nèi)容:
用同步對(duì)象實(shí)現(xiàn)P、V操作解決一下問(wèn)題:
寫一個(gè)線程實(shí)現(xiàn)C/C++語(yǔ)言程序:一些線程負(fù)責(zé)找出某個(gè)數(shù)據(jù)范圍的素?cái)?shù),并放到一個(gè)數(shù)組中,另一些線程負(fù)責(zé)將數(shù)組中的素?cái)?shù)按次序取出,并顯示出來(lái)。顯示過(guò)的數(shù)據(jù)要從數(shù)組中刪除。要求定義一個(gè)全局變量的數(shù)組:int prime[9]用于存放找到的待顯示的素?cái)?shù)。
三、實(shí)踐報(bào)告主要內(nèi)容
設(shè)計(jì)思路:
實(shí)現(xiàn)P、V操作用了binary semaphore來(lái)實(shí)現(xiàn),
wait操作的實(shí)現(xiàn)
 Wait(s1);
 c--;
if(c<0){
 signal(s1);
 wait(s2);
}
signal(s1);
 signal操作的實(shí)現(xiàn):
wait(s1);
c++;
if(c<=0) 
 signal(s2);
else
 signal(s1);
 線程同步仍采用了生產(chǎn)者-消費(fèi)者算法。
P、V操作用了一個(gè)返回值,為0時(shí)表示超時(shí),為1表示等待成功。
主要數(shù)據(jù)結(jié)構(gòu):
線程信息結(jié)構(gòu)體:
int searchCount = 0;  //已開線程數(shù)
int displayCount = 0;  //已開線程數(shù)

CRITICAL_SECTION  my_section;

HANDLE h_semaphore_s1_e = CreateSemaphore(NULL, 1, 1, "Bin_S1_Empty"); //Empty的S1
HANDLE h_semaphore_s2_e = CreateSemaphore(NULL, 0, 1, "Bin_S2_Empty"); //Empty的S2

HANDLE h_semaphore_s1_f = CreateSemaphore(NULL, 1, 1, "Bin_S1_Full"); //Full的S1
HANDLE h_semaphore_s2_f = CreateSemaphore(NULL, 0, 1, "Bin_S2_Full"); //Full的S2

int Count_Empty;     //Empty計(jì)數(shù)器
int Count_Full;     //Full計(jì)數(shù)器
struct ThreadInfo
{
 int   serial;
 char  command;
 int   num_from;
 int   num_to;
};
int prime[9];
void GetCommand( char* file );
void thd_display(void* p);
void thd_search(void* p);   
BOOL IsPrime(int num);   //用于判斷是否為素?cái)?shù)
int  GetUsed(int num[9]);   //用于獲得剩余空間

void P(LPCTSTR lpcstr,int &count);  //P 操作
void V(LPCTSTR lpcstr,int &count);  //V 操作
主要代碼分析:
int wait(int *,HANDLE Event[]);  // binary semaphore實(shí)現(xiàn)的P 操作
int signal(int *,HANDLE Event[]); // binary semaphore實(shí)現(xiàn)的V 操作
四、實(shí)踐結(jié)果
基本數(shù)據(jù):
 
源程序代碼行數(shù) 完成實(shí)踐投入的總時(shí)間 資料查閱時(shí)間 編程調(diào)試時(shí)間 源程序文件    
413 1小時(shí) 0.5小時(shí) 0.5小時(shí) ex5.cpp  
測(cè)試數(shù)據(jù)設(shè)計(jì):
1.“ex4.dat”文件內(nèi)容測(cè)試結(jié)果同ex4:
2.自設(shè)測(cè)試數(shù)據(jù)
 1  w  10  100
2  w  1   10
3  W  2   20
4  D  20   0
5  D   3   0
測(cè)試結(jié)果分析:
對(duì)應(yīng)于數(shù)據(jù)的運(yùn)行結(jié)果:
Reader Priority:

Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Search thread 2 begins to write the date .
Search thread 2 finish writing the date .
Search thread 3 begins to write the date .
Search thread 3 finish writing the date .
Search thread 2 begins to write the date .
Search thread 2 finish writing the date .
Search thread 3 begins to write the date .
Search thread 3 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "11".
Display thread 4 finishes outputting prime num .
Display thread 5 begins to output prime num .
----------Display thread 5 output the prime num "13".
Display thread 5 finishes outputting prime num .
Search thread 2 begins to write the date .
Search thread 2 finish writing the date .
Search thread 3 begins to write the date .
Search thread 3 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "7".
Display thread 4 finishes outputting prime num .
Display thread 5 begins to output prime num .
----------Display thread 5 output the prime num "7".
Display thread 5 finishes outputting prime num .
Search thread 3 begins to write the date .
Search thread 3 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "11".
Display thread 4 finishes outputting prime num .
Display thread 5 begins to output prime num .
----------Display thread 5 output the prime num "17".
Display thread 5 finishes outputting prime num .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Search thread 3 begins to write the date .
Search thread 3 finish writing the date .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Search thread 3 begins to write the date .
Search thread 3 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "23".
Display thread 4 finishes outputting prime num .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "31".
Display thread 4 finishes outputting prime num .
Search thread 3 begins to write the date .
Search thread 3 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "19".
Display thread 4 finishes outputting prime num .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "37".
Display thread 4 finishes outputting prime num .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "41".
Display thread 4 finishes outputting prime num .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "43".
Display thread 4 finishes outputting prime num .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "47".
Display thread 4 finishes outputting prime num .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "53".
Display thread 4 finishes outputting prime num .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "59".
Display thread 4 finishes outputting prime num .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "61".
Display thread 4 finishes outputting prime num .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "67".
Display thread 4 finishes outputting prime num .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "71".
Display thread 4 finishes outputting prime num .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "73".
Display thread 4 finishes outputting prime num .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "79".
Display thread 4 finishes outputting prime num .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "83".
Display thread 4 finishes outputting prime num .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "13".
Display thread 4 finishes outputting prime num .
Display thread 4 begins to output prime num .
----------Display thread 4 output the prime num "29".
Display thread 4 finishes outputting prime num .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
Search thread 1 begins to write the date .
Search thread 1 finish writing the date .
All search and display thread have finished Operating.
The array at last.
 89  97  0  19  3  3  5  5  17

Press any key to finish this Program.
Thank you test this Program!
程序運(yùn)行過(guò)程中,線程1、線程2、線程3為找素?cái)?shù)線程,線程4、線程5負(fù)責(zé)顯示,它們均交叉訪問(wèn)臨界區(qū),程序運(yùn)行結(jié)果完全正確。
五、實(shí)踐體會(huì)
 該實(shí)驗(yàn)與實(shí)驗(yàn)四相比,只是用軟件的方法來(lái)實(shí)現(xiàn)內(nèi)核對(duì)象的功能,只須細(xì)心就能順利完成任務(wù)。
 通過(guò)實(shí)驗(yàn)我基本了解了P、V操作的具體實(shí)現(xiàn),以及有限緩沖區(qū)問(wèn)題的解決方法。
七、參考文獻(xiàn)
1、MSDN
2、《操作系統(tǒng)概念(第六版 影印版)》,Abraham Silberschatz、Peter Baer Galvin、Greg Gagne,
高等教育出版社

附:源程序部分關(guān)鍵代碼
void P(LPCTSTR lpcstr,int &count)
{
 HANDLE h_s1,h_s2;
 if(strcmp(lpcstr,"Empty") == 0)
 {
  h_s1=OpenSemaphore(SEMAPHORE_ALL_ACCESS,FALSE,"Bin_S1_Empty");
  h_s2=OpenSemaphore(SEMAPHORE_ALL_ACCESS,FALSE,"Bin_S2_Empty");
 }
 else if(strcmp(lpcstr,"Full") == 0)
 {
  h_s1=OpenSemaphore(SEMAPHORE_ALL_ACCESS,FALSE,"Bin_S1_Full");
  h_s2=OpenSemaphore(SEMAPHORE_ALL_ACCESS,FALSE,"Bin_S2_Full");
 }
 
 WaitForSingleObject(h_s1, INFINITE);

 count--;

 if (count < 0)
 {
  ReleaseSemaphore(h_s1, 1, NULL);
  WaitForSingleObject(h_s2, INFINITE);
 }

 ReleaseSemaphore(h_s1, 1, NULL);

 CloseHandle(h_s1);
 CloseHandle(h_s2);

}

void V(LPCTSTR lpcstr,int &count)
{
 HANDLE h_s1,h_s2;
 if(strcmp(lpcstr,"Empty") == 0)
 {
  h_s1=OpenSemaphore(SEMAPHORE_ALL_ACCESS,FALSE,"Bin_S1_Empty");
  h_s2=OpenSemaphore(SEMAPHORE_ALL_ACCESS,FALSE,"Bin_S2_Empty");
 }
 else if(strcmp(lpcstr,"Full") == 0)
 {
  h_s1=OpenSemaphore(SEMAPHORE_ALL_ACCESS,FALSE,"Bin_S1_Full");
  h_s2=OpenSemaphore(SEMAPHORE_ALL_ACCESS,FALSE,"Bin_S2_Full");
 }
 
 WaitForSingleObject(h_s1, INFINITE);

 count++;

 if (count <= 0)
 {
  ReleaseSemaphore(h_s2, 1, NULL);
 }
 else
 {
  ReleaseSemaphore(h_s1, 1, NULL);
 }
 CloseHandle(h_s1);
 CloseHandle(h_s2);

}

任務(wù)六  LINUX下以原生方式查看軟盤信息
一、基本信息
實(shí)踐題目:在LINUX下以原生(raw)方式查看軟盤的信息
二、實(shí)踐內(nèi)容簡(jiǎn)要描述
實(shí)踐目標(biāo):
熟悉Linux操作系統(tǒng)下的基本操作及其程序設(shè)計(jì)的基本方法。
學(xué)會(huì)在LINUX下使用原生方式查看軟盤上的數(shù)據(jù)信息。
實(shí)踐內(nèi)容:
在LINUX下使用原生方式查詢并顯示目前磁盤的以下信息:
-每扇區(qū)字節(jié)數(shù)
-每磁道扇區(qū)數(shù)
-每柱面的磁道數(shù)(磁頭數(shù))
三、實(shí)踐報(bào)告主要內(nèi)容
設(shè)計(jì)思路:
只要正確定位文件的讀取位置并確定所需讀取的字節(jié)數(shù)便可以正確讀取軟盤上的數(shù)據(jù),先用open函數(shù)以只讀方式打開軟盤,再用lseek定位讀取位置,然后用read讀取相應(yīng)字節(jié)的數(shù)據(jù)即可。
主要數(shù)據(jù)結(jié)構(gòu):
 int fd;     //文件描述符
 size_t num_read;
 int bytes_per_sector = 0;  //每扇區(qū)字節(jié)數(shù)
 int sectors_per_track = 0;  //每磁道扇區(qū)數(shù)
 int number_of_surface = 0;  //每柱面的磁道數(shù)(磁頭數(shù))
 int * pi;  //指向文件緩沖區(qū)的指針
 pi = &bytes_per_sector;
 pi = &sectors_per_track;
 pi = &number_of_surface;
主要代碼分析: 詳見(jiàn)代碼注釋。
四、實(shí)踐結(jié)果
基本數(shù)據(jù):
 
源程序代碼行數(shù) 完成實(shí)踐投入的總時(shí)間 資料查閱時(shí)間 編程調(diào)試時(shí)間 源程序文件    
43 0.5小時(shí) 0.4小時(shí) 0.1小時(shí) ex6.cpp  
測(cè)試數(shù)據(jù)設(shè)計(jì):
3.5寸軟盤一張。
測(cè)試結(jié)果分析:
程序運(yùn)行結(jié)果為:
Bytes per sector: 512
Sectors per track: 18
Number of surfaces:: 2
程序運(yùn)行結(jié)果完全正確。
五、實(shí)踐體會(huì)
 以原生方式讀取磁盤信息時(shí),將磁盤當(dāng)作一個(gè)文件打開,要正確定位文件的讀取位置,并確定讀取字節(jié)數(shù),這樣便能從中讀取相應(yīng)數(shù)據(jù)。通過(guò)實(shí)驗(yàn),了解了軟盤上BOOT的布局,并熟悉了Linux操作系統(tǒng)下程序設(shè)計(jì)的基本方法和基本操作。
六、參考文獻(xiàn)
1、《Linux基礎(chǔ)教程》,黃慶生 吳振華 蘇哲 編著,人民郵電出版社
附:源程序代碼
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>

int main()
{
 //每扇區(qū)字節(jié)數(shù)   0x0b-0x0c  11 - 12
 //每磁道扇區(qū)數(shù)   0x18-0x19  24 - 25
 //每柱面的磁道數(shù) 0x1a-0x1b  26 – 27

 int fd;
 size_t num_read;
 int bytes_per_sector   = 0;
 int sectors_per_track  = 0;
 int number_of_surface  = 0;

 int * pi;
 fd = open("/dev/fd0", O_RDONLY);

 pi = &bytes_per_sector;
 lseek(fd,(off_t)11,SEEK_SET);
 num_read = read(fd,(void *)pi,(size_t)2);
 printf("Bytes per sector: %d\n",bytes_per_sector);

 pi = &sectors_per_track;
 lseek(fd,(off_t)24,SEEK_SET);
 num_read = read(fd,(void *)pi,(size_t)2);
 printf("Sectors per track: %d\n",sectors_per_track);

 pi = &number_of_surface;
 lseek(fd,(off_t)26,SEEK_SET);
 num_read = read(fd,(void *)pi,(size_t)2);
 printf("Number of surfaces: %d\n",number_of_surface);
 return 0; 
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女网站色91| 久久一日本道色综合| 中文子幕无线码一区tr| 天天做天天摸天天爽国产一区 | 在线电影国产精品| 欧美日韩一区二区欧美激情| 国产蜜臀av在线一区二区三区| 国产一区二区三区精品欧美日韩一区二区三区 | 在线观看免费亚洲| 欧美一区二区三区视频免费播放| 久久99精品久久久久久国产越南 | 国产成人在线色| 国产在线播精品第三| 色嗨嗨av一区二区三区| 亚洲精品一区二区三区福利| 7777精品伊人久久久大香线蕉完整版 | 午夜av区久久| 一区二区三区资源| 久久伊人蜜桃av一区二区| 国产在线看一区| 成人99免费视频| 欧美电影精品一区二区| 欧美三级中文字| 精品不卡在线视频| 中文字幕亚洲欧美在线不卡| 欧美大片顶级少妇| 91在线视频观看| 综合亚洲深深色噜噜狠狠网站| 日韩欧美国产一区在线观看| 欧美日韩一区高清| 成人av免费在线播放| 欧美tickle裸体挠脚心vk| 一区二区三区在线不卡| 一区二区三区不卡在线观看| 国产伦精品一区二区三区免费| 欧美色综合网站| 91麻豆国产精品久久| 色美美综合视频| 亚洲在线视频免费观看| 亚洲美女屁股眼交3| 国产成人午夜电影网| 色88888久久久久久影院按摩| av午夜精品一区二区三区| 久久欧美中文字幕| 国产成人av影院| 免费在线成人网| 久久色.com| 国产女同性恋一区二区| 奇米影视在线99精品| 91精品婷婷国产综合久久| 亚洲一区在线视频观看| 色婷婷av一区二区三区gif| 国产精品久久久久久久第一福利 | 一区二区成人在线| 中文字幕一区二区视频| 91网站最新地址| 在线一区二区三区做爰视频网站| 一区二区三区久久| 全部av―极品视觉盛宴亚洲| 国产精品亚洲成人| 亚洲一区二区三区四区的| 蜜桃视频一区二区三区 | 午夜精品一区二区三区三上悠亚 | 99riav一区二区三区| 中文乱码免费一区二区 | 国产精品无遮挡| 一本久道久久综合中文字幕| 日产国产欧美视频一区精品| 欧美日韩三级视频| 欧美精品一区二区三区蜜桃| 天天色天天操综合| 日本精品免费观看高清观看| 国产精品久久久久一区| 在线不卡中文字幕| 亚洲国产毛片aaaaa无费看| 久久久高清一区二区三区| 激情综合色播激情啊| 综合婷婷亚洲小说| 久久黄色级2电影| 六月丁香综合在线视频| 欧美高清视频不卡网| 久久成人久久鬼色| 欧美主播一区二区三区| av动漫一区二区| 久久综合九色综合久久久精品综合| 精品综合久久久久久8888| 久久亚洲精品小早川怜子| 国产麻豆精品一区二区| 亚洲成人av中文| 亚洲成人一区在线| 亚洲午夜av在线| 91色综合久久久久婷婷| 午夜精品久久久久久久99樱桃| 久久久777精品电影网影网| 高清av一区二区| 亚洲精品在线观| 高清日韩电视剧大全免费| 国产盗摄精品一区二区三区在线| 另类人妖一区二区av| 亚洲视频一二三区| 亚洲九九爱视频| 欧美日韩久久不卡| 天天综合网天天综合色| 中文字幕在线观看一区二区| 久久一日本道色综合| 久久久亚洲国产美女国产盗摄 | 国产精品1区2区3区| 三级在线观看一区二区| 美女精品自拍一二三四| 一区二区三区av电影| 亚洲国产精品影院| 日韩欧美激情四射| 亚洲一区二区视频在线| 午夜精品久久久久久久久久久| 欧美激情中文字幕一区二区| 欧美一区欧美二区| 国产精品久久久久国产精品日日| 国产欧美va欧美不卡在线| 亚洲香肠在线观看| 777亚洲妇女| 成人av在线播放网址| 丁香天五香天堂综合| 欧美日韩国产免费一区二区| 91.com视频| 精品福利二区三区| 欧美性生交片4| 尤物视频一区二区| 欧美国产在线观看| 精品欧美一区二区久久| 一二三区精品福利视频| 丝袜美腿高跟呻吟高潮一区| 爽爽淫人综合网网站| 99re热视频精品| 国产69精品久久久久毛片| 成人午夜伦理影院| 美女性感视频久久| 亚洲一二三级电影| 一区二区三区毛片| 亚洲私人黄色宅男| 国产精品网站在线播放| 成人黄色电影在线| 国产精品一区三区| 国产麻豆精品久久一二三| 精品理论电影在线| 日韩欧美一级精品久久| 久久电影网电视剧免费观看| 在线免费观看成人短视频| 亚洲欧洲另类国产综合| 成人精品小蝌蚪| av亚洲精华国产精华| 精品国产三级a在线观看| 九色porny丨国产精品| 精品国产一区二区三区忘忧草| 国产日韩欧美不卡| 中文字幕成人在线观看| 免费欧美在线视频| 国产精品美女一区二区三区| 综合久久一区二区三区| av资源网一区| 欧美男生操女生| 精品av久久707| 欧美色男人天堂| 不卡av免费在线观看| 视频一区在线视频| 国产精品卡一卡二卡三| 国产在线不卡一区| 成人精品一区二区三区四区| 日韩欧美国产系列| 国产精品欧美久久久久一区二区| gogo大胆日本视频一区| 亚洲一区二区黄色| 国产激情一区二区三区四区 | 国产综合一区二区| 在线观看91精品国产入口| 懂色av一区二区夜夜嗨| 日韩精品1区2区3区| 日韩一区二区三免费高清| 91首页免费视频| 久久伊人中文字幕| 7777精品伊人久久久大香线蕉的| 高清久久久久久| 不卡的电影网站| 91美女片黄在线| 色欧美片视频在线观看| 成人午夜看片网址| 欧美精品一区二区三区在线| 欧美一区二区视频观看视频| 精品一区二区久久| 国产精品 欧美精品| 亚洲图片一区二区| 婷婷开心激情综合| 色婷婷国产精品| 国产精品成人一区二区三区夜夜夜| 91久久香蕉国产日韩欧美9色| 国产高清无密码一区二区三区| 国产三级精品三级在线专区| 欧美tickling挠脚心丨vk| 欧美一级片在线观看| 成人动漫视频在线| 国产精品对白交换视频 |