It's how read and write locks are supposed to work, but your
example isn't necessarily how they should be used.
The idea is that a piece of data can be kept consistent by *either*
• allowing any number of simultaneous readers *or*
• a single writer.
You can't have simultaneous readers and writers
Indeed, there's an assumption that each core manages the TLB by
examining the data structures at clock frequency. In a halt,
the clock interrupts still happen so I guess there's no need to
invalidate the TLBs just before halt.
You could set a variable indicating you're halted and cause other
core
Dunno about Sharp printers. For an HP inkjet here we have (thanks to Paurea)
beanbycoffe beanbean - gs!ljet4+HPJCL+nohead+1200dpi+duplex generic
lpdspool lpd generic hp
We have no FIFO entries enywhere
Sape
> I have (I think) the correct /sys/lib/lp/devices line:
>
> conv con
I think at the top of the page you set a trap to go off at the next line.
In the trap macro you reset the trap for the line after that. And so on,
down the page.
Sape
> Funny you should mention this. I know there is a way (done for patent
> applications). I think I can find it in the tro
> On Tue, Apr 12, 2011 at 2:38 PM, Peter A. Cejchan wrote:
>
>> do you mean 'graph', or 'chart' ?
>> ++pac
>>
>
> right now it's mostly charts.
I use these macros for generating color:
.de CL
\\X'PS \\$1 \\$2 \\$3 setrgbcolor'\\c
..
.de BK
\\X'PS 0 0 0 setrgbcolor'\\c
..
.de EM
\\$3\\X'PS 1 0
I suppose the use of counting semaphores in sleep/wakeup could
help in cases like this (but I'm sure there are still plenty of
other scenarios where they might not help). The value of the
semaphore would represent something like "number of things to
do", so acquire(sema) would (atomically) wait un
We pronouce it pie pee
> Is it Pi-Ro, or do you actually call it Pipi?
Are we talking about πP or 9P?
ΠP doesn't have Twalk. It has open, which combines clone, walk, and open from
9P. Before you start jumping up and down and telling me that you can't open
without revieing the qids from the walk (to check them for mount points), let
me tell you that we are also tack
I agree; packed data structures are a really bad idea. They're used
to match some hardware representation of some data structures and
that's not good: It's the compiler's prerogative to decide just how
the fields should be packed so therefore, the construct is never portable.
This is why we have n
> I'm working on some regression testing for my GSoC project and am trying
> to understand why
>
> ctl = open(path("ctl"),ORDWR|OAPPEND);
> ts = "chatty9p 1"; // or some other message
>
> n = fprint(ctl, ts);
>
> succeeds, while
>
> n = write(ctl,ts,sizeof(ts));
>
> fails.
>
> Can someon
s been written
> like this because traversing the queue might require too much time for
> having a lock.
>
> Phil;
>
> Sape Mullender wrote:
> > Well spotted. But the queue is maintained in a way that
> > traversing it while it's being changed cannot cause one
> > to
Well spotted. But the queue is maintained in a way that
traversing it while it's being changed cannot cause one
to address garbage (rnext always contains a pointer to a
proc or nil) and, at the label found, the sanity check
is performed to see if we really have a proc on the queue
in our hands.
> A while ago, while working on btfs, I stumbled upon some sort of
> overflow (http://9fans.net/archive/2009/07/77) which was in fact due
> to the thread STACK being too small (and hence if I understood
> correctly things would get written out of it, in the heap).
> To be on the safe side, I have i
Threads are great for preventing race conditions. I agree.
Many Plan 9 applications (ria, acme, etc.) use a central proc with lots of
threads doing the real work of manipulating the state of the application.
No locks are required, because the threads explicitly yield by doing
channel io or callin
If you really mean thread and not proc, then what you suggest won't work.
You can't kill a thread that's in the OS without killing the proc
conyaining the thread (thereby killing all the other threads as well).
You can have the proc catch notes and send a note to the proc which
will interrupt any s
> On Thu, 30 Jul 2009, erik quanstrom wrote:
>
>> On Thu Jul 30 00:05:45 EDT 2009, el...@andrew.cmu.edu wrote:
>>> My familiarity with the kernel source code is superficial to say the
>>> least, but it seems to me that this code (from /sys/src/9/pc/trap.c)
>>> contains a race condition:
>>>
>>>
Take a look at B, which can be used to send a file
to acme. Also you may want to familiarize yourself with plumb.
> Hello,
>
> Is there some idiom or method for using Acme as an external editor to some
> other program? Say I want to use it as the editor that is spawned when I
> do a CVS com
Very odd. There are no blocking operations in reading the status file in /proc.
The only thing I can think of is that you have something bound (snapfs?) in
/proc
and that you're hanging on a stale mount point.
Is the clock set properly on that machine?
Sape
> hello
>
> today i found 9g
Yes, but even if one venti always leaves the store in a consistent
state, running two may still cause them to wite differemt things to
the same place on disk and this is likely to result in havoc.
Sape
--- Begin Message ---
> Hmm. Running two ventis on the same data is, of course, bad. I
> i noticed something odd with venti and i am just trying to see if this
> is an issue and if this needs to be addressed.
>
> i think, by default, plan9 installation sets localhost as the address
> for venti in plan9.ini. but at some point i wanted venti to announce
> any (*) address. for some rea
man 2c(1)
--- Begin Message ---
Is there a cannonical table giving the mapping of
CPU type to CPU letter anywhere in the plan9
distribution?
e.g.
mips -> v
386 -> 8
etc.
-Steve--- End Message ---
typedef struct A A;
typedef struct B B;
struct A
{
int a1;
int a2;
};
struct B
{
A;
int b1;
int b2;
};
B bvar = {
.B = {
.a1 = 2,
.b1 = 2,
},
};
--- Begin Message ---
On Thu, Dec 4, 2008 at 1:07 PM, Gorka Guardiola <[EMAIL PRO
I wonder why there is a command to turn on DMA on disks. Could
it be that some disks don't work with DMA on?
Sape
--- Begin Message ---
Ran into an interesting one setting up my cpu server. The following
reliably freezes the box:
# echo dma on >/dev/sdC0/ctl
# 9fat:
Leaves the console
>> i don't see how csp is *not* parallel processing. as soon
>> as you have more than 1 work process per client, i would call
>> that parallel processing.
>
> It's a kind of parallelism, of course. But since it makes sense, it is
> not "parallelism" as the trend is today ;)
I don't know what the
> why can't venti and fossil on the same machine be connected by a pipe?
That would be far too logical.
Sape
> because I'm difficult you may need to [...]
>-eric
Amen.
> I just found out that .RS and .RE no longer work - they too keep the
> indent. Again, please revert to the older version.
>
> On May 12, 2008, at 4:26 PM, Pietro Gagliardi wrote:
>
>> Hello. The just-updated ms macro set for troff has a problem: if you
>> use .P1 and .P2, you have an .IP fo
> Thanks to fgb for his help and /sys/src/cmd/tweak.c for parts of the
> interface.
You might try control(2) instead. See
/sys/src/cmd/auth/factotum/fgui.c
/sys/src/cmd/bitsy/keyboard.c
for examples.
Sape
> echo -- -n
because we do gnot like that sort of stuff.
29 matches
Mail list logo