View Single Post
Old 19 April 2020, 13:03   #102
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,322
Quote:
Originally Posted by Gorf View Post
That you do not have to change it during a context switch.
Then what is "change" for you ? Alter something in the table itself, or switch to another one ?


Quote:
Originally Posted by Gorf View Post
Yes - one table
Containing all information for all tasks in the system ?


Quote:
Originally Posted by Gorf View Post
NO!
This is where it starts to break.
Sorry, but if you have a global task, then it has to include these lists - regardless of the shape they take.


Quote:
Originally Posted by Gorf View Post
No the conclusion is absurd.
You need just one list.
You have a number of areas and a number of tasks. So you have to link them in one way or another. So you can group this info by task (usually the case) or by area, but a single mixed big list is nonsense. In a dbase this is n-to-n link.


Quote:
Originally Posted by Gorf View Post
On a file server with hundreds of users and millions of files, you do not need hundreds of lists with millions of entries to organize permissions.
You only have a few per file, that your filesystem manages.
Same goes here for tasks and memory regions.
The story is indeed the same : you can group your rights by user (giving what's allowed) or by file/directory (giving who's allowed here). There is no other way.


Quote:
Originally Posted by Gorf View Post
Luckily we need just one
You haven't read what i wrote, have you ?


Quote:
Originally Posted by Gorf View Post
And now we can keep everything at least in the 2nd level cache of our MPU (2-4 thousand lines) and we can share this cache with many cores.
Absolutely not. Checking access rights mustn't take more time than a single pipeline step - for this 2nd cache level is too slow (several clocks access time needed).
Failure to apply security checks in time has led to security flaws in cpus, even if it's just for the speculative execution.


Quote:
Originally Posted by Gorf View Post
Above line count was for fixed size - if you use a variable size you can reduce the number of lines but you complicate the handling...
So many lines. A lot too much to handle for something that ought not be bigger than the regular TLB (IOW you have to do intermediate caching with something faster - and this intermediate, fast cache, will die upon task switches).


Quote:
Originally Posted by Gorf View Post
Since you do not actually use the full 64Bit address space and probably never will in our lifetime the number of actual entries gets drastically reduced.
Right, but if you have fixed page size then you have to provide a way for the MPU to know where the limit is. Easy, but it still complicates things a little.


Quote:
Originally Posted by Gorf View Post
About 4K lines for 64GB of ram and 16KB regions.
And what is the exact information stored in a line here ?
Does it contain all infos about all allowed tasks, or does it redirect to something else ?


Quote:
Originally Posted by Gorf View Post
If you want a more fine grained structure, you can accompany this with tagged memory, down to the byte level.
(See lowRISC cpu)
That takes up a lot of space...


Quote:
Originally Posted by Gorf View Post
See above.
That's starting to get complicated.


Quote:
Originally Posted by Gorf View Post

They don’t need to change if you change them?
That makes no sense...
What's not clear in : in the classical way the tables don't need to change more than in your way ?


Quote:
Originally Posted by Gorf View Post
Of course not, but the switch is costly enough, since you Have to flush you buffers ...
You have to flush access rights of previous task, too. In both cases memory doesn't change, but something has to.


Quote:
Originally Posted by Gorf View Post
See the paper from Microsoft I linked earlier..
Tech has evolved since...


Quote:
Originally Posted by Gorf View Post
Only as long as your tasks don’t want to exchange any information...
??? There's no link between task switch and tasks exchanging information.


Quote:
Originally Posted by Gorf View Post
And since tasks now spawn multiple thread ... well I somehow doubt, that the number of switches got actually significantly reduced.
Are there studies?
I don't know if there are studies or not, but simply looking at a task manager will tell you how many tasks are currently running.


Quote:
Originally Posted by Gorf View Post
How dare I to post actual information...
If only you did...


Quote:
Originally Posted by Gorf View Post
Or because it takes to long, or there are a lot of pictures, or a video, or just some very good explanation by an expert ....
Write a small example of a small list, and describe what happens in case of a context switch. This is concrete, not too long, and not just a blurry theory.


Quote:
Originally Posted by Gorf View Post
Did you never read books in school/university, but demanded, that your teachers explains everything for you?
How did they react?
If i recall correctly, i didn't have to ask... Remember, when you were at school, what did teachers do all day long ?


Quote:
Originally Posted by Gorf View Post
And if your teachers told you to read a chapter until tomorrow for a test, you would think, they don’t know what’s in the book?
How cool if they just did that. I would have spent just a few time reading, and no need to go at school for anything more than the test...


Quote:
Originally Posted by Gorf View Post
Probably not more than you need me
Obviously not, but me, i have something that works. I could even show it if PM'ed.


Quote:
Originally Posted by Gorf View Post
Again making assumptions
I actually don’t...
Everyone has time these days but not you ? That's very possible. Yet lack of time has always been a nice excuse to do nothing...
But if you don't do it due to lack of time, nobody will. It's your idea, so you have to do it.
meynaf is offline  
 
Page generated in 0.08906 seconds with 11 queries