Posted: Sun Jun 15, 2008 1:00 am
Ah, hardware bangers. You think too much in terms of performance, and far, far too much in terms of the status quo.
YES, such a language would reduce the need for mode-switching. But the really useful thing is to express the entire interface exposed by the kernel to the process in this language. Why write a syscall to get the current process ID when the kernel will interpret the identifier "Application" in a script as referring to a Process object representing the current/running/calling process? Likewise for security and IPC: security is just a matter of what other processes or processes' objects have names in the current process's script namespace, and IPC is just a matter of naming another process in a script and invoking an operator on that process to send data to it.
The idea is to build a domain-specific language especially suited to getting done, elegantly and efficiently, those tasks reserved for kernel-space. Doing so would allow not only a reduction in the number of user/kernel switches, but would allow a reduction of complexity of the kernel operations themselves. For example, there would be no need to supply separate blocking and unblocking I/O operations. If the application will either send a script that just says:
if it wants asynchronous operation, or:
to perform the same operation synchronously (if we assume that an I/O operation finishing wakes the appropriate process/thread).
YES, such a language would reduce the need for mode-switching. But the really useful thing is to express the entire interface exposed by the kernel to the process in this language. Why write a syscall to get the current process ID when the kernel will interpret the identifier "Application" in a script as referring to a Process object representing the current/running/calling process? Likewise for security and IPC: security is just a matter of what other processes or processes' objects have names in the current process's script namespace, and IPC is just a matter of naming another process in a script and invoking an operator on that process to send data to it.
The idea is to build a domain-specific language especially suited to getting done, elegantly and efficiently, those tasks reserved for kernel-space. Doing so would allow not only a reduction in the number of user/kernel switches, but would allow a reduction of complexity of the kernel operations themselves. For example, there would be no need to supply separate blocking and unblocking I/O operations. If the application will either send a script that just says:
Code: Select all
Application.perform_io(file,data,options)
Code: Select all
let result = Application.perform_io(file,data,options)
block
return result