Help Logs Database

Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Ircnet  |  Dalnet
Page: 1 2 3 4 5 6

<xl0> bbls I tols him to go to some other net and not to bother people on freenode
<bbls> khc0d bothering=asking too many questions of the type: do you like?
<khc0d> bbls. what?
<khc0d> ..
<bbls> ask something like: has anyone tried to write an email based vbscript virus
<bbls> or something like that
<xl0> khc0d ti tut vseh uje zaebal. Dumay skoro tebya budut banit'
<khc0d> i write virus on asm
<bbls> don't ask questions just to ask
<bbls> ok
<khc0d> xl0 a chto ya sdelal? esli tebya ya dostal to spokoino mne skazhi,ya ne znau kakie tyt y vas nravi,potomy chto ya nedavno i mladshe vas.
<khc0d> bbls and i don't like vbscript :)
<khc0d> xl0 davai ne bydem portit dryg drygy nastroenie,i esli choto ne nravitsya to spokoino govorit ob etom. ok?
<xl0> khc0d 1) ti ne mladhe mnogih tut 2) ti dostal ne tolke menya 3)esli ti nedavno tut - milchi i slushai! smotri chto delaut drugie, chto tut schitaetsa dopustimim a chto - net.
<xl0> sorry
<khc0d> xl0 horosho.spasibo za sovet. no tolko ne nado tyt menya oskarblyat i povishat ton. mozhno mnogo problem re**** spokoino.
<xl0> dumau samoe spokoinoe reshenie - /ignore khc0d
<xl0> ili /ban khc0d ;)
<Cippo> what language is that??
<Cippo> russian?
<xl0> Cippo: transliterated Russian
<khc0d> xl0 i ya tyt po krainei mere tebya i drygih kto virazhaut nedovolstvo. ludi moego vozrasta ochen v horoshih otnosheniyah.
<khc0d> yes. it's russian.
<xl0> khc0d: ludei tvoego vozrasta v irc - 50%
<xl0> i bol'shenstvo vedet sebya adekvatno
<khc0d> ny horosho. a kak vedy sebya ya?
<bbls> pls stop that russian
<khc0d> cho takogo ya delau,neadekvatnogo.
<bbls> speak russian on private not on the channel
<khc0d> bbls. hey. do you think that i idiot?
<khc0d> xl0 think that :)
<bbls> well you are just not mature yet
<bbls> try to speak less :)
<xl0> It can't be helped, I give up
<khc0d> xl0. vsyo. ya yzhe zaebalsa. otstan ot menya i vsyo. ili v ignor postav i ostav menya v pokoe :) Ydachi!
<xl0> 21:22 Ignoring ALL from khc0d
<khc0d> bbls?
<geist> does everyone want me to kick him or something?
<khc0d> thank you.
<bbls> no, just -v :)
<khc0d> geist hi
<Cippo> ah, it just became SO quiet ;P
<bbls> -v would be good
<xl0> geist: please do it.
<khc0d> bbls heh. you do that what said xl0.
<khc0d> bbls who are he for you?god?
<geist> khc0d: ifyou're just bothering folks, cut it out
<khc0d> geist. :)
<geist> i can't read the russian, so I'm not really sure what you're saying
<khc0d> sorry.
<geist> good, I hate kicking folks
<khc0d> geist. many people don't like me here.
<Cippo> hehe :P
<Cippo> DO IT DO IT DO IT ;)
<geist> well, then try to be more likeable
<bbls> don't kick just -v
<Cippo> he dont have +v as far as i see...
<bbls> that's doable
<bbls> us to have +v
<bbls> he -v
<bbls> *we to have
<khc0d> geist. and i don't advice you to speak with me. because you will be in ban list.
<khc0d> bbls.
<xl0> lol
<xl0> ..
<khc0d> hey,bbls
<xl0> .
<khc0d> -v
<khc0d> +v
<khc0d> <br>
<khc0d> hhrrrr
<bbls> khc0d we are enjoyed to have you here, just don't bother us. speak less unless you have a good question to ask
<geist> khc0d: ?
<geist> I will be in ban list? WTF are you talking about?
<gr00ber> oh no, he's still around?
<bbls> gr00ber :)
<geist> bbls: also, I actually dont know the intracacies of the v bit
<geist> how does that work?
<bbls> you can restrict speaking on the channel to those with +v only
<gr00ber> +v is default?
<xl0> I think its +q (quiet)
<xl0> am I wrong?
<bbls> gr00ber no, depends on channel settings
<geist> I guess we were going too long with a functional channel
<edon> or +i
<bbls> no, not that
<bbls> i hate +i
<edon> no need for either
<bbls> geist well it's not that bad.. as in other channels. just the regular troll from time to time :)
<gr00ber> Anyway, what is a good way of implementing "sleep" ? I'm thinking about just adding a sleepTicks to my thread struct. So sleep(int ms) would translate ms into ticks. And for each tick, decrease sleepTicks by 1. The scheduler would then just skip threads who's sleepTicks > 0.
<gr00ber> Or seperate sleepy thread queue?
<geist> the former idea is bad
<geist> you'd have to iterate over every sleeping thread at every tick
<geist> expensive
<geist> what you need to do is start working on another subsystem: timers
<bbls> gr00ber for short ones you use a loop, for longer ones you have a ticks_more_to_sleep per thread
<geist> ugh no. that's a terrible idea
<bbls> heh :)
<geist> here's what you do. build a timer callback system
<geist> that lets you schedule a callback at some specified point in the future
<bbls> how then? you still need to manage the timer, maybe using a FIFO sorted by remaining_ticks
<geist> the callbacks are sorted in order of scheduled time, and at every tick you check to see if some events are ready to go off
<geist> you can build the sleep functionality on top of that by just setting a callback in the future that simply sticks the thread back into the run queue
<bbls> atm i have a list of threads that have to sleep and the tick number at what each thread has to be awaked
<bbls> (the tick number is a future tick number)
<bbls> that eliminates the incrementing/decrementing part
<geist> that'd work too, but the timer is useful in a number of places
<bbls> but you still have to traverse the entire list
<gr00ber> one-shot-fire
<geist> nope, keep it sorted
<geist> you only have to check the first entry
<gr00ber> the pop it off, right...
<bbls> yes, just that that would make it a little bit slower to insert a new sleeping thread
<bbls> i would need a good btree or something
<geist> it's not that big
<geist> you want to avoid spending time in the interrupt handler
<geist> optimize for that
<gr00ber> got it
<bbls> hmm, insertion is done once, checking is done each scheduler shot, so you must be right
<bbls> insertion is cheaper
<geist> it's nothing new. it's how virtually all systems do it
<bbls> heh, i haven't looked too much on how other systems do it :)
<geist> they all build a generic timer mechanism and then build all time stuff on top of that
<geist> you need it for other things like setting timeouts on acuiring resources
<gr00ber> indeed
<geist> signals, samplers, etc
<geist> in fact in newos I build sleep on top of my semaphores
<geist> my sem iomplementation will let you acquite with a timeout
<gr00ber> so the sem can go up when time is due
<geist> so I initialized a sleep sem with a count of zero, so anyone trying to acquire blocks
<geist> yeah, sleep just tries to acquire that sem with a timeout
<gr00ber> does it spin while trying?
<geist> of course not
<gr00ber> lol. good
<geist> it sticks the thread in the sem's queue, sets up a timer callback to go off whenever the timeout expires, reschedules
<geist> when the timer event goes off it pulls the thread out of the sem queue and sticks it back on the run queue and reschedules
<gr00ber> so, you depend on the timer... but doesn't that mean the timeout granularity is rather course grained?
<geist> right, it's as fine grained as the timer ticks
<gr00ber> i mean, if you'd need to sleep 1 ms?
<bbls> gtg
<bbls> bye everyone
<gr00ber> seeya
<bbls> c ya tommorow
<geist> well it depends on how you run the timer ticks
<geist> if you run them monotonically, ie you keep it running at a constant interval
<geist> then yeah, the timer events are going to be aligned on those boundaries
<geist> if you reprogram the hardware timer to always go off at the next pending event you can be more precise


Return to osdev
or
Go to some related logs:

ubuntu /proc/net/ipv4
metal

Copyright © 2005 www.irclogs.ws. All rights reserved. » disclaimer » contact