From: muta...@gmail.com   
      
   On Tuesday, October 11, 2022 at 5:57:50 AM UTC+8, Scott Lurndal wrote:   
   > "muta...@gmail.com" writes:   
   > >On Monday, October 10, 2022 at 10:13:46 PM UTC+8, Scott Lurndal wrote:   
   > >> "muta...@gmail.com" writes:   
   > >> >On Monday, October 10, 2022 at 7:22:35 AM UTC+8, Joe Monk wrote:   
   > >> >> > SSS AL   
   > >> >> >   
   > >> >> > Set segment shift to the value in AL   
   > >> >> > which must be 0 to 16.   
   > >> >> >   
   > >> >> > And GSS AL to retrieve the value into AL   
   > >> >> The problem with variable shifted segments (and why they haven't been   
   implemented) is that they lead to memory fragmentation.   
   > >> >   
   > >> >Not sure what you're talking about.   
   > >> >   
   > >> >This is a once-off instruction to be executed.   
   > >> >   
   > >> >There is nothing magical about 4 bit   
   > >> >shifts that are totally memory efficient, zero   
   > >> >fragmentation, but 5 bits would be   
   > >> >totally horrendous, unacceptable to the   
   > >> >whole world without exception.   
   > >> >   
   > >> >Personally I want 2 mb of memory   
   > >> >rather than 1 MB, and I'll wear the   
   > >> >slightly inferior fragmentation.   
   > >   
   > >Scott, you sent the above message with no   
   > >content that I can see.   
   >   
   > Sorry. Anytime you have multiple segment sizes, you're   
   > going to end up with fragmentation; you'll get to a point   
   > where in order to allocate a new segment (which by definition   
   > must be contiguous), you'll need to move other segments   
   > around. Which means you'll need to track them somewhere.   
   >   
   > Trust me, it's a huge PITA to deal with[*]. That's one of   
   > the main reasons for a fixed page size (although the   
   > same problems exist when an architecture supports multiple   
   > page sizes, like the AMD/Intel 4K/{2,4}M/1G pages. That's   
   > why linux pre-allocated Huge (2/4M) pages at boot).   
   >   
   > (OTOH, 1G pages are useful in the nested page tables used   
   > by hypervisors to map guest physical to real physical - which   
   > can reduce a table walk from 22 memory access to 11 accesses   
   > when translating a guest virtual address).   
   >   
   > [*] The OS I helped build in the early 80's had a segmented   
   > architecture (each program could include millions of segments,   
   > with eight active at any point in time, each ranging in size from   
   > 500 bytes to 500,000 bytes).   
      
   There seems to be some misunderstanding.   
      
   The purpose is to have a single shift value,   
   set at startup, probably by the bios or some   
   other firmware or hardware, probably by   
   default being set to a value that   
   addresses all of the detected memory.   
      
   Although there probably won't be any restrictions   
   on the os or apps executing that   
   instruction, that would be as pointless as   
   deliberately trashing the interrupt vectors.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|