文件名称:xianchengtongbu
- 所属分类:
- 数据结构常用算法
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 2.44mb
- 下载次数:
- 0次
- 提 供 者:
- 小*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
在访问临界区的问题当中,因为临界区在一个时间只允许一个进程访问,因此为了解决同步问题,我们要用到线程同步机制。首先创建两个共享数据资源的并发线程。在没有同步控制机制的情况下,观察某些异常现象。针对这样的问题,采用两个解决方案:①利用Windows和mutex机制,②采用软件方案,并比较这两种方案的性能优劣。-During his visit to these critical areas, as critical a time in a process only allows access to, so in order to solve the synchronization problem, we need to thread synchronization mechanism. First of all, sharing of data resources to create two concurrent threads. In the absence of synchronization control mechanism, the observation of certain anomalies. For such problems, the use of two solutions: ① the use of Windows and mutex mechanism, ② the use of software programs, and compare the performance of both the merits of the program.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
线程同步机制
............\可执行系统
............\实验报告文档.doc
............\源程序
............\......\1.Without_mutex
............\......\...............\1.Without_mutex.cpp
............\......\...............\1.Without_mutex.dsp
............\......\...............\1.Without_mutex.dsw
............\......\...............\1.Without_mutex.ncb
............\......\...............\1.Without_mutex.opt
............\......\...............\1.Without_mutex.plg
............\......\...............\Debug
............\......\...............\.....\1.Without_mutex.exe
............\......\...............\.....\1.Without_mutex.ilk
............\......\...............\.....\1.Without_mutex.obj
............\......\...............\.....\1.Without_mutex.pch
............\......\...............\.....\1.Without_mutex.pdb
............\......\...............\.....\vc60.idb
............\......\...............\.....\vc60.pdb
............\......\...............\hlp
............\......\...............\hunluan.ncb
............\......\...............\hunluan.opt
............\......\...............\ReadMe.txt
............\......\...............\res
............\......\...............\StdAfx.cpp
............\......\...............\StdAfx.h
............\......\2.With_mutex_ByWin
............\......\..................\2.With_mutex_ByWin.cpp
............\......\..................\2.With_mutex_ByWin.dsp
............\......\..................\2.With_mutex_ByWin.dsw
............\......\..................\2.With_mutex_ByWin.ncb
............\......\..................\2.With_mutex_ByWin.opt
............\......\..................\2.With_mutex_ByWin.plg
............\......\..................\Debug
............\......\..................\.....\2.With_mutex_ByWin.exe
............\......\..................\.....\2.With_mutex_ByWin.ilk
............\......\..................\.....\2.With_mutex_ByWin.obj
............\......\..................\.....\2.With_mutex_ByWin.pch
............\......\..................\.....\2.With_mutex_ByWin.pdb
............\......\..................\.....\vc60.idb
............\......\..................\.....\vc60.pdb
............\......\..................\hlp
............\......\..................\hunluan1.ncb
............\......\..................\hunluan1.opt
............\......\..................\ReadMe.txt
............\......\..................\res
............\......\..................\StdAfx.cpp
............\......\..................\StdAfx.h
............\......\3.With_mutex_ByPeterson
............\......\.......................\3.With_mutex_ByPeterson.cpp
............\......\.......................\3.With_mutex_ByPeterson.dsp
............\......\.......................\3.With_mutex_ByPeterson.dsw
............\......\.......................\3.With_mutex_ByPeterson.ncb
............\......\.......................\3.With_mutex_ByPeterson.opt
............\......\.......................\3.With_mutex_ByPeterson.plg
............\......\.......................\Debug
............\......\.......................\.....\3.With_mutex_ByPeterson.exe
............\......\.......................\.....\3.With_mutex_ByPeterson.ilk
............\......\.......................\.....\3.With_mutex_ByPeterson.obj
............\......\.......................\.....\3.With_mutex_ByPeterson.pch
............\......\.......................\.....\3.With_mutex_ByPeterson.pdb
............\......\.......................\.....\StdAfx.obj
............\......\.......................\.....\vc60.idb
............\......\.......................\.....\vc60.pdb
............\......\.......................\hlp
............\......\.......................\hunluan2.ncb
............\......\.......................\hunluan2.opt
............\......\.......................\ReadMe.txt
............\......\.......................\res
............\......\.......................\StdAfx.cpp
............\......\.......................\StdAfx.h
............\可执行系统
............\实验报告文档.doc
............\源程序
............\......\1.Without_mutex
............\......\...............\1.Without_mutex.cpp
............\......\...............\1.Without_mutex.dsp
............\......\...............\1.Without_mutex.dsw
............\......\...............\1.Without_mutex.ncb
............\......\...............\1.Without_mutex.opt
............\......\...............\1.Without_mutex.plg
............\......\...............\Debug
............\......\...............\.....\1.Without_mutex.exe
............\......\...............\.....\1.Without_mutex.ilk
............\......\...............\.....\1.Without_mutex.obj
............\......\...............\.....\1.Without_mutex.pch
............\......\...............\.....\1.Without_mutex.pdb
............\......\...............\.....\vc60.idb
............\......\...............\.....\vc60.pdb
............\......\...............\hlp
............\......\...............\hunluan.ncb
............\......\...............\hunluan.opt
............\......\...............\ReadMe.txt
............\......\...............\res
............\......\...............\StdAfx.cpp
............\......\...............\StdAfx.h
............\......\2.With_mutex_ByWin
............\......\..................\2.With_mutex_ByWin.cpp
............\......\..................\2.With_mutex_ByWin.dsp
............\......\..................\2.With_mutex_ByWin.dsw
............\......\..................\2.With_mutex_ByWin.ncb
............\......\..................\2.With_mutex_ByWin.opt
............\......\..................\2.With_mutex_ByWin.plg
............\......\..................\Debug
............\......\..................\.....\2.With_mutex_ByWin.exe
............\......\..................\.....\2.With_mutex_ByWin.ilk
............\......\..................\.....\2.With_mutex_ByWin.obj
............\......\..................\.....\2.With_mutex_ByWin.pch
............\......\..................\.....\2.With_mutex_ByWin.pdb
............\......\..................\.....\vc60.idb
............\......\..................\.....\vc60.pdb
............\......\..................\hlp
............\......\..................\hunluan1.ncb
............\......\..................\hunluan1.opt
............\......\..................\ReadMe.txt
............\......\..................\res
............\......\..................\StdAfx.cpp
............\......\..................\StdAfx.h
............\......\3.With_mutex_ByPeterson
............\......\.......................\3.With_mutex_ByPeterson.cpp
............\......\.......................\3.With_mutex_ByPeterson.dsp
............\......\.......................\3.With_mutex_ByPeterson.dsw
............\......\.......................\3.With_mutex_ByPeterson.ncb
............\......\.......................\3.With_mutex_ByPeterson.opt
............\......\.......................\3.With_mutex_ByPeterson.plg
............\......\.......................\Debug
............\......\.......................\.....\3.With_mutex_ByPeterson.exe
............\......\.......................\.....\3.With_mutex_ByPeterson.ilk
............\......\.......................\.....\3.With_mutex_ByPeterson.obj
............\......\.......................\.....\3.With_mutex_ByPeterson.pch
............\......\.......................\.....\3.With_mutex_ByPeterson.pdb
............\......\.......................\.....\StdAfx.obj
............\......\.......................\.....\vc60.idb
............\......\.......................\.....\vc60.pdb
............\......\.......................\hlp
............\......\.......................\hunluan2.ncb
............\......\.......................\hunluan2.opt
............\......\.......................\ReadMe.txt
............\......\.......................\res
............\......\.......................\StdAfx.cpp
............\......\.......................\StdAfx.h