object oriented – What does “representing” something in memory mean in OOP?

You’ll find that everything in IT is about representation. At the end of the day the computer itself is a fluctuating cascade of electrons across sand, or the dripping of fluid through a pipe, or the relative location of gears, cams, and spindles.

Is a really tough question (no, really).

Philosophers have literally wrung each others necks over this topic for millenia.

Thought experiment:

A Tesla car is a Car. It is also a computer containing a model of the car. Which is real, and which is the representation? the Car, or the model of the Car within the Car?

The Car is obviously physical. When the Car physical changes (such as moving) the model is updated. This would imply that the model is the representation.

But…

When the model of the Car changes, so does the Car. It’s hardly imagined, no pretence need be made. So that would mean the Car is the representation of the computer’s model.

So how to properly think about this?

  • S Systems are well defined, and well prescribed operations like sorting. There may be many ways to achieve the result, but it is possible to achieve it and it is clear when it is present (or not).

  • P Systems have a well defined problem, but there is no prescribed means or sufficiently rigorous way to solve it. For example the travelling salesperson problem, or an economic simulation. We know what we want, but there isn’t a way to solve it outside of trying everything (which is impossible), approximating it (which automatically implies the result is wrong for a value of wrongness), or restrict it down to an S system which guarantees results but doesn’t solve parts of the problem.

  • E systems are emergent systems. They don’t solve the problem, they are part of the problem. Think air traffic controller system. The very act of attempting to solve the problem, changes the problem.

The model and what it represents depends entirely upon the kind of system it sits in.

In the thought experiment the model of the car, and the car are not separate things. Even though part of it is physical.

You’ll find that most textbooks talk about models representing X in the realm of S and P systems.

operating systems – How does the OS handle multiple stacks in its physical memory?

Without assuming ASLR…

Processes have virtual addresses, and they manage stacks & heaps of their own. However, these all get mapped to physical addresses somewhere on the memory.

Let’s say we have Process A and Process B. Process A starts before Process B. Process A puts some stuff on the stack. We switch to Process B. It puts some stuff on the stack.

However, Process A finishes, and all its elements need to be removed off the stack. However, Process B’s elements are still on the stack, so we can’t just force the stack pointer down.

How is this relieved? Or is physical memory really all heap?

windows – Packet loss correlated to high memory utilization

When Windows servers get low on memory (90%+ used) and starts paging (typically around 100 hard faults/sec) I see:

  • 7%+ packet loss when pinging to the next hop (default gateway)
  • No packet loss to localhost 127.0.0.1

Considering disk activity is low (5% used and ~1MB/s), I would not think that hitting the page file occasionally would be as disruptive to network activity

Is there a specific point at which high memory usage/paging would start to cause noticeable network disruptions?

Is there a way to test or simulate this behavior in a test environment?

sql server – Actual Execution plan does not have memory grant info

I manually ran query in SSMS and captured actual execution plan of the query by enabling its icon in SSMS. I am not getting “Memory Grant” when I keep my mouse on SELECT OPERATOR. I didn’t get in properties window as well. I checked the XML data of plan as well and I am getting below Information which is not useful:

<MemoryGrantInfo SerialRequiredMemory="0" SerialDesiredMemory="0" />
<OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="629094" EstimatedPagesCached="78636" EstimatedAvailableDegreeOfParallelism="2" MaxCompileMemory="3836688" />

I tried mulitple versions of SSMS but no luck.

Anyone else has faced this wierd issue? Any help would be appreciated.

memory – What on Earth is a “processor driver” supposed to be? Does that even make “bare metal” sense?

So it seems on Windows that there is a “driver” for everything. What in heaven’s name is a processor driver though?

As far as I understand “driver” on a low-level system interface it is merely just for the operating system to be able to create a communication strategy via the computer’s components, but that makes little sense when it comes to the CPU.

I see it as the CPU being the “engine” of the whole system, like the engine of a car. Why would the engine of a car need a communication specification with the car actually running? That would be like living/sentience requiring a “driver” for the mind to think when that function is innate and a driver of the actual process that would then require said “drivers” for external functions.

But the word is thrown around a lot and meaning isn’t always clear. The term “driver” is even used on a higher-level sense — not just as if it were a bare bones driver like with your keyboard. So I understand that a “CPU driver” is not actually a low-level driver like you would expect to be an interface to call functions with memory-mapped IO/etc. since the CPU is programmed ultimately down to the “bare metal” from the start, even if a higher-level language is used prior to compilation or such. As a mental exercise just give an example of writing a “CPU driver” to see how odd it sounds.

My guess is “CPU drivers” are just standards regarding identification of CPUs and info, but not any intermediary to control CPU functions since that is innate to the structural design of the computer and requires no “driver” to actually operate in that sense.

External hardware might require a bare metal driver since it makes it easier to integrate different functions together with an OS this way — but understanding a CPU “driver” in connection with the OS makes little sense since one is built on top of the other — having a “driver” for the CPU would then be like creating a communication between the thing it already made directly anyways.

Does anyone know how to better explain “CPU driver” in a low-level sense? The concept/understanding behind it is mucky.

How to Handle Out of memory?

We are developing a mobile app where consumers (companies) create AR content for their products.
The content ranges from simple pictures to gifs and embedded videos. We already released versions before but now some devices (especially older devices) crash due to out of memory errors.
It is worth noting that Videos are streamed, not downloaded. The issue here are the pictures that need to be decoded and made to be ready for the GPU.
restricting content size wouldn’t really help because our client wants potentially infinite pictures/videos. Sooner or later we would run out of memory. The content may be small to download, but bigger to encode (jpg is compressed and transformed into per-Pixel data for example).

We already remove the content of previous products, so we have the content of only one product in memory.
My question is how should we handle such out of memory scenarios?

computer architecture – A cache has 64K lines where each line can store 8 blocks of the memory at a time

A cache has 64K lines where each line can store 8 blocks of the memory at a time. If the size of the memory is 2GB and block size is 4 Bytes, then which cache line is supposedly be holding the memory block with number “256” if cache supports Direct Mapping. Also compute total number of blocks this memory has and total number of blocks the cache in question can store at a time.

How to get memory usage in neo4j cypher

How to get the total memory usage of a cypher.
I used PROFILE and EXPLAIN on neo4j desktop, but I didn’t get any info of memory.
I want to get the info like below:

Compiler CYPHER 4.1

Planner COST

Runtime INTERPRETED

Runtime version 4.1

+-------------------+---------------------------------------------------+----------------+------+---------+----------------+-----------------+-------------------+----------------------+------------+
| Operator          | Details                                           | Estimated Rows | Rows | DB Hits | Memory (Bytes) | Page Cache Hits | Page Cache Misses | Page Cache Hit Ratio | Order      |
+-------------------+---------------------------------------------------+----------------+------+---------+----------------+-----------------+-------------------+----------------------+------------+
| +ProduceResults   | `p.name`, `count(m)`                              |             13 |  102 |       0 |                |               0 |                 0 |               0.0000 | p.name ASC |
| |                 +---------------------------------------------------+----------------+------+---------+----------------+-----------------+-------------------+----------------------+------------+
| +Sort             | `p.name` ASC                                      |             13 |  102 |       0 |          22048 |               0 |                 0 |               0.0000 | p.name ASC |
| |                 +---------------------------------------------------+----------------+------+---------+----------------+-----------------+-------------------+----------------------+------------+
| +EagerAggregation | cache(p.name) AS `p.name`, count(m) AS `count(m)` |             13 |  102 |       0 |          13768 |               0 |                 0 |               0.0000 |            |
| |                 +---------------------------------------------------+----------------+------+---------+----------------+-----------------+-------------------+----------------------+------------+
| +Filter           | m:Movie                                           |            172 |  172 |     172 |                |               0 |                 0 |               0.0000 |            |
| |                 +---------------------------------------------------+----------------+------+---------+----------------+-----------------+-------------------+----------------------+------------+
| +Expand(All)      | (p)-(anon_17:ACTED_IN)->(m)                       |            172 |  172 |     297 |                |               0 |                 0 |               0.0000 |            |
| |                 +---------------------------------------------------+----------------+------+---------+----------------+-----------------+-------------------+----------------------+------------+
| +NodeIndexScan    | p:Person(name) WHERE exists(name), cache(p.name)  |            125 |  125 |     126 |                |               0 |                 0 |               0.0000 |            |
+-------------------+---------------------------------------------------+----------------+------+---------+----------------+-----------------+-------------------+----------------------+------------+

Total database accesses: 595, total allocated memory: 32672

Is there any way to do this?

memory – Understanding micron RAM Part no for choosing correct additional RAM upgrade

I’m trying to understand technical details written on the RAM.
Following is written on the Micron RAM device.
8GB 1RX8 PC4-2400T-SA1-11

I understand the meaning of till PC4 but somehow not able to find proper details of the remaining 2400T-SA1-11

I’m also trying to purchase additional 8GB RAM for my laptop to upgrade to 16GB.
Kindly suggest if I have to match these 2400T-SA1-11 parameters while buying extra RAM.