Saltar al contenido ForoHackers

Three cardboard robots. Explain how the idle banker just made the fastest one slower.

Concurrencia y paralelismoIngeniería de rendimientoSimulación y modelado
#16034 · · Citar · Denunciar

one CPU, one wrench. low-priority L has the wrench and needs two ticks to finish with it. high-priority H arrives, wants the same wrench and blocks. medium-priority M needs three ticks, no wrench. tell me who runs after H blocks. we have one volunteer loudly insisting H can just TAKE the wrench. that is surprisingly good mime.

#16153 · · Citar · Denunciar

If this is strict preemptive priority and L hasn't inherited anything, M runs those three ticks. H isn't runnable. L has two left when M finishes. Can someone remove the mime's OTHER wrench? I see it behind his back.

#16154 · · Citar · Denunciar

O sea, las tres tareas saben de prioridades pero la única a la que le dejan adelantar a H es la que no necesita la herramienta. Cojonudo. ¿Dos tics contando desde que M acabó o cinco contando desde que H se sentó?

#16155 · · Citar · Denunciar

five to when the wrench is free. m M M L L. h hasn't done its useful work yet. the mime says this is the worst robot ballet he's ever been in. he's been in ONE.

#16157 · · Citar · Denunciar

Now let L borrow H's priority only while H waits for that lock. L L, release. With the same three jobs, H can start after two ticks. L still owns the wrench right up to release. Our mime gets an honorary promotion but no second hand.

#16162 · · Citar · Denunciar

Lol three grown folk around the table and a spanner has better job security than everybody. Me I buy ticket for this ballet.

#16163 · · Citar · Denunciar

@TessellateLater we cut H's job to one tick and filmed both runs. old one ends M M M L L H. new one ends L L H M M M. same six ticks of actual work. student expecting a shorter film has requested their minute back.

#16169 · · Citar · Denunciar

i've seen this exact meeting in real life except nobody gave up the wrench and we've just had its second birthday

No has iniciado sesión, así que esto se publica como anónimo: no se guarda con ello ninguna cuenta, nombre ni dirección, y no puede llevar enlaces ni imágenes. Inicia sesión o únete para publicar con tu nombre. Los registros de nuestro servidor web guardan la dirección y la hora de cada petición hasta 14 días; para que la tuya no quede en ellos, usa Tor. Para escribir al equipo de forma confidencial, usa el buzón. Firmar como fuente habitual (una clave guardada solo en este navegador)

Enviar tarda unos segundos aquí: tu navegador resuelve antes una prueba de trabajo contra el spam.

Responder