role of artificial intelligence

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
shahzad

role of artificial intelligence

Post by shahzad »

artificial intelligence can play an important role in memory management,file system and process management.

is there anyone who tried put some A.I in development of operating system.
Tim

Re:role of artificial intelligence

Post by Tim »

How so? And what sort of artificial intelligence? It's a very broad area, ranging from simple algorithms such as path finding in computer games, to machines that appear to think. The term 'artificial intelligence' is actually fairly vague.
BI lazy

Re:role of artificial intelligence

Post by BI lazy »

Artificil Intelligence and process scheduling is something that doesn't fit together in my opinion: Imagine something trying to figure out who's to be assigned to the cpu next, imagine the power going lost with all this "thinking" - in terms of fuzzy logic and so - and then, at least I come to the conclusion that I don't want to have something thinking about the next one to run but some quick scheduling algorithm that comes to it's decision in reasonable short time.

Scheduling in terms of round robin and sorts plays a ... rather marginal role in my own kernel. Most of the time Messages are passed throu and fro and processes are waiting for messages/IO.

I don't see the sense for AI in this realm. It would be too complex to get the machine running smooth and with responsiveness.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:role of artificial intelligence

Post by Pype.Clicker »

imho, AI can hardly be done at such a low level, because its implementation usually require a large memory support (thus it cannot be used to implement memory management) and is a CPU-bound process (thus it cannot be used in order to schedule).

Maybe the swapper process could be improved by something like a learning automaton (thinking of Hidden Markov Models) to have a clearer view of what page is likely to be needed soon and what page is not, but honestly, i think that a few hints from the user program could fullfill the same job (you know you're likely to need the top of the stack, for instance, and if there are pointers on the top stack frame, that you're going to need those pages aswell ...

You could also imagine to store for most demanded pages a list of "threads that use that page also often use ..." (or have a smart library component that provide this information for you ;) )
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:role of artificial intelligence

Post by Solar »

I think shahzad didn't mean "real" AI as we understand it, but rather some "smart" algorithms as opposed to the simple solutions like round-robin scheduling, least-recently-used paging etc.

Am I correct, shahzad?

Otherwise, I'd like to second Pype's notion. AI is one hell of a resource hog, and what's worse, it's non-deterministic by nature, which makes it a bad choice for low-level system management.
Every good solution is obvious once you've found it.
BI lazy

Re:role of artificial intelligence

Post by BI lazy »

hmmm.... smart algorithms .... Well, you may be right, solar, but I tend to the following:

smart enough to get the work done efficiently

Thinking to do a smart thing does not always induce that the smartest way is the most efficient way. Sometimes being smart hogs ressources.
shahzad

Re:role of artificial intelligence

Post by shahzad »

look at neural nets.they r used for image processing and things like that.in neural nets we train a neuron untill it matures enough.

isn't it possible so that OS can also be trained and behave differently to different users according to their nature.

for example if a user uses 5 or 6 different type of files
the file system should be able to modify itself so that it
can deal with those files effeciently rather than carrying out the whole lenghty procedure which is used for all type of files.

i agree with solar that A.I can be used to develop some
more efficent algorithems.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:role of artificial intelligence

Post by Solar »

shahzad wrote: isn't it possible so that OS can also be trained and behave differently to different users according to their nature.
Possible, yes. Desirable? Doubtful.

And certainly not at the memory management / file system / scheduling level.
for example if a user uses 5 or 6 different type of files
the file system should be able to modify itself so that it
can deal with those files effeciently rather than carrying out the whole lenghty procedure which is used for all type of files.
What kind of shortcuts do you have in mind, for using "those files effeciently rather than carrying out the whole lenghty procedure"?

From the file system view, there's basically two types of data: Files and streams. There's little to do "more efficiently" there, IMHO.
i agree with solar that A.I can be used to develop some
more efficent algorithems.
Hehe... you got me wrong there. I think that the art of algorithms and the art of AI, while being related, are two different kinds of magic. I don't think that an AI entity could easily (at all?) come up with a scheduler that beats a carefully designed-by-hand piece of code.

I'd suggest you look into adaptive / feedback scheduling to get an idea on how an OS can "react" to a user and his way of using a system, without having anything AI-like involved.

How was the saying? "Any sufficiently advanced technology is indistinguishable from magic". ;D
Every good solution is obvious once you've found it.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:role of artificial intelligence

Post by Pype.Clicker »

shahzad wrote: for example if a user uses 5 or 6 different type of files
the file system should be able to modify itself so that it
can deal with those files effeciently rather than carrying out the whole lenghty procedure which is used for all type of files.
Like reorganizing the blocks used on the disk so that the "favourite" file types have a special training and the system knows that 'block X is likely to be requested after block Y so i put X and Y close from each other and load speculatively X in memory on request for Y ?'

or like showing favourite types/locations atop of the list so that the user find them quicker ? or install dedicated buttons for fast access to common features ? or move most used items of a popup menu on top of the list ??

in the latter case, this is most a problem of smart reconfiguration, and i do not think it's wise to do it automatically (because the Joe Average user expects the computer to behave the same way everytime). Look at 'Clipper' (aka 'Trombine' for frenchies): it is a AI-based system, and virtually everybody turns it off.

What would be nice, however, would be that the system learns what would be optimal for you and propose you that optimum when you say you want to reconfigure menu bars.
Curufir

Re:role of artificial intelligence

Post by Curufir »

Actually there is a case for using statistical analysis to preload an application's working set (of pages).

I've been thinking of something like this for a while. The system would track the set of pages an application is using until they reach some stable level (Eg A limit of page hits/misses per second of application runtime is reached, excluding VMM misses) at which time the information can be stored so that for any future use of the application the entire set of pages required for work is brought into memory immediately instead of waiting for page misses (Along with arranging the HDD to make this a more efficient operation).

The problem here is the number of unknowns. The OS is trying to determine the working set for an application it knows nothing about. So it is easy to miss sections of the application that should be in the working set simply because they are used relatively rarely (Eg A spellchecker on a word processor). This leads quite naturally to the idea of having more than one working set stored and using a different set depending on the current state of the program.

For example an application might require a specific set of pages just after it has been loaded to perform setup of the application. It might require an entirely different set of pages when the application is running in its most common mode. It might then require a further set of pages when the application is changing to a different mode of operation.

Doing all this efficiently seems to be an absolute nightmare (I've only got some rough designs on paper). The shortcut I've come up with so far is tracking thread creation. If the application is sufficiently multi-threaded then each time a thread is created the child thread should be using a different page set to its parent. So I'm looking at using the act of thread creation as the trigger to load in a new page set (Or check they are already loaded). The biggest problem though is the tracking of page sets, and I've yet to come up with an efficient solution that doesn't involve the application declaring its own working sets.

**

I should probably point out that this isn't anything AI related. Such a system might give the impression of learning but it isn't.
kaos

Re:role of artificial intelligence

Post by kaos »

I could possibly see an os making use of decision trees that are generated on the fly for resource scheduling. I haven't really though much about it though.
Post Reply