4871
Mach4 General Discussion / Re: Mach 4 stops processing gcode
« on: April 06, 2018, 03:49:02 PM »
Hi,
in a sense if Mach did not read ahead it wouldn't work.
Windows is not a realtime computing platform. Thus any software like Mach will be interrupted while Windows goes off and services other programs or services as required and then return to Mach.
There is no set schedule as to when Mach is abandoned nor is there any guaranty how long it will be abandoned for. If Mach is starved of service for too long Mach will pause and your machine will
stall wrecking the job in progress.
The solution is to read ahead so that Mach can carry on when it loses CPU service and hopefully is still running when CPU service is restored.
The mechanism that causes the CPU to transfer its focus is the 'interrupt system'. There are many levels of priority amongst interrupts and additionally Windows uses interrupts to signal between threads.
All in all it is not possible to make Windows into a realtime system as that would require a totally different interrupt structure which would hoplessly break Windows.
There is a clever solution, it is a software system which uses one core of a multicore CPU to run a genuine realtime scheduler while the remaining cores run Windows as normal. Unfortunately such a system
is way too expensive for hobby use.
Linux can with certain extensions, called realtime extensions, can be made into a realtime computing platform and LinuxCNC makes very good use of it.
Craig
in a sense if Mach did not read ahead it wouldn't work.
Windows is not a realtime computing platform. Thus any software like Mach will be interrupted while Windows goes off and services other programs or services as required and then return to Mach.
There is no set schedule as to when Mach is abandoned nor is there any guaranty how long it will be abandoned for. If Mach is starved of service for too long Mach will pause and your machine will
stall wrecking the job in progress.
The solution is to read ahead so that Mach can carry on when it loses CPU service and hopefully is still running when CPU service is restored.
The mechanism that causes the CPU to transfer its focus is the 'interrupt system'. There are many levels of priority amongst interrupts and additionally Windows uses interrupts to signal between threads.
All in all it is not possible to make Windows into a realtime system as that would require a totally different interrupt structure which would hoplessly break Windows.
There is a clever solution, it is a software system which uses one core of a multicore CPU to run a genuine realtime scheduler while the remaining cores run Windows as normal. Unfortunately such a system
is way too expensive for hobby use.
Linux can with certain extensions, called realtime extensions, can be made into a realtime computing platform and LinuxCNC makes very good use of it.
Craig