processor

Write access violation on read instruction

穿精又带淫゛_ 提交于 2019-12-22 11:28:49
问题 We use SQLite library in our product and suddenly after recompilation with different compiler version (Visual C++) it started crashing on customer computers. The crash is ExceptionAddress: 0710eadd (sqlite3!sqlite3_transfer_bindings+0x0004e5bd) ExceptionCode: c0000005 (Access violation) ExceptionFlags: 00000000 NumberParameters: 2 Parameter[0]: 00000001 Parameter[1]: 07148688 Attempt to write to address 07148688 and the code causing the crash is the following (part of sqlite3MutexInit):

Processor/socket affinity in openMPI?

让人想犯罪 __ 提交于 2019-12-20 09:45:47
问题 I know,there are some basic function in openMPI implementation for mapping the different processes to different cores of different sockets(if the system have more than one sockets). --bind-to-socket (first come first serve) --bysocket (round-robin,based on load balencing) --npersocket N (assign N processes to each socket) --npersocket N --bysocket (assign N process to each socket , but in a round-robin basis) --bind-to-core (binds one process to each core in a sequential fashion) --bind-to

What is a clock cycle and clock speed?

你离开我真会死。 提交于 2019-12-20 09:36:25
问题 I have been reading a book about the Computer's Processor. And i came across some of the terms like clock Ticks, clock Cycle and Clock Speed that i am finding very difficult to understand. I will be very thankful if someone can clarify this in a simple language. Thanks in advance ! 回答1: Clock Cycle is the speed of a computer processor, or CPU, is determined by the clock cycle, which is the amount of time between two pulses of an oscillator. Generally speaking, the higher number of pulses per

assembly instruction set for my processor

你。 提交于 2019-12-20 02:10:47
问题 Dear all, this is a simple question, I think. How do I find the instruction set for my processor? proc/cpu gives me (a vanilla cpu): processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz stepping : 10 cpu MHz : 1200.000 cache size : 2048 KB where do I find documentation about the instruction set for this? I'd like to get info to unlock gcc 's .s files to know how it's translating my code. Please accept my apologies if the

Why does 20 address space with on a 16 bit machine give access to 1 Megabyte and not 2 Megabytes?

走远了吗. 提交于 2019-12-19 09:59:39
问题 OK, this question sounds simple but I am taken by surprise. In the ancient days when 1 Megabyte was a huge amount of memory, Intel was trying to figure out how to use 16 bits to access 1 Megabyte of memory. They came up with the idea of using segment and offset address values to generate a 20 bit address. Now, 20 bits gives 2^20 = 1,048,576 locations that can be addressed. Now assuming that we access 1 byte per address location we get 1,048,576/(1024*1024) = 2^20/2^20 Megabytes = 1 Megabyte.

Why does 20 address space with on a 16 bit machine give access to 1 Megabyte and not 2 Megabytes?

让人想犯罪 __ 提交于 2019-12-19 09:59:11
问题 OK, this question sounds simple but I am taken by surprise. In the ancient days when 1 Megabyte was a huge amount of memory, Intel was trying to figure out how to use 16 bits to access 1 Megabyte of memory. They came up with the idea of using segment and offset address values to generate a 20 bit address. Now, 20 bits gives 2^20 = 1,048,576 locations that can be addressed. Now assuming that we access 1 byte per address location we get 1,048,576/(1024*1024) = 2^20/2^20 Megabytes = 1 Megabyte.

Is multithreading faster than single thread?

浪尽此生 提交于 2019-12-19 08:44:40
问题 I want to check whether multithreading is faster than single thread,then I make a demo here: public class ThreadSpeedTest { /** * @param args */ public static void main(String[] args) { System.out.println("cpu number:" + Runtime.getRuntime().availableProcessors()); singleThreadStart(); // secondThreadStart(); // fiveThreadStart(); } private static void sum() { long sum = 0; for (int i = 0; i < 1000000; i++) { sum += i; } System.out.println(sum); } private static void singleThreadStart() { new

setting processor affinity with C++ that will run on Linux [duplicate]

情到浓时终转凉″ 提交于 2019-12-19 04:17:10
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: CPU Affinity I'm running on Linux and I want to write a C++ program that will set 2 specific processors that my 2 applications that will run in parallel (i.e. setting each process to run on a different core/CPU). I want to use processor affinity tool with C++. Please can anyone help with C++ code. 回答1: From the command line you can use taskset(1), or from within your code you can use sched_setaffinity(2). E.g.

The difference between Call Gate, Interrupt Gate, Trap Gate?

血红的双手。 提交于 2019-12-18 09:56:11
问题 I am studying Intel Protected Mode. I found that Call Gate, Interrupt Gate, Trap Gate are almost the same. In fact, besides that Call Gate has the fields for parameter counter, and that these 3 gates have different type fields, they are identical in all other fields. As to their functions, they are all used to transfer code control into some procedure within some code segment. I am wondering, since these 3 gates all contain the information needed for the call across privilege boundaries. Why

C++ get Processor ID

点点圈 提交于 2019-12-18 01:05:32
问题 This thread is ok. How to get Processor and Motherboard Id? I wanted to get processor ID using C++ code not using WMI or any third party lib. OR anything on a computer that turns out to be unique. One thing is Ethernet ID but which is again removable on some machines. This I want to use mostly for licensing purpose. Is processor ID unique and available on all major processors? 回答1: I had a similar problem lately and I did the following. First I gained some unique system identification values: