摘要
文中以经典的Candy & Lamport全局快照算法为例,介绍一种基于Socket和Sleep语句的对延迟通道进行模拟、基于Monte-Carlo仿真产生测试数据和标准答案的方法,它可以在单机环境下产生随机测试数据和对应的标准答案,同时可以模拟带有延迟的数据通道,从而有效地支持对分布式系统和分布式算法的测试.
Take the classic Candy&Lamport snapshot algorithm as an example,this paper provides a solution of simulation of delayed channel based on Socket and Sleep statement and a method to generate random test data along with corresponding standard answer using Monte-Carlo simulation,which can supply the random test and corresponding standard answer in stand-alone microcomputer,at the same time,simulating the delayed channel,therefore supporting the testing to distributed systems and distributed algorithms.
出处
《微电子学与计算机》
CSCD
北大核心
2008年第9期95-97,101,共4页
Microelectronics & Computer
基金
国家自然科学基金项目