Is Write-Only Memory a Real Thing in Hardware Design?

  • Thread starter Thread starter zak100
  • Start date Start date
  • Tags Tags
    Fault Writing
Click For Summary
The discussion centers on the concept of write-only memory (WOM) in hardware design and its implications for page management in operating systems. It explains how page faults occur when a page is accessed that is not in memory, leading to the operating system marking the page as READ ONLY initially. If a write operation is attempted on that page, a second page fault occurs, prompting the OS to change the page's status to READ/WRITE by setting the M bit. The conversation highlights the importance of tracking page states to manage memory effectively, particularly during page faults when memory frames are full. The humorous reference to WOM underscores the complexities and challenges faced in hardware design and memory management.
zak100
Messages
462
Reaction score
11
TL;DR
Hi,
I am trying to understand the concept of NRU from the following link. I have got some problem in understanding the text below:
https://www.informit.com/articles/article.aspx?p=25260&seqNum=3
If the hardware does not have these bits, they can be simulated as follows. When a process is started up, all of its page table entries are marked as not in memory. As soon as any page is referenced, a page fault will occur. The operating system then sets the R bit (in its internal tables), changes the page table entry to point to the correct page, with mode READ ONLY, and restarts the instruction. If the page is subsequently written on, another page fault will occur, allowing the operating system to set the M bit and change the page's mode to READ/WRITE.




I have bolded the text. I have two problems: Page fault occurs if the page is not in memory but the above text says that

(a)the page fault occurs at the time of modifying or writing the page? I can’t understand that.

(b) Also I can't understand the text “, allowing the operating system to set the M bit and change the page's mode to READ/WRITE.” What is meant by READ/WRITE? If we are setting the M bit then it should be WRITE mode only? Why the text says READ/WRITE mode.

Somebody please guide me.

Zulfi.
 
Technology news on Phys.org
LOL your question invokes an age-old joke among programmers, the "write-only-memory". Just the concept used to send programmers rolling on the floor with laughter.

Look at it this way. If a page has only been read, then the page entry can be given up without writing anything back to main memory. However, as soon as the page is modified, the page entry can not be given up before the cache contents are written back to main memory.

What are all the possible states of a page?
How would you keep track of those states using bits?
When does the OS care what the state is?
 
Hi my friend, thanks for your reply.

Your reply was LOL for me because I asked one question and now you are asking 3 questions.
<What are all the possible states of a page?>
4.
00, 01, 10, 11
<
How would you keep track of those states using bits?>

Maybe by storing in some array or just by looking at the 2 bits.

<When does the OS care what the state is?>
At the time of page fault because all the memory frames might be full and we are requesting a page which is not in main memory, so we have replace a page in the frame with a page from virtual memory.

My problem not yet solved.

Zulfi.
 
anorlunda said:
LOL your question invokes an age-old joke among programmers, the "write-only-memory". Just the concept used to send programmers rolling on the floor with laughter.

Programmers might laugh but hardware guys design it.

https://en.wikipedia.org/wiki/Write-only_memory_(engineering)
In 1972, WOM, an antithesis of read-only memory (ROM), was introduced as an inside practical joke perpetrated by Signetics.[1] However, it was soon recognized that this concept actually describes certain functionalities in microprocessor systems.[2]
 
  • Haha
Likes anorlunda
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 14 ·
Replies
14
Views
5K
  • · Replies 27 ·
Replies
27
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 100 ·
4
Replies
100
Views
12K