(p)lvm is the world only parallel multi-instance virtual machine supporting the original Communicating Sequential Processes model following the Hoare semantics supporting additional concurrency! (p)lvm supports multi-processing, multi-threading, and fibers. And the fully self-contained program lvm is about 1MB size only! Available for multiple operating systems.
The advantage of the Lua VM under the hood is the full support of process blocking and process switching in threads and fibers (co-routines).
To use the parallel processing features open the Csp module:
require 'Csp'
log('Creating Par..')
Par({
function ()
sync:await()
log('1: Thinking')
fork1:down()
fork2:down()
log('1: Eating')
sleep(500)
fork1:up()
fork2:up()
end,
function ()
sync:await()
log('2: Thinking')
fork2:down()
fork1:down()
log('2: Eating')
sleep(500)
fork2:up()
fork1:up()
end,
function ()
sync:await()
log('3: Thinking')
fork2:down()
fork1:down()
log('3: Eating')
sleep(500)
fork2:up()
fork1:up()
end
},{
sync=Barrier(3),
fork1=Semaphore(1),
fork2=Semaphore(1)
})
log('After Par ..')
Hinweis: Unter Linux müssen heruntergeladene Programme ausführbar gemacht werden:
chmod a+x lvm
File | Version | Description |
---|---|---|
lvm | LVM 1.1.7 LuaJIT+ 2.0.5X2.3 Lua 5.1X2.1 LUV 2.7.3 -- Build Jun 03 2021 | Parallel LuaJit VM, Linux x86 32bit |
lvm | LVM 1.1.7 LuaJIT+ 2.0.5X2.3 Lua 5.1X2.1 LUV 2.7.2 -- Build Jul 07 2020 | Parallel LuaJit VM, Linux x64 64bit |
lvm | LVM 1.1.7 LuaJIT+ 2.0.5X2.3 Lua 5.1X2.1 LUV 2.7.3 -- Build Jun 03 2021 | Parallel LuaJit VM, Solaris (11.3) x86 32bit |
lvm.exe | LVM 1.1.7 LuaJIT+ 2.0.5X2.3 Lua 5.1X2.1 LUV 2.7.3 -- Build Jun 03 2021 | Parallel LuaJit VM, Windows 32bit |
lvm | LVM 1.1.7 LuaJIT+ 2.0.5X2.3 Lua 5.1X2.1 LUV 2.7.2 -- Build Jul 09 2020 | Parallel LuaJit VM, Mac OSX (>10.7) 64bit |
weblvm.lua | 1.1.8 | WEB Server for lvm |
dhrystoneX.html | 30.10.19 | Dhrystone Benchmark (requires Browser) |
jystone.js | 30.10.19 | Dhrystone Benchmark (requires nodejs) |
pystone.py | 30.10.19 | Dhrystone Benchmark (requires python) |
lystone.lua | 30.10.19 | Dhrystone Benchmark (requires luajit/lua/lvm) |
dhry | 7.11.19 | Dhrystone Benchmark (native C), Linux x86 |