Hello,
2012/6/21 Niek Linnenbank <
nieklin...@gmail.com>:
> I'm interested to hear more about the YanaKernel0 you are talking about.
> What kind of system is it, exactly? I've looked at the
yana.jp homepage,
> but I couldn't find any (english) documentation on the system.
Thank you for being interested in YanaKernel0 and "
yana.jp".
There is not English documentation, but the following link may help
understanding.
http://groups.google.com/group/minix3/browse_thread/thread/b37eb23f02b65bb0
I introduce YanaKernel0A in C with reference to MINIX 3.2.0.
Keywords of YanaKernel0 are simple, resource limited, and hardware
implementable.
I implemented YanaKernel0A in C language (and assembly language).
I want to implement YanaKernel0 by hardware, but not yet.
And I want to use task which was implemented by hardware.
* execution
About YanaKernel0, processor executes kernel or task.
YanaKernel0A in C is executed on ARM and MIPS.
About MINIX, processor executes kernel(and tasks) or process.
MINIX 3.2.0 is executed on x86.
* exception and interrupt
About YanaKernel0A in C, kernel handles exceptions like
YK0A_PROCEDURE_FORWARD (task passing), and task can manage task which
caused exception.
kernel handles interrupts like YK0A_PROCEDURE_BIT_FLAG, and task can
synchronize with interrupt.
About MINIX 3.2.0, kernel handles exceptions as pagefault, panic,
signal and the others, and process can not manage process which caused
exception.
kernel handles interrupts (except clock) as message passing, and
process can synchronize with interrupt.
* resource
About YanaKernel0, inside of kernel uses only the following resources.
+ processor
+ memory
+ interrupt controller (in the case of ARM)
Using disassembler, I checked stack size of kernel.
> | ARM | 48 bytes | CC="arm-elf-gcc -O2" make |
> | MIPS | 8 bytes | CC="mips-elf-gcc -O2" make |
YanaKernel0 may support real-time system, but I do not check
worst-case execution time of kernel.
MINIX kernel uses the following resources, but YanaKernel0 kernel does
not use it.
+ FPU
+ MMU
+ clock
+ serial (for debug)
* memory
About YanaKernel0, inside of kernel accesses only memories of kernel.
MINIX kernel accesses memories of process, but YanaKernel0 kernel does
not access memories of task.
For example, there is computer system with the following memories.
+ internal memories which are exceptionless and waitless
+ external memories which are exceptionable and waitable
About YanaKernel0, if kernel is allocated internal memories, memory
accesses of kernel are exceptionless and waitless even if task is
allocated external memories.
About MINIX, if process is allocated external memories, memory
accesses of kernel are exceptionable and waitable even if kernel is
allocated internal memories.
* message buffer
About sample echo2 of YanaKernel0A in C, server(task1) communicates
with client(task2) by message buffer which uses registers of task.
Kernel copy (or swap) register which is not related to memory
management about YK0A_PROCEDURE_GET_CONTEXT (or
YK0A_PROCEDURE_SET_CONTEXT).
About MINIX, server communicates with client by message buffer which
uses memories of process.
Kernel copy memories which is related to memory management about
message passing.
For example, the following process is finished normally about MINIX
3.1.3a (segmented virtual memory), and is not finished normally about
MINIX 3.2.0 (paged virtual memory).
> #include <minix/type.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <unistd.h>
> #include <minix/callnr.h>
> #include <minix/com.h>
> #include <minix/ipc.h>
> message m;
> int main(int argc, char *argv[]) {
> m.m1_i1 = -1;
> m.m1_i2 = 0;
> m.m_type = GETPROCNR;
> if (fork() == -1) { /* demand paging */
> return EXIT_FAILURE;
> }
> if (sendrec(PM_PROC_NR, &m) != 0) {
> return EXIT_FAILURE;
> }
> if (m.m_type < 0) {
> return EXIT_FAILURE;
> }
> printf("getprocnr %d\n", m.m1_i1);
> return EXIT_SUCCESS;
> }
* interrupt latency
About MINIX with YanaKernel0, YanaKernel0 kernel handles exceptions
and interrupts directly, MINIX kernel is executed as a task of
YanaKernel0.
About MINIX without YanaKernel0, MINIX kernel handles exceptions and
interrupts directly, YanaKernel0 kernel is not executed.
Interrupt latency about task of YanaKernel0 seems to become smaller
than interrupt latency about process of MINIX without YanaKernel0.
And interrupt latency about process of MINIX without YanaKernel0 is
smaller than interrupt latency about process of MINIX with
YanaKernel0.
Thanks,
Yana