> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
> Behalf Of (IBM Mainframe Discussion List)
> Sent: Tuesday, July 24, 2007 10:05 AM
> To: IBM-MAIN@BAMA.UA.EDU
> Subject: Re: Is a page protected?--how to determine
> 
> In a message dated 7/24/2007 10:56:09 A.M. Central Daylight Time,
> [EMAIL PROTECTED] writes:
> >very bad idea in general. if the page is not protected, then you
> don't  know what other processes are updating that page nor how
> they serialize their  updates. the OI is not an interlocked update
> and may cause corruption when  another CPU is concurrently modifying
> that byte.
> 
> OK.  Find some other instruction that will not corrupt storage by
> serializing properly on the storage and which instruction will NOT really
> change
> anything in the storage. My main idea was to execute an instruction that
> does  not
> really change anything but yet the instruction processing microcode tests
> the
> byte to be accessed for write capability in that page.
> 
> I do not understand how my instruction that does not change any of the 8
> bits in a byte can possibly corrupt any bytes anywhere near that one byte
> regardless of what other CPUs or I/O operations are doing concurrently.

Because the fetch and the store are separated in time. Another CPU or an
I/O operation can store into the byte *after* your CPU fetches the byte
but *before* your CPU stores the byte. The other CPU update will be wiped
out by your CPU subsequent store into the byte.

If the application does not know how the page "owner" is serializing
access to the page, there is no way to attempt a "safe" store into
the page to detect protection.

Jeffrey D. Smith
Principal Product Architect
Farsight Systems Corporation
700 KEN PRATT BLVD. #204-159
LONGMONT, CO 80501-6452
303-774-9381 direct
303-484-6170 FAX
http://www.farsight-systems.com/

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to