Sponsored Content
Full Discussion: Atomicity
Top Forums Programming Atomicity Post 51115 by S.P.Prasad on Tuesday 11th of May 2004 07:26:18 AM
Old 05-11-2004
Quote:

> Single Word = Single addressable unit

No, as I said, the largest single addressable unit that fits into a GPR.

> Word Boundary = Address divisible by number of bytes that represents a single addressable unit.

With the above addition, correct.

> Example Single Word length = 16 bits then a word boundary is any address divisible by 16.

I think this is a typo, but just to make sure: No, divisible by two
I agree to the modification of the definition of 'Single Word'.

Please provide me arguments as to why you say 'No, divisible by two' with regards to ‘word boundary'. Is it that word boundary depends upon the type of data we are referring to i.e. depends upon the sizeof of the data type. Hence for a four-byte-sized integer the word boundary will be of multiples of 4 and for two-byte-sized integer the word boundary will be multiples of 2 respectively.

Thanks in advance.
 
RK(4)							     Kernel Interfaces Manual							     RK(4)

NAME
rk - RK-11/RK03 or RK05 disk DESCRIPTION
Rk? refers to an entire disk as a single sequentially-addressed file. Its 256-word blocks are numbered 0 to 4871. Minor device numbers are drive numbers on one controller. The rk files discussed above access the disk via the system's normal buffering mechanism and may be read and written without regard to physical disk records. There is also a `raw' interface which provides for direct transmission between the disk and the user's read or write buffer. A single read or write call results in exactly one I/O operation and therefore raw I/O is considerably more efficient when many words are transmitted. The names of the raw RK files begin with rrk and end with a number which selects the same disk as the corre- sponding rk file. In raw I/O the buffer must begin on a word boundary, and counts should be a multiple of 512 bytes (a disk block). Likewise seek calls should specify a multiple of 512 bytes. FILES
/dev/rk?, /dev/rrk? BUGS
In raw I/O read and write(2) truncate file offsets to 512-byte block boundaries, and write scribbles on the tail of incomplete blocks. Thus, in programs that are likely to access raw devices, read, write and lseek(2) should always deal in 512-byte multiples. RK(4)
All times are GMT -4. The time now is 08:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy