Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Journeyman III

About the Processors

I'm learning assembly language, and was wondering about the processsors.

You would think that there would be a difffernet data segments for each type of data.

8 bit DS

16 bit DS

32 bit DS

64 bgit DS

128 bit DS for SSE or the AVX i suppose

256 bit DS for the AVX

plus a  STRING DS

So each data type can be optimized without  align 4,8,16

I was thinking that an applications Code segemnt should be marked READONLY by the processor, (so it or other , cannot modify it.)

but this requires registers in the processor to specify an apps START and END code segment, and then if the page is swapped out to VM, it results in more registers needed.

I was also thinking maybe the stack also should be multipled to separate  8, 16 , 32 , 64 , 128 , 256 , stringPTR  bit stack segments.

Maybe if each app that loads , the OS would create several empty pages at the end of a certain length of pages and VM the rest, and use the empty pages to swap the rest of the app in and out of those pages. (maybe each app would then have its own swap file.)

(With that the user, possibly would be allowed to set the max-app-pages to be a static, to best utilize memory.)

But with an OS, the kernel should just, manage memory , load and unload apps , defrag memory , cleanup after app exit , and occaisionally write all free memory to NOP's to ensure theres no code to run or write it to some Kernel INT.

Everything else (Hardware Drivers) should be done by kernel loaded interrupts , where the interrupts have to be accesed thru the kernel, so it can check permissions before handing off to the interrupt.

For some reason, it seems that the designers are designing the hardware to be utilized by certain crackers, that then give the secrets to others.