It is difficult to make boundaries on what’s running on kernel mode in the AmigaOS because of the type of kernel choose on AmigaOS: exo-kernel . That’s to postponed interrupt task or immediate task which normally runs the kernel(traps) to user mode. This is done,
By the means of signal and message passing to delegate or differed job to ‘lower’ task priority.
So (perhaps I’m slightly wrong) except immediate task (interrupt routine which have superuser mode set on CPU) all tasks running above 5(AmigaDOS handler task) are considered ´kernel’ code.
Then it’s nice not to set a common program not above 4 with a changetaskpri AmigaDOS command. Normally, iirm Workbench is 1 in priority.
A nice Unix command equivalent to AmigaDOS nice is to decrease priority of task to -1 negative value.
Alternatively if you want your application to go faster there’s the solution to set 1 to 4 in priorities but at your own risk, above 4: 5-10-20 are considered or equivalent Unix to kernel rings of literature (in Unix books..).
We have critical code in disable()/enable() kernel code but even with multicore, we have to keep them very short time, so spinlock at this level are perhaps not the solution.
For ´normal’ kernel mode we have forbid()/permit() to stops multitasking; here we can use spinlock but the ideal would be not to stops multitasking on all cores. Isn’t it?
Despite we have not to use spinlock for user.
And have a true message passing for Send()/SendIO() which duplicates data message (up to 64Ko limits) to avoid race condition (or ) when Send() is done to a task on different core; between cores. That’s the difficulty! How to detect task belonging to a core or even migrating to another core during its lifetime..
DGILLES - os4depot.net 18/12/2022
This forum is for general developer support questions.
1 post • Page 1 of 1