{"id":274,"date":"2020-08-18T19:23:47","date_gmt":"2020-08-18T20:23:47","guid":{"rendered":"http:\/\/www.linux-tutorial.info\/?page_id=77"},"modified":"2020-08-22T19:26:16","modified_gmt":"2020-08-22T20:26:16","slug":"this-is-the-page-title-toplevel-109","status":"publish","type":"page","link":"http:\/\/www.linux-tutorial.info\/?page_id=274","title":{"rendered":"Memory"},"content":{"rendered":"\n<title>Memory<\/title>\n<p>\nMemory is the part of the computer where your program and data are while\nthey are being used by the <glossary>CPU<\/glossary>.\n Contrast this to a hard disk or floppy, where\nthe program is sitting on the disk and is not being used. (Of course with\noperating systems like Linux, parts of both the program and the data can be\nstored on the disk, even as the program is running.) There are two types of\nmemory that are most common talked about: <glossary>RAM<\/glossary>\nand <glossary>cache<\/glossary>.\n<\/p>\n<p>\nIn most memory today, an extra bit is added for each byte. This is a parity\nbit. Parity is a simple way of <i>detecting<\/i> errors within a memory chip\n(among other things). If an odd number of bits is set, the <glossary>parity<\/glossary>\nbit will be\nset to make the total number of bits set an even number (most memory uses even\nparity). For example, if three bits are set, the <glossary>parity<\/glossary>\nbit will also be set to\nmake the total bits set four.\n<\/p>\n<p>\nWhen data is written, the number of set bits\nis calculated and the <glossary>parity<\/glossary>\nbit is set accordingly. When the data is read, the\nparity bit is also read. If the total number of bits set is even, all is well.\nHowever, if an odd number of data bits is set and the <glossary>parity<\/glossary>\nbit is not set, or\nif an even number of data bits is set and the <glossary>parity<\/glossary>\nbit is set, a parity error\nhas occurred.\n<\/p>\n<p>\nWhen a <glossary>parity<\/glossary>\nerror occurs in memory, the state of the\nsystem is uncertain. To prevent any further problems, the <glossary>parity<\/glossary>\nchecking logic\ngenerates a Non-maskable Interrupt (NMI), and the <glossary>CPU<\/glossary>\nimmediately jumps to\nspecial codes called <glossary>NMI<\/glossary>\nservice routines.\n<\/p><p>\nWhen Linux is interrupted with\nan <glossary>NMI<\/glossary>\nas the result of a <glossary>parity<\/glossary>\nerror, it too realizes things are not good, and\nthe system panics. The <glossary>panic<\/glossary>\ncauses the system to stop everything and shut down.\nCertain machines support <glossary>ECC<\/glossary>\n(Error Correcting Code) <glossary>RAM<\/glossary>,\n which corrects parity\nproblems before it kills your system.\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Memory Memory is the part of the computer where your program and data are while they are being used by the CPU. Contrast this to a hard disk or floppy, where the program is sitting on the disk and is &hellip; <a href=\"http:\/\/www.linux-tutorial.info\/?page_id=274\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-274","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/274","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=274"}],"version-history":[{"count":1,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/274\/revisions"}],"predecessor-version":[{"id":620,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/274\/revisions\/620"}],"wp:attachment":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}