Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm trying to measure instaneous power comsumption by processor on ARM-Cortex-A9/Ubuntu 12.04 platform.
Does anyone know how to do this?
There are 4 obvious approaches to this:
Estimate it from other measurable parameters (e.g. CPU load)
Measuring current sense resistors in the on-board power supplies
Measuring entire-system power draw using an external supply with some kind of data-logging [a low value resistor and a voltmeter can also be used]
[If measuring power draw by a certain application] run the code on some other device that does have this functionality. [Apple's dev-tools and iOS provide incredible levels of support for this. Also fantastic for profiling too].
Since you're using the OMAP4460 (Pandaboard per chance?) it'll probably be paired with the TWL6030 power supply IC. A quick look at the datasheet suggests that it's capable of measuring current draw when running from battery (this is how the battery level indicator is implemented). There will be driver support for this.
The OMAP4430 (and probably by extension 4460) doesn't have power supply monitoring of its own.
Might also be worth looking on TI's website for white-papers. This is a common enough thing to do.
I think it mainly depends on your processor or SOC manufacturer. ARM defines processor core, manufacturer defines everything around it (like peripherials etc.).
Also when Ubuntu is ported on your platform, maybe there just be some power measuring application which also supports that platform.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I have finished watching the 2nd season of House of Cards, and I'm appalled. The show really is fantastic, however let me get down straight to the point - computer-wise, how realistic is the show? Gavin Orsay, a hacker and informant for the FBI created a USB stick for the The Washington Herald reporter Lucas Goodwin, which contained malicious code that would be automatically injected into any machine when plugged in.
- Theoretically, is this possible?
Not that I would want to do something like that, I'm just interested... And I'm not talking about autorun.infs, I mean real code that would be able to penetrate into a system, a virus, essentially. And if there was to be such a virus, would it be able to inject itself cross-platform? i.e. do the same amount of damage both on Windows, Unix, Linux distros etc.
This is possible. There have been certain countermeasures that have been implemented in Unix systems that pride themselves on being safe from attacks such as these.
That said, it wouldn't work on every machine.
This is not only possible it has been done many times. have a look at the Stuxnex virus developed by the United States to slow down Iran's uranium enrichment program.
http://en.wikipedia.org/wiki/Stuxnet
As far as cross platform, the flash drive could have different versions of the same virus/trojan/worm compiled for different hardware and operating systems. Developing software like this is not a matter of "if" it can be done, it is a matter of how much time/money do you have to make it happen!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
What is the difference between general-purpose operating systems and "Soft" real time operating systems?
There is lots of confusion on the internet.
Can we say that a general-purpose OS is one type of soft RTOS?
And please no answer like "timing" and "deterministic time bound"
Thanks.
The definition of a real-time OS is one which is guaranteed to perform a task before a certain amount of time has passed.
The terms "hard" and "soft" are no formally defined terms, but usually refer to the requirements of a real-time system task. If a task has "hard real-time" requirements, it must never fail to be done executing before its deadline. "Soft" requirements might mean that the task can execute beyond the given deadline, without causing any harm.
But sometimes the terms "hard" and "soft" could also refer to how tough the timing requirements are. For example, a realtime system which receives an interrupt it is supposed to handle every 100 microseconds, could be considered a "hard realtime" system.
I suspect the term "soft" is a marketing invention, where marketing people are trying to label systems that cannot guarantee real-time performance, as real-time systems. This has certainly been the case with many versions of Linux. The default desktop version of Linux is most certainly not a real-time OS.
Fluff terms like "hard" or "soft" don't really matter: either a system can guarantee execution before a deadline, or it cannot. Either it is a RTOS or it is not.
Soft RT linux kernel is usually ment the kernel with RT preempt patch applied. It has a guaranties that it switch context within 10 ms.
Non-RT (or general) linux kernel is normal mainstream kernel, without RT patches applied.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Is there any way to find out the power consumed by an application. Like if i have some ten user apps running on my laptop and would like to know how much power each application is consuming in Linux environment?
The PowerTop tool might have something for you. Lookup the section "Power usage". If the tool itself is not what you want, you can research, where the tool retrieves its information and evaluate them in the way you want.
That's an interesting question and does not have a easy answer that I've heard of.
Presuming that you have a way of metering the minute to minute consumption of the machine. You can get a crude approximation by examining the amount of CPU time used. Either by watching things in top, or by examining the output of time (1). Compare the machine's total power consumption in various states of idleness and load to the amount of work done by each process---with enough statistics you should have a solvable system...possibly even a over-constrained one that calls for some kind of best-fit solution.
The only way that occurs to me to do it to high precision would be to use
Instrumented virtual machine that accumulated statistics on what parts of the CPU were activated. (Do such things exist at this time?!?)
The manufacturers documentation for the chip-n-board you are running on to total up the power implied.
which would be a horribly complicated mess.
Sorting out which bits were needed just to provide the environment and which could be unambiguously attributed to the program won't be easy.
I have to ask...why?
I don't know if there's really a "good way" to do this. But here's a suggestion for a generic approach that would work regardless of operating system: Remove the battery from your laptop, and hook up its power adapter to a high-precision current meter. Note the draw when no "normal" applications are running. Then run each application on its own and note the differences in current draw.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
You know, these things. I assume they run on some old computer language/framework, anyone know what that might be?
The displays themselves are pretty basic, they (in most cases) just have a microcontroller with some firmware that allows them to convert commands they get serially into patterns and/or characters. The more recent ones also give feedback regarding broken LEDs for example. Typically these firmwares are written either in assembly or C.
The real intelligence of these systems is often located in a central control system that coordinates an entire city or even a state. These control systems can perform intelligent tasks on entire groups of signs like given the location of an accident, they add the correct distance to the accident to the warning message, automatically divert traffic, and so on.
I know of such systems written in C, C++, Java, G2, ... Depends on the moment they were designed. So no, they're not by definition outdated and antique! They do tend to have a longer lifespan than your average desktop app though which often leads to the oldest parts being swapped out for more recent developments and these newer modules will in many cases be based on more recent technologies.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I'm looking for answers to a few general questions as to how point of sale (POS) software and hardware generally works in brick-and-mortar stores. I realize there will be many edge cases given the sheer number of solutions out there, but I'm looking for answers on the most common setups...
So, here it goes:
I realize that there are several standards for hardware interface standardization (OPOS, JavaPOS, UnifiedPOS). However, what is most common these days?
When a credit or debit card is scanned, does the scanning device take care of processing the card, or is it transmitted to the main POS terminal, which then connects to the processing service for processing?
Are there any standards on software for the main POS terminal systems?
How are product identifiers generally stored - barcode, ASIN, proprietary standard?
Thanks in advance!
UnifiedPOS, as the name implies, appears to be the most universal standard. JavaPOS, as you might expect, is Java language specific, while OPOS is WIN32/COM based, which suggests that it is an older standard.
OPOS, JavaPOS, and POS for .NET are all based on the UnifiedPOS standard, and they all appear to have broad support. So your choice comes down to which programming language you want to use to develop the platform.
Hardware written to the UnifiedPOS standard should work with any of these platforms. The UnifiedPOS committee says that 36 different point-of-service peripheral types currently support the standard.