Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

135
Views
El comando de tiempo muestra el tiempo del usuario mayor que el tiempo real.

tengo mas o menos la misma duda que

El comando de tiempo de Linux que resulta real es menor que el usuario

y

tiempo de usuario mayor que el tiempo real

pero no puedo publicar un comentario sobre esas preguntas.

Cuando ejecuto el programa sin subprocesos múltiples que se indica a continuación, ocasionalmente obtengo un tiempo de usuario mayor que el tiempo real con /usr/bin/time y el tiempo integrado de bash. No veo nada que pueda usar un núcleo diferente. ¿Es rand() de alguna manera el culpable? ¿Cómo? ¡Gracias!

 #include <stdio.h> #include <stdlib.h> #define N 100 #define MM_MAX 50000 int main(int ac, char **av) { unsigned int i, j, k, n; int A[N][N], B[N][N], C[N][N]; if (ac != 2) { fprintf(stderr, "Usage: matmul <seed>"); exit(1); } srand((unsigned int) atoi(av[1])); for (n = 0; n < atoi(av[1]); n++) { for (i = 0; i < N; i++) { for (j = 0; j < N; j++) { A[i][j] = rand() % MM_MAX; B[i][j] = rand() % MM_MAX; } } for (i = 0; i < N; i++) { for (j = 0; j < N; j++) { C[i][j] = 0; for (k = 0; k < N; k++) { C[i][j] += A[i][k] * B[k][j]; } printf("%7d ", C[i][j]); } putchar('\n'); } } return 0; }
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!