Memory Vs non-memory resources

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

can anyone explain the difference between a memory resource and a non-memory
resource. I have been shown an example of error handling for a non-memory
resource (accessing a file) but am not sure what the terms refer to.

A few examples of each would be ideal.

Many thanks.
 
A memory resource is something that will require some of the machine's RAM
to operate (storing objects in memory, doing large calculations with
variables are examples).

A non-memory resource is something that does NOT utilize RAM or processor
time to operate (querying a database or opening a file).
 
You will have to ask the person who used the term "non-memory resource." The
term "resource" is a general term that encompasses literally anything that
can be "used." Take a look at the following Wikipedia article on the term
with regards to computer science, for example:
http://en.wikipedia.org/wiki/Resource_(computer_science)

As the article points, out, major resources include the CPU, the Hard Drive,
RAM (Random Access Memory), and Network Throughput. However, that is only
the short list. Still, of the 4 mentioned specifically, only one of them
(RAM) is a "memory resource." That is because only one of them is memory.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

Expect the unaccepted.
 
CashDeskMac,

I agree completely with Kevin, memory resource is probably a by somebody
invented own used name.

However a memory file system to emulate a disk, can be seen as a resource in
the RAM.

Cor
 
Whomever used this term, doesn't understand how a computer works (let me
guess you found it in Microsoft's documentation - would not surprise me) --
everything is a memory resource.

Accessing a file for example, the file could reside in RAM memory (aka the
cached by OS), it could reside in the cache on the hard drive. Since most
hard drives support DMA the CPU doesn't get involved that much in the
transfer of data from one resource to another. But lets be clear, every
resource on your PC uses a memory address, if it didn't, it could never be
accessed.

I think what the term is really referring to is loading the contents of a
file into a variable/structure -- depending on your buffer and structures
you'll consume RAM accordingly. Your code can determine how much memory you
use during the process of reading the file, what you elect to save, dump,
buffer sizes, etc. etc. The better applications will scale the file IO &
memory usage operations based on physical hardware (such as how much RAM is
installed and available on the PC). The less optimal applications will let
the OS decide and cache away.

Rob.
 
Were they were using this statement in the context of garbage collection (as
you mention error handling?).

Cheers,

Greg
 
Back
Top