What is the relation between a line in cpu cache and a page in main memory (and block in disk)?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-1
down vote

favorite












Computer Systems: A Programmer's Perspective (2nd Edition) [Randal E. Bryant, David R. O'Hallaron] says




A block is a fixed-sized packet of information that moves back and
forth between a cache and main memory (or a lower-level cache).



A line is a container in a cache that stores a block, as well as other
information such as the valid bit and the tag bits.




  1. I understand that a block is often used as a unit in a disk. Is there some relation between the block used here and a block in a disk? Do they have the same size?


  2. A page frame is a unit in a main memory. What is the relation
    between a block/line in a cache and a page frame in a main memory? Do they have the same size?


Thanks.










share|improve this question



























    up vote
    -1
    down vote

    favorite












    Computer Systems: A Programmer's Perspective (2nd Edition) [Randal E. Bryant, David R. O'Hallaron] says




    A block is a fixed-sized packet of information that moves back and
    forth between a cache and main memory (or a lower-level cache).



    A line is a container in a cache that stores a block, as well as other
    information such as the valid bit and the tag bits.




    1. I understand that a block is often used as a unit in a disk. Is there some relation between the block used here and a block in a disk? Do they have the same size?


    2. A page frame is a unit in a main memory. What is the relation
      between a block/line in a cache and a page frame in a main memory? Do they have the same size?


    Thanks.










    share|improve this question

























      up vote
      -1
      down vote

      favorite









      up vote
      -1
      down vote

      favorite











      Computer Systems: A Programmer's Perspective (2nd Edition) [Randal E. Bryant, David R. O'Hallaron] says




      A block is a fixed-sized packet of information that moves back and
      forth between a cache and main memory (or a lower-level cache).



      A line is a container in a cache that stores a block, as well as other
      information such as the valid bit and the tag bits.




      1. I understand that a block is often used as a unit in a disk. Is there some relation between the block used here and a block in a disk? Do they have the same size?


      2. A page frame is a unit in a main memory. What is the relation
        between a block/line in a cache and a page frame in a main memory? Do they have the same size?


      Thanks.










      share|improve this question















      Computer Systems: A Programmer's Perspective (2nd Edition) [Randal E. Bryant, David R. O'Hallaron] says




      A block is a fixed-sized packet of information that moves back and
      forth between a cache and main memory (or a lower-level cache).



      A line is a container in a cache that stores a block, as well as other
      information such as the valid bit and the tag bits.




      1. I understand that a block is often used as a unit in a disk. Is there some relation between the block used here and a block in a disk? Do they have the same size?


      2. A page frame is a unit in a main memory. What is the relation
        between a block/line in a cache and a page frame in a main memory? Do they have the same size?


      Thanks.







      memory devices disk cache storage






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 7 hours ago

























      asked 7 hours ago









      Tim

      23.9k67232418




      23.9k67232418




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          All of these sizes you ask about are variable, and implementation specific.



          No, the use of "block" in this situation is not related to the block size on a permanent storage device. In that case, a block is the smallest amount of bits that can be modified at one time. For example, if you have a block size of 16KB on a filesystem, then no file can take up less than 16KB.



          https://stackoverflow.com/questions/8537579/file-system-block-size



          I'm not as familiar with the relationship between a cache block and a memory page, but presumably the cache line will be smaller than or equal to the memory page, as a cache is a subset of data from memory.






          share|improve this answer




















          • Thanks. A main memory is a "subset" of data from a disk, in the same sense as "a cache is a subset of data from memory". But a page in a main memory is bigger than a block in a disk
            – Tim
            6 hours ago











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474339%2fwhat-is-the-relation-between-a-line-in-cpu-cache-and-a-page-in-main-memory-and%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          All of these sizes you ask about are variable, and implementation specific.



          No, the use of "block" in this situation is not related to the block size on a permanent storage device. In that case, a block is the smallest amount of bits that can be modified at one time. For example, if you have a block size of 16KB on a filesystem, then no file can take up less than 16KB.



          https://stackoverflow.com/questions/8537579/file-system-block-size



          I'm not as familiar with the relationship between a cache block and a memory page, but presumably the cache line will be smaller than or equal to the memory page, as a cache is a subset of data from memory.






          share|improve this answer




















          • Thanks. A main memory is a "subset" of data from a disk, in the same sense as "a cache is a subset of data from memory". But a page in a main memory is bigger than a block in a disk
            – Tim
            6 hours ago















          up vote
          1
          down vote













          All of these sizes you ask about are variable, and implementation specific.



          No, the use of "block" in this situation is not related to the block size on a permanent storage device. In that case, a block is the smallest amount of bits that can be modified at one time. For example, if you have a block size of 16KB on a filesystem, then no file can take up less than 16KB.



          https://stackoverflow.com/questions/8537579/file-system-block-size



          I'm not as familiar with the relationship between a cache block and a memory page, but presumably the cache line will be smaller than or equal to the memory page, as a cache is a subset of data from memory.






          share|improve this answer




















          • Thanks. A main memory is a "subset" of data from a disk, in the same sense as "a cache is a subset of data from memory". But a page in a main memory is bigger than a block in a disk
            – Tim
            6 hours ago













          up vote
          1
          down vote










          up vote
          1
          down vote









          All of these sizes you ask about are variable, and implementation specific.



          No, the use of "block" in this situation is not related to the block size on a permanent storage device. In that case, a block is the smallest amount of bits that can be modified at one time. For example, if you have a block size of 16KB on a filesystem, then no file can take up less than 16KB.



          https://stackoverflow.com/questions/8537579/file-system-block-size



          I'm not as familiar with the relationship between a cache block and a memory page, but presumably the cache line will be smaller than or equal to the memory page, as a cache is a subset of data from memory.






          share|improve this answer












          All of these sizes you ask about are variable, and implementation specific.



          No, the use of "block" in this situation is not related to the block size on a permanent storage device. In that case, a block is the smallest amount of bits that can be modified at one time. For example, if you have a block size of 16KB on a filesystem, then no file can take up less than 16KB.



          https://stackoverflow.com/questions/8537579/file-system-block-size



          I'm not as familiar with the relationship between a cache block and a memory page, but presumably the cache line will be smaller than or equal to the memory page, as a cache is a subset of data from memory.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 6 hours ago









          zymhan

          220110




          220110











          • Thanks. A main memory is a "subset" of data from a disk, in the same sense as "a cache is a subset of data from memory". But a page in a main memory is bigger than a block in a disk
            – Tim
            6 hours ago

















          • Thanks. A main memory is a "subset" of data from a disk, in the same sense as "a cache is a subset of data from memory". But a page in a main memory is bigger than a block in a disk
            – Tim
            6 hours ago
















          Thanks. A main memory is a "subset" of data from a disk, in the same sense as "a cache is a subset of data from memory". But a page in a main memory is bigger than a block in a disk
          – Tim
          6 hours ago





          Thanks. A main memory is a "subset" of data from a disk, in the same sense as "a cache is a subset of data from memory". But a page in a main memory is bigger than a block in a disk
          – Tim
          6 hours ago


















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474339%2fwhat-is-the-relation-between-a-line-in-cpu-cache-and-a-page-in-main-memory-and%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?