Atomic I/O letters column #119

Originally published 2010, in Atomic: Maximum Power Computing
Reprinted here July 17, 2011
Last modified 16-Jan-2015.
 

Click here to waste another $14

Every time I want to print a photo, my Stylus Photo has at least 3 blocked nozzles. The unblock routine sometimes works first try, but usually needs a couple, and apparently it works by just pissing ink into a little sponge inside the printer. This is not just annoying but also really expensive.

Now I haven't printed any photos for a couple of hot months, and it looks as if there are more blocked nozzles than unblocked. I did a couple of clean cycles, but at this rate I'll have to use a whole set of cartridges to clean it out. And apparently there's no guarantee even then.

Is there any other way to do this? Preferably one that involves some cleaning substance cheaper than Grange Hermitage?

Logan

Colourful paper towel
Clean your printer, and get a free psychedelic Rorschach test!

Answer:
Yes, it is possible to clean printer nozzles with something other than staggeringly expensive ink. You probably won't even screw up your printer. Window-cleaner with ammonia in it can do the job, and the procedure is generally

1: Slide the head out where you can work on it, with a sponge or paper towel under it
2: Remove the cartridges
3: Dribble your Windex-or-whatever through the head assembly, or even squirt small amounts of cleaner in with a syringe
4: Remove colourful paper towel, replace cartridges, power up printer, hope for the best.

(All usual disclaimers apply here, of course. There are several ways to break a printer by doing this. The management disclaims all responsibility.)

The exact technique for different models of printer varies, but this routine is now well enough known that you can find discussions about it for many different models - just searching for the printer name and "windex" often does the trick. There are even techniques to use with inkjet printers that have cartridges that incorporate the print head, which can still block before you use all of the ink.

 

Core wars

How do I make a program only use a particular CPU or group of CPUs, without using Task Manager?

The Witcher kept crashing, so I was dicking around with the graphics settings and so forth. That didn't help, but then I thought of setting the game process to only use one CPU (of the 8 "CPUs" I have on a 4-core i7 with Hyper-Threading). "Set Affinity" in Task Manager (Windows 7, 64-bit) let me do that, and that fixed it! I think!

But the game supports multithreading, so I tried giving it 2 CPUs to use, and that seems OK too. I think it just freaks out if it gets ALL of the CPUs.

I looked on microsoft.com and found there's a utility, "imagecfg", that lets you modify an executable to only run on particular CPUs. But if I do that I bet game updates will fail. And if I stick with Task Manager, I have to re-set the affinity every time I run the game.

Can't I just automate whatever it is that Task Manager does when you Set Affinity?

Alex

Whimsical CPU affinity settings
Now do a smiley face!

Answer:
There are standalone utilities that let you set the priority and affinity of particular processes whenever you run them, but you can also just use the command-line START command.

Among START's numerous options (open a command window and type "start /?" to see them all) is affinity-setting. If you want to restrict, say, Notepad to only run on CPU 2, you could type

start /affinity 4 c:\windows\notepad

To make this a point-and-click operation, you'd make a shortcut to the program you want to run, then go to the shortcut's properties and change the "target" line to have start /affinity et cetera at the beginning of it. (Remember to put quotes around the target statement when there are spaces in it.)

The only tricky part of this is why CPU 2 equals /affinity 4. It's because the number you put there is actually hexadecimal - the hex value of a "binary mask" that identifies each CPU.

Which is, fortunately, not as complicated as it sounds.

If you've got a Hyper-Threaded four-core CPU, your computer does indeed think you've got eight CPUs, numbered 0 to 7 (because computers usually start counting at zero). Each of those CPUs gets one digit of the eight-digit binary mask number, CPU 0 getting the least-significant bit at the right and CPU 7 getting most-significant at the left. So if you wanted a task to run on CPUs 0, 1 and 4, the mask would be 00010011.

You can convert binary, decimal and hex numbers in many automated ways (Google will do it for you using the "0b" and "0x" prefixes to indicate binary and hex). It's a good idea to do it by hand a couple of times, though, if base-2 and base-16 are not yet familiar to you.

In decimal the rightmost number indicates units, the next one tens, then hundreds, and so on, with digits 0 through 9 allowed. In binary it's units, twos, fours, eights and so on, with only zeroes and ones. In hex it's units, 16s, 256s and so on, with digits 0 through F. So binary 10011 (0b10011, to avoid confusion with decimal ten thousand and eleven) is one unit, one two, no four, no eight, and one 16, for a total of 19 in decimal. 19-decimal is three units plus one 16 in hex, or "13" (0x13, to avoid confusion with decimal thirteen). So to set a program's affinity to those CPUs you'd type start /affinity 13 [program].

It's harmless to run Notepad over and over with different affinities, so you can just experiment with the command line until you get a handle on the mask idea.

Note that Hyper-Threading turns each physical CPU core into two virtual CPUs. "CPUs" 0 and 1 are both on the first physical core, CPUs 2 and 3 are the next one, and so on. If you set a multithreaded process's affinity to "CPUs" 2 and 3, it may run faster than it would on only one "CPU", but to get the full benefit you need to spread the process across more than one physical core, by telling it to use CPUs 2 and 4, for instance.

(This also means that if you're setting process affinity so that, for instance, a couple of CPU-intensive single-threaded tasks can be confined to one CPU each, you won't get much benefit if you assign them to two "CPUs" that are both actually the same core.)

 

Just use a nail gun

I'm building a new PC in this awesome server case I found in the "old broken junk" room at work. It has a ton of 5.25 bays, which I'll put hard drives in with adapter rails, and there's a bay for some sort of redundant power supply that an ATX PSU roughly fits. The back panel should be OK, too; I'll just drill and hacksaw holes where they're needed.

Motherboard mounting is a problem, though. The case used to have some giant Alpha or something board in it, and there are round metal standoffs that seem to be welded in place, that don't line up with ATX mobo mounting holes at all.

I'm wondering whether I should angle-grind the standoffs away and drill new holes for standard hexagonal PC standoffs. I'd have to be pretty accurate with the drilling, though. Could I just put a sheet of plastic or something over the standoffs and fix the mobo onto that? Would this cause earthing problems?

I'm not planning to carry this computer to LAN parties or anything (MUCH too heavy), so a mobo mount that's a bit wonky and wobbly would be OK. What would you do?

Mitchell

Answer:
The motherboard does need to be earthed, but this isn't a big problem - if the PSU and expansion card brackets are in contact with the chassis, that ought to do it. You could easily wire a unused mounting-screw spot to a point on the chassis as well, if you liked. (Use of automotive 2-gauge braided-copper earth strapping is optional.)

Apart from this, all your mounting method has to do is line up the mobo with the back of the case, not interfere with anything sticking out of the underside of the board (like the CPU mounting frame), and prevent the back of the motherboard from touching the chassis and shorting random solder pads to ground.

All sorts of improbable-sounding ideas would work. Yes, some non-conductive sheet attached to the existing mounts and to the mobo. Or a wooden frame. Or even a scribble of caulking-gun construction adhesive, if you never intended to remove the mobo again.

I'm tempted to suggest polycaprolactone plastic as a universal replacement for all sorts of plastic clips and knobs and standoffs. At room temperature it's like white nylon, but at about 60°C it becomes a clear, sticky substance that you can mould like Blu-Tack, and reuse indefinitely. Australian shoppers can buy it under the name "Polymorph" from Jaycar, and I ramble on about it (and suppliers in other countries, and for larger quantities) here.

That low melting point means polycaprolactone could turn back into clear goop in a hot PC, though. It'd be OK for side brackets for a motherboard in a decently-ventilated case, but questionable as a standoff near the CPU.

 

Other letters columns

I/O #1
I/O #2
I/O #3
I/O #4
I/O #5
I/O #6
I/O #7
I/O #8
I/O #9
I/O #10
I/O #11
I/O #12
I/O #13
I/O #14
I/O #15
I/O #16
I/O #17
I/O #18
I/O #19
I/O #20
I/O #21
I/O #22
I/O #23
I/O #24
I/O #25
I/O #26
I/O #27
I/O #28
I/O #29
I/O #30
I/O #31
I/O #32
I/O #33
I/O #34
I/O #35
I/O #36
I/O #37
I/O #38
I/O #39
I/O #40
I/O #41
I/O #42
I/O #43
I/O #44
I/O #45
I/O #46
I/O #47
I/O #48
I/O #49
I/O #50
I/O #51
I/O #52
I/O #53
I/O #54
I/O #55
I/O #56
I/O #57
I/O #58
I/O #59
I/O #60
I/O #61
I/O #62
I/O #63
I/O #64
I/O #65
I/O #66
I/O #67
I/O #68
I/O #69
I/O #70
I/O #71
I/O #72
I/O #73
I/O #74
I/O #75
I/O #76
I/O #77
I/O #78
I/O #79
I/O #80
I/O #81
I/O #82
I/O #83
I/O #84
I/O #85
I/O #86
I/O #87
I/O #88
I/O #89
I/O #90
I/O #91
I/O #92
I/O #93
I/O #94
I/O #95
I/O #96
I/O #97
I/O #98
I/O #99
I/O #100
I/O #101
I/O #102
I/O #103
I/O #104
I/O #105
I/O #106
I/O #107
I/O #108
I/O #109
I/O #109
I/O #110
I/O #111
I/O #112
I/O #113
I/O #114
I/O #115
I/O #116
I/O #117
I/O #118
I/O #119
I/O #120
I/O #121
I/O #122
I/O #123
I/O #124
I/O #125
I/O #126
I/O #127
I/O #128
I/O #129
I/O #130
I/O #131
I/O #132
I/O #133
I/O #134
I/O #135
I/O #136
I/O #137
I/O #138
I/O #139
I/O #140
I/O #141
I/O #142
I/O #143
I/O #144
I/O #145
I/O #146
I/O #147
I/O #148
I/O #149
I/O #150
I/O #151
I/O #152
I/O #153
I/O #154
I/O #155
I/O #156
I/O #157
I/O #158
I/O #159
I/O #160
I/O #161
I/O #162
I/O #163
I/O #164
Dan's Data letters #1
Dan's Data letters #2
Dan's Data letters #3
Dan's Data letters #4
Dan's Data letters #5
Dan's Data letters #6
Dan's Data letters #7
Dan's Data letters #8
Dan's Data letters #9
Dan's Data letters #10
Dan's Data letters #11
Dan's Data letters #12
Dan's Data letters #13
Dan's Data letters #14
Dan's Data letters #15
Dan's Data letters #16
Dan's Data letters #17
Dan's Data letters #18
Dan's Data letters #19
Dan's Data letters #20
Dan's Data letters #21
Dan's Data letters #22
Dan's Data letters #23
Dan's Data letters #24
Dan's Data letters #25
Dan's Data letters #26
Dan's Data letters #27
Dan's Data letters #28
Dan's Data letters #29
Dan's Data letters #30
Dan's Data letters #31
Dan's Data letters #32
Dan's Data letters #33
Dan's Data letters #34
Dan's Data letters #35
Dan's Data letters #36
Dan's Data letters #37
Dan's Data letters #38
Dan's Data letters #39
Dan's Data letters #40
Dan's Data letters #41
Dan's Data letters #42
Dan's Data letters #43
Dan's Data letters #44
Dan's Data letters #45
Dan's Data letters #46
Dan's Data letters #47
Dan's Data letters #48
Dan's Data letters #49
Dan's Data letters #50
Dan's Data letters #51
Dan's Data letters #52
Dan's Data letters #53
Dan's Data letters #54
Dan's Data letters #55
Dan's Data letters #56
Dan's Data letters #57
Dan's Data letters #58
Dan's Data letters #59
Dan's Data letters #60
Dan's Data letters #61
Dan's Data letters #62
Dan's Data letters #63
Dan's Data letters #64
Dan's Data letters #65
Dan's Data letters #66
Dan's Data letters #67
Dan's Data letters #68
Dan's Data letters #69
Dan's Data letters #70
Dan's Data letters #71
Dan's Data letters #72
Dan's Data letters #73
Dan's Data letters #74
Dan's Data letters #75
Dan's Data letters #76
Dan's Data letters #77
Dan's Data letters #78
Dan's Data letters #79
Dan's Data letters #80
Dan's Data letters #81
Dan's Data letters #82
Dan's Data letters #83
Dan's Data letters #84
Dan's Data letters #85
Dan's Data letters #86
Dan's Data letters #87
Dan's Data letters #88
Dan's Data letters #89
Dan's Data letters #90
Dan's Data letters #91
Dan's Data letters #92
Dan's Data letters #93
Dan's Data letters #94
Dan's Data letters #95
Dan's Data letters #96
Dan's Data letters #97
Dan's Data letters #98
Dan's Data letters #99
Dan's Data letters #100
Dan's Data letters #101
Dan's Data letters #102
Dan's Data letters #103
Dan's Data letters #104
Dan's Data letters #105
Dan's Data letters #106
Dan's Data letters #107
Dan's Data letters #108
Dan's Data letters #109
Dan's Data letters #110
Dan's Data letters #111
Dan's Data letters #112
Dan's Data letters #113
Dan's Data letters #114
Dan's Data letters #115
Dan's Data letters #116
Dan's Data letters #117
Dan's Data letters #118
Dan's Data letters #119
Dan's Data letters #120
Dan's Data letters #121
Dan's Data letters #122
Dan's Data letters #123
Dan's Data letters #124
Dan's Data letters #125
Dan's Data letters #126
Dan's Data letters #127
Dan's Data letters #128
Dan's Data letters #129
Dan's Data letters #130
Dan's Data letters #131
Dan's Data letters #132
Dan's Data letters #133
Dan's Data letters #134
Dan's Data letters #135
Dan's Data letters #136
Dan's Data letters #137
Dan's Data letters #138
Dan's Data letters #139
Dan's Data letters #140
Dan's Data letters #141
Dan's Data letters #142
Dan's Data letters #143
Dan's Data letters #144
Dan's Data letters #145
Dan's Data letters #146
Dan's Data letters #147
Dan's Data letters #148
Dan's Data letters #149
Dan's Data letters #150
Dan's Data letters #151
Dan's Data letters #152
Dan's Data letters #153
Dan's Data letters #154
Dan's Data letters #155
Dan's Data letters #156
Dan's Data letters #157
Dan's Data letters #158
Dan's Data letters #159
Dan's Data letters #160
Dan's Data letters #161
Dan's Data letters #162
Dan's Data letters #163
Dan's Data letters #164
Dan's Data letters #165
Dan's Data letters #166
Dan's Data letters #167
Dan's Data letters #168
Dan's Data letters #169
Dan's Data letters #170
Dan's Data letters #171
Dan's Data letters #172
Dan's Data letters #173
Dan's Data letters #174
Dan's Data letters #175
Dan's Data letters #176
Dan's Data letters #177
Dan's Data letters #178
Dan's Data letters #179
Dan's Data letters #180
Dan's Data letters #181
Dan's Data letters #182
Dan's Data letters #183
Dan's Data letters #184
Dan's Data letters #185
Dan's Data letters #186
Dan's Data letters #187
Dan's Data letters #188
Dan's Data letters #189
Dan's Data letters #190
Dan's Data letters #191
Dan's Data letters #192
Dan's Data letters #193
Dan's Data letters #194
Dan's Data letters #195
Dan's Data letters #196
Dan's Data letters #197
Dan's Data letters #198
Dan's Data letters #199
Dan's Data letters #200
Dan's Data letters #201
Dan's Data letters #202
Dan's Data letters #203
Dan's Data letters #204
Dan's Data letters #205
Dan's Data letters #206
Dan's Data letters #207
Dan's Data letters #208
Dan's Data letters #209
Dan's Data letters #210



Give Dan some money!
(and no-one gets hurt)