Page 1 of 1
Artificial Intelligence
Posted: Tue Apr 05, 2022 6:37 pm
by wxwisiasdf
Hi.
Out of curiosity, has anyone tried to implement AI on their operating systems? With AI I mean stuff that can "learn" (more of a neural network then?). On any context, be it autocompletion, "assisted edition", or even low level stuff such as device recognition.
Of course myself haven't done one - because realistically, it's almost impossible to make one from the ground up (at least from my perspective, which might be, probably skewed from reality), and also because I really see no use on it except for big corporations which needs to do stuff with machine learning.
But others may have done so?, If so, which are the primary examples of it? It would be interesting to see in what they differ against normal OSes, and if they exist at all.
Re: Artificial Intelligence
Posted: Wed Apr 06, 2022 6:56 am
by BigBuda
Maybe AI on the OS level could be used to optimize kernel algorithm parameters in order to adapt to their typical workloads, or to better diagnose and report problems, maybe even correct them...
Re: Artificial Intelligence
Posted: Wed Apr 06, 2022 2:34 pm
by pvc
Very, very simple form of AI exists in CPUs themselves, since quite some time. Branch predictors decide which execution path to follow based on previous 'experience'. Usually there are only few bits of information per branch instruction, but this is still a form of learning.
As for the kernel itself… cache optimization (whatever type of cache it may be) comes to mind.
Re: Artificial Intelligence
Posted: Wed Apr 06, 2022 6:04 pm
by wxwisiasdf
pvc wrote:Very, very simple form of AI exists in CPUs themselves, since quite some time. Branch predictors decide which execution path to follow based on previous 'experience'. Usually there are only few bits of information per branch instruction, but this is still a form of learning.
As for the kernel itself… cache optimization (whatever type of cache it may be) comes to mind.
Of course, and also they directly exist on the ISA itself for CPUs like z/Arch!
Re: Artificial Intelligence
Posted: Fri Apr 08, 2022 12:28 am
by Ethin
Not really sure how you'd accomplish this. Most AIs (from what I know anyway) operate using SSE/AVX or GPUs, and training an aI is not exactly a fast process.
Re: Artificial Intelligence
Posted: Fri Apr 08, 2022 1:34 am
by kzinti
1) Branch prediction is not AI. AI has nothing to do with branch prediction.
2) Training a AI model can be expensive (which is why you use GPUs), but you wouldn't have your kernel train an AI model. You would have your kernel use a pre-trained model (which is called inference).
3) Optimizing how parameters are passed to the kernel during system calls is NOT a good / possible use of AI.
4) Optimizing a caching algorithm based on workload seems like a more reasonable use of AI. More generically, AI could potentially be used for resource management (scheduling, memory / cache / swap file management, etc). But the AI model would have to be trained off-line, not at run-time in the kernel. Coming up with a model that works on all combination of hardware seems a rather non-trivial amount of work.
Re: Artificial Intelligence
Posted: Mon Apr 11, 2022 7:26 pm
by wxwisiasdf
kzinti wrote:1) Branch prediction is not AI. AI has nothing to do with branch prediction.
2) Training a AI model can be expensive (which is why you use GPUs), but you wouldn't have your kernel train an AI model. You would have your kernel use a pre-trained model (which is called inference).
3) Optimizing how parameters are passed to the kernel during system calls is NOT a good / possible use of AI.
4) Optimizing a caching algorithm based on workload seems like a more reasonable use of AI. More generically, AI could potentially be used for resource management (scheduling, memory / cache / swap file management, etc). But the AI model would have to be trained off-line, not at run-time in the kernel. Coming up with a model that works on all combination of hardware seems a rather non-trivial amount of work.
Inference? So kernels actually use pre-trained models? How, for what and who does it?
Re: Artificial Intelligence
Posted: Mon Apr 11, 2022 7:29 pm
by wxwisiasdf
Ethin wrote:Not really sure how you'd accomplish this. Most AIs (from what I know anyway) operate using SSE/AVX or GPUs, and training an aI is not exactly a fast process.
?, In such case then are there some Linux Drivers which do change codepaths or do something funky with the AI that is nearer to the kernel than an userland application?
Re: Artificial Intelligence
Posted: Mon Apr 11, 2022 7:39 pm
by Ethin
To my knowledge the Linux kernel (or, really, any OS kernel known today) does not implement any form of artificial intelligence or machine learning. As I said, I'm not even sure how you would even do that. There's a reason most really good AIs need super high-end systems.
Re: Artificial Intelligence
Posted: Mon Apr 11, 2022 10:43 pm
by kzinti
wxwisiasdf wrote:Inference? So kernels actually use pre-trained models? How, for what and who does it?
I never said anything like that.
Re: Artificial Intelligence
Posted: Tue May 03, 2022 1:44 am
by yasar11732
I was going through arxiv articles the other day and it seems there is some research effort to use machine learning on some OS topics.
This article suggests using machine learning to scan system logs to find abnormalities.
This one uses machine learning to tune SSD settings based on usage patterns.
There was also one article talking about using machine learning to optimize the scheduler but for some reason I can't find it again.
Edit: Found a similiar article
here