Re: [opensuse] Re: Creating a swap file



Theo v. Werkhoven wrote:
Sat, 20 Jan 2007, by robin.listas@xxxxxxxxxxxxxx:

The Saturday 2007-01-20 at 11:26 +0100, Theo v. Werkhoven wrote:

Well, my instructors in the early '70's told me that a byte was
analogous to "bite" -- not the smallest "bit" accessible, but smaller
than the full-size "word" of most architectures of the time. And some
architectures do allow you direct access to a bit.
Why only some?
Aren't shift- and logical operations part of all CPU architectures?
That's not direct access to a bit, IMO. Direct access would be an
operation that would load into a register a certain bit, or another that
would compare directly to a certain bit in a byte in memory (in one op). I
have never seen it, though.

That would be rather inefficient opcodes I think, and I can't think
of any circumstance where that would be neccesary. Perhaps that's
why you don't see it.


Hardware-intensive control requires bit testing and setting. Several
microprocessors used opcodes like "bittest {address}, bitno" to test a
single bit in a single instruction with only a single memory or I/O
access to the target address. They had a corresponding "bitset"
operation, too.

This was important when memory was expensive and small, and when
processors were slow.

What's inefficient from that point of view is the modern memory-only
access, requiring loading a bitmask, loading the target address,
operation, storing the result.

Of course, now that memory is nearly infinite for nearly zero cost,
processors are lightspeed fast, and compilers have replaced assemblers
as the programming environment of choice, "efficiency" has flip-flopped.

--

John Perry
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages

  • Re: direct access to display memory
    ... DirectX allows direct access to video memory. ... "Masoud Rozati" wrote in message ... >I need a quick and efficient way of accessing display memory. ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Sandboxing
    ... I want to sandbox Mozilla Firefox. ... The X *server* needs direct access to memory. ...
    (FreeBSD-Security)
  • Re: An efficient marriage between memory and chips...
    ... I was thinking that memory bank could ... Each chip would have direct access to ... I was not really trying to directly connect the chips to the ... This thing would have a distributed multi-threaded programming model. ...
    (comp.arch)
  • direct memory access to backbuffer
    ... I have a JFrame using double-buffering ) and was ... wondering if it's possible to get direct access to the backbuffer's memory? ...
    (comp.lang.java)
  • Re: [opensuse] Re: Creating a swap file
    ... than the full-size "word" of most architectures of the time. ... Aren't shift- and logical operations part of all CPU architectures? ... That's not direct access to a bit, ... Theo v. Werkhoven Registered Linux user# 99872 http://counter.li.org ...
    (SuSE)