Questions tagged [non-volatile]

50 questions
10
votes
3 answers

Cannot override a type with non-volatile upper bound

I have a compiler error in scala and I don't know what does it refer to: Assume these declarations:trait Abstract { type MyType } trait AInner trait A extends Abstract{ type MyType <: AInner } trait BInner { def bMethod : Int } trait B…
ryskajakub
  • 6,351
  • 8
  • 45
  • 75
9
votes
1 answer

What does the PCOMMIT instruction do?

In the Intel ISA extension manual the description for pcommit is a bit cryptic: The PCOMMIT instruction causes certain store-to-memory operations to persistent memory ranges to become persistent (power failure protected). Specifically, PCOMMIT…
Margaret Bloom
  • 41,768
  • 5
  • 78
  • 124
9
votes
4 answers

How to prevent "partial write" data corruption during power loss?

In an embedded environment (using MSP430), I have seen some data corruption caused by partial writes to non-volatile memory. This seems to be caused by power loss during a write (to either FRAM or info segments). I am validating data stored in…
schumacher574
  • 1,081
  • 1
  • 14
  • 32
7
votes
4 answers

Is JIT reason of this behaviour?

Inspired by this question, I wrote the test: public class Main { private static final long TEST_NUMBERS = 5L; private static final long ITERATION_NUMBER = 100000L; private static long value; public static void main(final String…
Sergey Morozov
  • 4,528
  • 3
  • 25
  • 39
7
votes
1 answer

Under what conditions will writes to non-volatile variables be unseen by other threads? Can I force such conditions for experimental purposes?

I've recently been reading a lot here on SO and elsewhere about threaded memory management, in particular, the use of the volatile keyword. I'm beginning to feel reasonably confident with the concept, however, in order to full appreciate the effect…
devrobf
  • 6,973
  • 2
  • 32
  • 46
5
votes
3 answers

Assign volatile to non-volatile sematics and the C standard

volatile int vfoo = 0; void func() { int bar; do { bar = vfoo; // L.7 }while(bar!=1); return; } This code busy-waits for the variable to turn to 1. If on first pass vfoo is not set to 1, will I get stuck inside. This…
aiao
  • 4,621
  • 3
  • 25
  • 47
5
votes
1 answer

Why can this volatile access be reordered with respect to a non-volatile access?

The below code example is from a Chinese blog which introduces the effect of volatile. The left side is the C code; the other is the generated assembly code. // cordering.c gcc -O2 -S -masm=intel cordering.c int…
choxsword
  • 3,187
  • 18
  • 44
4
votes
1 answer

Store read/write data in assembly similar to filesystem

I am creating a custom operating system and is there any way to store data (almost like a filesystem) in assembly so that if the computer shuts off and turns back on the data will still be there?
3
votes
1 answer

TPM Non-Volatile Memory Size?

I am using IBM TPM v1332 + IBM TSS v1470 now and trying to store some essential keywords/passwords to non-volatile memory on TPM. I found two ways to do so. One is to create a sealed object and use evictcontrol to store it,…
DaveW
  • 63
  • 1
  • 5
3
votes
4 answers

Why threads do not cache object locally?

I have a String and ThreadPoolExecutor that changes the value of this String. Just check out my sample: String str_example = ""; ThreadPoolExecutor poolExecutor = new ThreadPoolExecutor(10, 30, (long)10, TimeUnit.SECONDS, runnables); for…
HeyAlex
  • 1,666
  • 1
  • 13
  • 31
2
votes
5 answers

Save python queue to a file

I am using the Python Queue cclass to manage a list of tasks that are shared between multiple worker threads. The actual code is humungous and I'm still in the process of making it entirely bug free. Time to time, the worker threads will crash and I…
Shah W
  • 147
  • 2
  • 11
2
votes
2 answers

DEM Dependency on NVM

I am trying to understand the dependency of DTC's with DEM_NVRamNBlocks. Does the number of DTC's effect the no of DEM_NVBlocks (DEM_NVBLOCK_PRIMARY)?
Teja
  • 21
  • 4
2
votes
2 answers

How much of NVS Data can we really use in ESP32?

I'm checking my NVS storage capacity. This is my output when i do make partition. toolchain path: /home/dhananjay/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc Toolchain version: crosstool-ng-1.22.0-80-g6c4433a Compiler version: 5.2.0 Python…
2
votes
2 answers

Dereferencing a NULL pointer in embedded

I am using Renesas V850 series microcontroller in my project. My product uses a Non-Volatile memory blocks(NVRam blocks) location which is separate from the main program section. During runtime, these NVRam blocks are monitored to verify that they…
Vivek
  • 59
  • 4
2
votes
1 answer

Does the OS flush CPU caches when a process crashes?

When a process is terminated abruptly by the OS (let's assume Linux) through a GPF or SIGKILL or similar, does the OS flush the modified CPU cache lines of the process to main memory? Is there different behavior depending on CPU or OS? I am…
torpedro
  • 494
  • 5
  • 13
1
2 3 4