⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex1.sc

📁 基于chord算法的p2p文件系统。A p2p file system based on chord.
💻 SC
字号:
# NOTE: the simulation may take up to 30 min depending on the machine# create a network with 1,000 nodes; a new node joins every # second on average ...events 1000 1000 100 0 0 0 0 # ... wait 1 min for network to stabilize ...wait 60000# ... insert 1,000 documents; one document is inserted every # 100 ms on average ...events 1000 100 0 0 0 100 0 # ... wait another minute for network to stabilize ...wait 60000# ... generate 10,000 events; one event every 714 ms on average# - a join event is generated with prob 10/(10+10+20+100) = 1/14# - a leave event is generated with prob 1/14# - a document insertion is generated with prob 1/7# - a document query is generated with prob 5/7# Note: constants are choosen such that a node joins (leaves) # every 10 seconds on averageevents 10000 714 10 10 0 20 100# ... wait for all pending requests to finish ...wait 60000# ... terminateexit

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -