hardware

How to interpret /proc/mounts?

人盡茶涼 提交于 2019-12-03 05:47:27
问题 When i do the following. "cat /proc/mounts". tmpfs /export/ftp/import tmpfs rw,relatime,size=102400k 0 0 tmpfs /export/ftp/export tmpfs rw,relatime,size=10240k,mode=755 0 0 The documentation of embedded device said that import and export are located in DRAM However in other equipment ubi18_0 /nvdata1/temporary-download ubifs rw,sync 0 0 ubi18_0 /export/ftp/import ubifs rw,sync 0 0 ubi18_0 /export/http/import ubifs rw,sync 0 0 tmpfs /export/ftp/export tmpfs rw,size=10240k,mode=755 0 0 The

Multithreaded paranoia

南楼画角 提交于 2019-12-03 05:36:12
问题 This is a complex question, please consider carefully before answering. Consider this situation. Two threads (a reader and a writer) access a single global int . Is this safe? Normally, I would respond without thought, yes! However, it seems to me that Herb Sutter doesn't think so. In his articles on effective concurrency he discusses a flawed lock-free queue and the corrected version. In the end of the first article and the beginning of the second he discusses a rarely considered trait of

3D Graphics Processing - How to calculate modelview matrix

做~自己de王妃 提交于 2019-12-03 05:16:14
问题 I am having trouble understanding the math to convert from object space to view space. I am doing this in hardware and I have the Atranspose matrix below: ATranspose = [rightx upx lookx 0] [righty upy looky 0] [rightz upz lookz 0] [-eyeright -eyeup -eyelook 1] Then to find the point we would do: [x,y,z,1] = [x',y',z',1]*ATranspose xnew = xold*rightx + xold*righty + xold*rightz + xold*(-eyeright) but I am not sure if this is correct. It could also be [x,y,z,1]=atranspose*[x',y',z',1]T Can

Efficient way to implement LinkedIn like “How you are connected to” feature?

北城余情 提交于 2019-12-03 04:38:26
问题 LinkedIn has this cool feature in which while visiting some user's profile, LinkedIn prompts how you are connecting to that user through the network. Assuming that the visitor and the profile owner are two nodes of a graph where the nodes represent users and edge represents friendship, a simple solution could be a bfs starting from both the nodes up to certain level and see if there are any intersections. The intersections would be the network link-nodes. Although this sounds neat, the

Where can I start with programmable Hardware?

血红的双手。 提交于 2019-12-03 04:20:56
问题 I've had a desire to learn at least a tiny bit about programming hardware for quite some time now and thought I'd ask here to get some starting points. I am a reasonably accomplished programmer with Delphi and Objective-c experience but have never even listened to a device port / interupt (I dont even know the terminology) let alone programmed a piece of hardware. To start with what I would like to be able to do is, Buy a simple bit of kit with 2,3 or 10 buttons Plug the device into my pc via

Why is number of bits always(?) a power of two?

╄→гoц情女王★ 提交于 2019-12-03 03:25:50
问题 We have 8-bit, 16-bit, 32-bit and 64-bit hardware architectures and operating systems. But not, say, 42-bit or 69-bit ones. Why? Is it something fundamental that makes 2^n bits a better choice, or is just about compatibility with existing systems? (It's obviously convenient that a 64-bit register can hold two 32-bit pointers, or that a 32-bit data unit can hold 4 bytes.) 回答1: That's mostly a matter of tradition. It is not even always true. For example, floating-point units in processors (even

What's the best way to learn how to build circuits [closed]

大兔子大兔子 提交于 2019-12-03 02:52:16
问题 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 5 years ago . I've always wanted to have a better understanding of what is happening at the hardware level. As a practical level, anything after compile equals 'magic' and I'd like to remedy that. I'd like to investigate building circuits and then moving up to assembly programming on basic chip sets, both for my own sake and

$readmemh $writememh related resources

早过忘川 提交于 2019-12-03 02:29:27
Suddenly, I am made to look into some verilog testbench code which heavily uses $readmemh, and $writememh. I understood that it basically read to memory and write to memory. I will be happy if you can point to some resources related to those routines. PS: I searched in google for no success. (I am very ... very new to Verilog) I agree its not too easy to find something about readmem/writemem. You can find a little bit here: http://fullchipdesign.com/index_files/readmemh.htm Anyway there is not too much to say about these functions, the syntax is: $readmem[hb]("File",ArrayName,StartAddr,EndAddr

What's the difference between “COM”, “USB”, “Serial Port”? [closed]

徘徊边缘 提交于 2019-12-03 02:21:54
问题 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 4 years ago . I am confused about the these 3 concepts. My understanding is, Serial Port usually means RS-232 compatible port (RS = Recommended Standard). USB stands for Universal Serial Bus . So its name contains serial port, does it support RS-232? What does the Universal mean? And what does COM port mean? ADD 1 Some

How does cpu communicate with peripherals?

半腔热情 提交于 2019-12-03 01:58:24
问题 i assume cpu has direct access to motherboard's BIOS and RAM.(correct me if i'm wrong) But how does cpu communicate with other hardware like hdds, expansion cards, peripherals, other BIOSes etc.? I know about OS and its drivers, but they are software- they're in RAM. How does cpu communicate with all this hardware on hardware level? Isn't it limited to only motherboard's BIOS and RAM? 回答1: In older architectures, peripherals were accessed via a separate mechanism to memory access with special