OSDev.org
https://forum.osdev.org/

Artificial Intelligence
https://forum.osdev.org/viewtopic.php?f=1&t=56207
Page 1 of 1

Author:  wxwisiasdf [ Tue Apr 05, 2022 6:37 pm ]
Post subject:  Artificial Intelligence

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.

Author:  BigBuda [ Wed Apr 06, 2022 6:56 am ]
Post subject:  Re: Artificial Intelligence

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...

Author:  pvc [ Wed Apr 06, 2022 2:34 pm ]
Post subject:  Re: Artificial Intelligence

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.

Author:  wxwisiasdf [ Wed Apr 06, 2022 6:04 pm ]
Post subject:  Re: Artificial Intelligence

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! :)

Author:  Ethin [ Fri Apr 08, 2022 12:28 am ]
Post subject:  Re: Artificial Intelligence

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.

Author:  kzinti [ Fri Apr 08, 2022 1:34 am ]
Post subject:  Re: Artificial Intelligence

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.

Author:  wxwisiasdf [ Mon Apr 11, 2022 7:26 pm ]
Post subject:  Re: Artificial Intelligence

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?

Author:  wxwisiasdf [ Mon Apr 11, 2022 7:29 pm ]
Post subject:  Re: Artificial Intelligence

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?

Author:  Ethin [ Mon Apr 11, 2022 7:39 pm ]
Post subject:  Re: Artificial Intelligence

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.

Author:  kzinti [ Mon Apr 11, 2022 10:43 pm ]
Post subject:  Re: Artificial Intelligence

wxwisiasdf wrote:
Inference? So kernels actually use pre-trained models? How, for what and who does it?

I never said anything like that.

Author:  yasar11732 [ Tue May 03, 2022 1:44 am ]
Post subject:  Re: Artificial Intelligence

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

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/