Home > other >  PC, register under a machine problem, the great god answers
PC, register under a machine problem, the great god answers

Time:10-03

Specific problem is:
I read from the lower machine four decimal number, 9876, for example, save to register, register storage hexadecimal data, 9876 turn hexadecimal is 2694, I put the 26 in 1 hanjie xuebao/transactions into the registers 2, then read upper machine, show the decimal, how to register in the 1, 2, according to the data into a decimal 0 can't omit,
G_pucTX0Buffer [5]=(PST_data [42]/10 & amp; 0 XFF) + 0 x30;//high four ASC code
G_pucTX0Buffer [6]=(PST_data [42] % 10 & amp; 0 XFF) + 0 x30;//low four
G_pucTX0Buffer [7]=(PST_data [43]/10 & amp; 0 XFF) + 0 x30;
G_pucTX0Buffer [8]=(PST_data [43] % 10 & amp; 0 XFF) + 0 x30;
G_pucTX0Buffer [9]=(PST_data [44]/10 & amp; 0 XFF) + 0 x30;
G_pucTX0Buffer [10]=(PST_data [44] % 10 & amp; 0 XFF) + 0 x30;
G_pucTX0Buffer [11]=(PST_data [45]/10 & amp; 0 XFF) + 0 x30;
G_pucTX0Buffer [12]=(PST_data [45] % 10 & amp; 0 XFF) + 0 x30;
G_pucTX0Buffer [13]=(PST_data [46]/10 & amp; 0 XFF) + 0 x30;
G_pucTX0Buffer [14]=(PST_data [46] % 10 & amp; 0 XFF) + 0 x30;
Temp=0;
G to show the digits, PST for register, a great god answers,

CodePudding user response:

O great god answer..

CodePudding user response:

Create a process, in the process to write a number of data memory, and then read the data, then exits, this process is repeated 1000 times, 1000 times is equivalent to create/destroy process, on my machine test result is: UbuntuLinux: takes 0.8 seconds Windows 7: takes 79.8 seconds both costs are roughly one hundred times, this means that in Windows, the process to create the overhead of nots allow to ignore, in other words, don't recommend that you create in Windows programming process, if you need a large number of creating process application architecture, then it is better to switch to the Linux system, a large number of typical example of creating process has two, one is the gnu autotools tool chain, used to compile a lot of open source code, they compiled under the Windows will be very slow, so it is best to avoid using the Windows software developers, the other is a server, some server framework, relying on a large number of creating process to do the work, even for every user request is to create a process, the servers run under Windows efficiency is very poor, this "may" is also looking around the world, Linux server is far more than the cause of the Windows server,

Author: pansz
Link: https://www.zhihu.com/question/19901763/answer/13299543
Source: zhihu
Copyright owned by the author, commercial reproduced please contact the author for authorization, non-commercial reprint please indicate the source,