Pido una favor para los que tenéis Raspeberry 2 u otro cacharro ARM con varios núcleos (y compilador instalado), es para asegurarme que un código en ensamblador funciona correctamente en ARM con multiprocesador (es para el libro https://gallir.wordpress.com/principios-de-concurrencia/)
Sólo tenéis que hacer make y generará el ejecutable. Luego quiero que lo probéis varias veces, debe salir algo como:
./stack_llsc_freelist
3 malloc
2 malloc
1 malloc
0 malloc
End 1
End 3
End 2
End 0
El orden no importa, no deben salir más de cuatro malloc (es posible que salga alguno menos). Tampoco debería salir ningún mensaje de cola vacía o de errores de punteros. Como es un tema de concurrencia, la probabilidad que salga es baja, por eso mejor probarlo varias veces (o si trasteáis con el código, aumentarle el número de OPERATIONS en el .c).
Si me podéis dar los tiempos mejor, en mi Raspberry 1 (no tengo la dos todavía, por eso pido ayuda) sale lo siguiente:
$ time ./stack_llsc_freelist
3 malloc
2 malloc
1 malloc
0 malloc
End 3
End 0
End 1
End 2
#18 Error in 2 it shouldn't be empty
3 malloc
2 malloc
Error in 2 it shouldn't be empty
2 malloc
Error in 0 it shouldn't be empty
Error in 0 it shouldn't be empty
0 malloc
Error in 3 it shouldn't be empty
Error in 2 it shouldn't be empty
3 malloc
3 malloc
1 malloc
2 malloc
Error in 0 it shouldn't be empty
Error in 0 it shouldn't be empty
3 malloc
Error in 2 it shouldn't be empty
2 malloc
3 malloc
Error in 0 it shouldn't be empty
0 malloc
3 malloc
3 malloc
2 malloc
2 malloc
Error in 2 it shouldn't be empty
2 malloc
Error in 0 it shouldn't be empty
0 malloc
Error in 2 it shouldn't be empty
2 malloc
Error in 3 it shouldn't be empty
3 malloc
3 malloc
Error in 2 it shouldn't be empty
2 malloc
3 malloc
0 malloc
Error in 2 it shouldn't be empty
3 malloc
Error in 0 it shouldn't be empty
0 malloc
Error in 0 it shouldn't be empty
0 malloc
3 malloc
2 malloc
Error in 3 it shouldn't be empty
3 malloc
Error in 0 it shouldn't be empty
Error in 3 it shouldn't be empty
3 malloc
Error in 2 it shouldn't be empty
2 malloc
0 malloc
3 malloc
Error in 0 it shouldn't be empty
0 malloc
Error in 3 it shouldn't be empty
0 malloc
Error in 2 it shouldn't be empty
2 malloc
2 malloc
2 malloc
2 malloc
Error in 3 it shouldn't be empty
2 malloc
Error in 0 it shouldn't be empty
0 malloc
0 malloc
Error in 3 it shouldn't be empty
3 malloc
3 malloc
3 malloc
2 malloc
Error in 2 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
3 malloc
0 malloc
Error in 0 it shouldn't be empty
0 malloc
0 malloc
Error in 2 it shouldn't be empty
0 malloc
2 malloc
Error in 0 it shouldn't be empty
0 malloc
0 malloc
0 malloc
Error in 2 it shouldn't be empty
3 malloc
2 malloc
Error in 3 it shouldn't be empty
0 malloc
Error in 2 it shouldn't be empty
Error in 2 it shouldn't be empty
2 malloc
2 malloc
0 malloc
2 malloc
1 malloc
Error in 0 it shouldn't be empty
0 malloc
1 malloc
3 malloc
0 malloc
Error in 3 it shouldn't be empty
0 malloc
Error in 1 it shouldn't be empty
1 malloc
Error in 0 it shouldn't be empty
0 malloc
3 malloc
Error in 3 it shouldn't be empty
3 malloc
3 malloc
Error in 0 it shouldn't be empty
0 malloc
Error in 1 it shouldn't be empty
1 malloc
3 malloc
0 malloc
Error in 1 it shouldn't be empty
1 malloc
1 malloc
Error in 3 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
0 malloc
Error in 0 it shouldn't be empty
0 malloc
Error in 1 it shouldn't be empty
1 malloc
0 malloc
0 malloc
Error in 1 it shouldn't be empty
1 malloc
Error in 1 it shouldn't be empty
1 malloc
1 malloc
Error in 0 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
3 malloc
0 malloc
0 malloc
3 malloc
Error in 0 it shouldn't be empty
0 malloc
2 malloc
Error in 2 it shouldn't be empty
2 malloc
1 malloc
Error in 0 it shouldn't be empty
0 malloc
End 1
End 3
End 0
End 2
#19 Subí otra versión, ya me han dicho que funciona correctamente en un ARM con varios núcleos. ¿Podrías verificar cuando puedas y tengas ganas? Gracias
#16 no te lo tomes a mal, pero es que verte pidiendo estas cosas aquí es "ridículo".
Mirate cualquier cubie o placa similar, hay stock de sobra y te sirve para lo que quieres mejor que esperar a que alguien te compile y ejecute el código.
espera la imagen que te he puesto es el de esta mañana que pusiste...la nueva versión si me suelta problemas.
Lineas finales, pero más o menos igual
Error in 1 it shouldn't be empty
1 malloc
2 malloc
3 malloc
1 malloc
Error in 3 it shouldn't be empty
3 malloc
3 malloc
2 malloc
Error in 2 it shouldn't be empty
3 malloc
1 malloc
1 malloc
3 malloc
2 malloc
1 malloc
Error in 2 it shouldn't be empty
2 malloc
2 malloc
Error in 1 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
1 malloc
End 2
End 1
End 3
End 0
#11 pues lo mismo de antes
Error in 1 it shouldn't be empty
2 malloc
2 malloc
Error in 1 it shouldn't be empty
Error in 3 it shouldn't be empty
Error in 3 it shouldn't be empty
Error in 3 it shouldn't be empty
Error in 3 it shouldn't be empty
Error in 2 it shouldn't be empty
1 malloc
Error in 1 it shouldn't be empty
Error in 2 it shouldn't be empty
Error in 1 it shouldn't be empty
1 malloc
3 malloc
3 malloc
2 malloc
2 malloc
Error in 3 it shouldn't be empty
Error in 1 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
3 malloc
3 malloc
2 malloc
Error in 2 it shouldn't be empty
Error in 3 it shouldn't be empty
Error in 1 it shouldn't be empty
End 2
End 0
End 3
End 1
#13 Error in 2 it shouldn't be empty
Error in 0 it shouldn't be empty
Error in 2 it shouldn't be empty
Error in 2 it shouldn't be empty
Error in 2 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
Error in 3 it shouldn't be empty
2 malloc
Error in 2 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
3 malloc
3 malloc
Error in 0 it shouldn't be empty
0 malloc
2 malloc
2 malloc
Error in 3 it shouldn't be empty
3 malloc
Error in 0 it shouldn't be empty
0 malloc
Error in 3 it shouldn't be empty
2 malloc
Error in 0 it shouldn't be empty
2 malloc
Error in 0 it shouldn't be empty
0 malloc
0 malloc
Error in 3 it shouldn't be empty
3 malloc
0 malloc
3 malloc
Error in 2 it shouldn't be empty
Error in 0 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
3 malloc
2 malloc
0 malloc
Error in 3 it shouldn't be empty
2 malloc
3 malloc
2 malloc
Error in 0 it shouldn't be empty
2 malloc
Error in 3 it shouldn't be empty
0 malloc
Error in 0 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
0 malloc
Error in 0 it shouldn't be empty
3 malloc
Error in 2 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
3 malloc
Error in 0 it shouldn't be empty
3 malloc
Error in 0 it shouldn't be empty
0 malloc
Error in 0 it shouldn't be empty
2 malloc
Error in 3 it shouldn't be empty
2 malloc
Error in 3 it shouldn't be empty
Error in 0 it shouldn't be empty
Error in 2 it shouldn't be empty
Error in 2 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
Error in 2 it shouldn't be empty
3 malloc
3 malloc
Error in 2 it shouldn't be empty
2 malloc
Error in 0 it shouldn't be empty
Error in 3 it shouldn't be empty
0 malloc
Error in 3 it shouldn't be empty
3 malloc
2 malloc
Error in 0 it shouldn't be empty
Error in 3 it shouldn't be empty
0 malloc
Error in 3 it shouldn't be empty
0 malloc
Error in 0 it shouldn't be empty
Error in 2 it shouldn't be empty
2 malloc
Error in 0 it shouldn't be empty
Error in 0 it shouldn't be empty
Error in 3 it shouldn't be empty
0 malloc
3 malloc
Error in 2 it shouldn't be empty
0 malloc
Error in 3 it shouldn't be empty
0 malloc
End 2
End 3
End 0
Features: swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
CPU implementer: 0x41
CPU architecture: 7
CPU variant: 0x0
CPU part: 0xc07
CPU revision: 4
Comentarios
lo del tiempo como se puede mirar?
#1
$ time ./comando
En este caso
$ time ./stack_llsc_freelist
(está en la entradilla)
¿te va siempre bien?
#8 Son 2, fallo mio al mirar
#14 Estás haciendo bien, pero ya no sé qué mirar, debo esperar a tener una a mano para saber exactamente por dónde falla
Muchas gracias.
#5 Que mi código está fallando, tendré que intentar adivinar dónde y pedirte que pruebes otra vez
#7 Parece que en una banana Pi si va...mira los comentarios
#14 Bueno, hay otra versión si quieres probar Muchas gracias.
#18 Error in 2 it shouldn't be empty
3 malloc
2 malloc
Error in 2 it shouldn't be empty
2 malloc
Error in 0 it shouldn't be empty
Error in 0 it shouldn't be empty
0 malloc
Error in 3 it shouldn't be empty
Error in 2 it shouldn't be empty
3 malloc
3 malloc
1 malloc
2 malloc
Error in 0 it shouldn't be empty
Error in 0 it shouldn't be empty
3 malloc
Error in 2 it shouldn't be empty
2 malloc
3 malloc
Error in 0 it shouldn't be empty
0 malloc
3 malloc
3 malloc
2 malloc
2 malloc
Error in 2 it shouldn't be empty
2 malloc
Error in 0 it shouldn't be empty
0 malloc
Error in 2 it shouldn't be empty
2 malloc
Error in 3 it shouldn't be empty
3 malloc
3 malloc
Error in 2 it shouldn't be empty
2 malloc
3 malloc
0 malloc
Error in 2 it shouldn't be empty
3 malloc
Error in 0 it shouldn't be empty
0 malloc
Error in 0 it shouldn't be empty
0 malloc
3 malloc
2 malloc
Error in 3 it shouldn't be empty
3 malloc
Error in 0 it shouldn't be empty
Error in 3 it shouldn't be empty
3 malloc
Error in 2 it shouldn't be empty
2 malloc
0 malloc
3 malloc
Error in 0 it shouldn't be empty
0 malloc
Error in 3 it shouldn't be empty
0 malloc
Error in 2 it shouldn't be empty
2 malloc
2 malloc
2 malloc
2 malloc
Error in 3 it shouldn't be empty
2 malloc
Error in 0 it shouldn't be empty
0 malloc
0 malloc
Error in 3 it shouldn't be empty
3 malloc
3 malloc
3 malloc
2 malloc
Error in 2 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
3 malloc
0 malloc
Error in 0 it shouldn't be empty
0 malloc
0 malloc
Error in 2 it shouldn't be empty
0 malloc
2 malloc
Error in 0 it shouldn't be empty
0 malloc
0 malloc
0 malloc
Error in 2 it shouldn't be empty
3 malloc
2 malloc
Error in 3 it shouldn't be empty
0 malloc
Error in 2 it shouldn't be empty
Error in 2 it shouldn't be empty
2 malloc
2 malloc
0 malloc
2 malloc
1 malloc
Error in 0 it shouldn't be empty
0 malloc
1 malloc
3 malloc
0 malloc
Error in 3 it shouldn't be empty
0 malloc
Error in 1 it shouldn't be empty
1 malloc
Error in 0 it shouldn't be empty
0 malloc
3 malloc
Error in 3 it shouldn't be empty
3 malloc
3 malloc
Error in 0 it shouldn't be empty
0 malloc
Error in 1 it shouldn't be empty
1 malloc
3 malloc
0 malloc
Error in 1 it shouldn't be empty
1 malloc
1 malloc
Error in 3 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
0 malloc
Error in 0 it shouldn't be empty
0 malloc
Error in 1 it shouldn't be empty
1 malloc
0 malloc
0 malloc
Error in 1 it shouldn't be empty
1 malloc
Error in 1 it shouldn't be empty
1 malloc
1 malloc
Error in 0 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
3 malloc
0 malloc
0 malloc
3 malloc
Error in 0 it shouldn't be empty
0 malloc
2 malloc
Error in 2 it shouldn't be empty
2 malloc
1 malloc
Error in 0 it shouldn't be empty
0 malloc
End 1
End 3
End 0
End 2
real 0m3.116s
user 0m10.940s
sys 0m0.110s
the same
#19 Subí otra versión, ya me han dicho que funciona correctamente en un ARM con varios núcleos. ¿Podrías verificar cuando puedas y tengas ganas? Gracias
#22 Tachaaaan
1 malloc
0 malloc
2 malloc
3 malloc
End 3
End 2
End 1
End 0
real 0m3.178s
user 0m12.610s
sys 0m0.010s
#23 Bieeeeeeeeeeennnnnnnnnnnnnnnnnnnnnnnnnnn!
Muchas gracias
#15 Tengo Raspberry, lo que no tengo es la 2, con multiprocesador, que no hay stock.
Y no sé qué haces en un sub para estas cosas si consideras que es spam. Hay que aguantar a cada uno.
#16 no te lo tomes a mal, pero es que verte pidiendo estas cosas aquí es "ridículo".
Mirate cualquier cubie o placa similar, hay stock de sobra y te sirve para lo que quieres mejor que esperar a que alguien te compile y ejecute el código.
#20 #0 Pero no una Raspi2 hombre, que eso esta obsoleto XD cc/@whizzo
Las ayudas se hacen en masculino, y los favores en femenino. Me parece troleada.
espera la imagen que te he puesto es el de esta mañana que pusiste...la nueva versión si me suelta problemas.
Lineas finales, pero más o menos igual
Error in 1 it shouldn't be empty
1 malloc
2 malloc
3 malloc
1 malloc
Error in 3 it shouldn't be empty
3 malloc
3 malloc
2 malloc
Error in 2 it shouldn't be empty
3 malloc
1 malloc
1 malloc
3 malloc
2 malloc
1 malloc
Error in 2 it shouldn't be empty
2 malloc
2 malloc
Error in 1 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
1 malloc
End 2
End 1
End 3
End 0
real 0m2.354s
user 0m5.500s
sys 0m0.600s
#3 Eso es mala noticia
Tendré que comprarme una urgente para probar
#4 Por ? ¿Qué significa? uso raspbian y está actualizado
#3 Ya actualicé los ficheros, ¿podrías probar otra vez, cuando puedas?
#11 pues lo mismo de antes
Error in 1 it shouldn't be empty
2 malloc
2 malloc
Error in 1 it shouldn't be empty
Error in 3 it shouldn't be empty
Error in 3 it shouldn't be empty
Error in 3 it shouldn't be empty
Error in 3 it shouldn't be empty
Error in 2 it shouldn't be empty
1 malloc
Error in 1 it shouldn't be empty
Error in 2 it shouldn't be empty
Error in 1 it shouldn't be empty
1 malloc
3 malloc
3 malloc
2 malloc
2 malloc
Error in 3 it shouldn't be empty
Error in 1 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
3 malloc
3 malloc
2 malloc
Error in 2 it shouldn't be empty
Error in 3 it shouldn't be empty
Error in 1 it shouldn't be empty
End 2
End 0
End 3
End 1
real 0m2.798s
user 0m6.060s
sys 0m0.860s
#12 Ya subí otra versión, cuando puedas (esto de programar concurrencia en ensamblador y por suposición es duro )
#13 Error in 2 it shouldn't be empty
Error in 0 it shouldn't be empty
Error in 2 it shouldn't be empty
Error in 2 it shouldn't be empty
Error in 2 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
Error in 3 it shouldn't be empty
2 malloc
Error in 2 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
3 malloc
3 malloc
Error in 0 it shouldn't be empty
0 malloc
2 malloc
2 malloc
Error in 3 it shouldn't be empty
3 malloc
Error in 0 it shouldn't be empty
0 malloc
Error in 3 it shouldn't be empty
2 malloc
Error in 0 it shouldn't be empty
2 malloc
Error in 0 it shouldn't be empty
0 malloc
0 malloc
Error in 3 it shouldn't be empty
3 malloc
0 malloc
3 malloc
Error in 2 it shouldn't be empty
Error in 0 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
3 malloc
2 malloc
0 malloc
Error in 3 it shouldn't be empty
2 malloc
3 malloc
2 malloc
Error in 0 it shouldn't be empty
2 malloc
Error in 3 it shouldn't be empty
0 malloc
Error in 0 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
0 malloc
Error in 0 it shouldn't be empty
3 malloc
Error in 2 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
3 malloc
Error in 0 it shouldn't be empty
3 malloc
Error in 0 it shouldn't be empty
0 malloc
Error in 0 it shouldn't be empty
2 malloc
Error in 3 it shouldn't be empty
2 malloc
Error in 3 it shouldn't be empty
Error in 0 it shouldn't be empty
Error in 2 it shouldn't be empty
Error in 2 it shouldn't be empty
3 malloc
Error in 3 it shouldn't be empty
Error in 2 it shouldn't be empty
3 malloc
3 malloc
Error in 2 it shouldn't be empty
2 malloc
Error in 0 it shouldn't be empty
Error in 3 it shouldn't be empty
0 malloc
Error in 3 it shouldn't be empty
3 malloc
2 malloc
Error in 0 it shouldn't be empty
Error in 3 it shouldn't be empty
0 malloc
Error in 3 it shouldn't be empty
0 malloc
Error in 0 it shouldn't be empty
Error in 2 it shouldn't be empty
2 malloc
Error in 0 it shouldn't be empty
Error in 0 it shouldn't be empty
Error in 3 it shouldn't be empty
0 malloc
3 malloc
Error in 2 it shouldn't be empty
0 malloc
Error in 3 it shouldn't be empty
0 malloc
End 2
End 3
End 0
real 0m2.719s
user 0m5.910s
sys 0m0.960s
¿Puede ser que esté haciendo algo mal yo?
hago make y ya ta
#13 vaya manera de spamear, anuncia el libro con un baner. No me puedo creer que no tengas un pi a mano o una cubieboard.
Iba a darte una shell en una placa, pero casi mejor que pidas un pi que te irá mejor. Ahora aparte, habrá servidores con ARM muy serios.
Como molaría tener a este hombre de ministro o al menos asesor en TIC.....
En una Banana Pi con ARM Cortex-A7 Dual-core (ARMv7-A) 1 GHz todo bien parece
0 malloc
1 malloc
0 malloc
0 malloc
End 0
End 1
End 2
End 3
real0m2.686s
user0m3.880s
sys0m0.180s
OPERATIONS x10
0 malloc
1 malloc
2 malloc
3 malloc
End 2
End 1
End 3
End 0
real0m27.132s
user0m38.680s
sys0m1.820s
El tiempo no es muy indicativo porque está ejecutando varias cosas más.
#6 cat /proc/cpuinfo
Processor: ARMv7 Processor rev 4 (v7l)
processor: 0
BogoMIPS: 2004.17
processor: 1
BogoMIPS: 2011.05
Features: swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
CPU implementer: 0x41
CPU architecture: 7
CPU variant: 0x0
CPU part: 0xc07
CPU revision: 4
Hardware: sun7i
Revision: 0000