From: Emmanuel Fleury <fleury@cs.auc.dk>
To: Linux Kernel Mailing-list <linux-kernel@vger.kernel.org>
Subject: Scheduler Problem ????
Date: Wed, 17 Mar 2004 15:20:13 +0100 [thread overview]
Message-ID: <1079533212.25474.370.camel@rade7.s.cs.auc.dk> (raw)
Hi all,
I am running a 2.6.4 (with preemptible kernel activated).
What I did is the following:
1) Compile the sched_test.c program (at the end of the mail):
[root@hermes sched]$ gcc -o sched_test sched_test.c
2) Set the priority of the root shell as the highest:
[root@hermes sched]$ ps
PID TTY TIME CMD
1519 pts/0 00:00:00 bash
2020 pts/0 00:00:00 ps
[root@hermes sched]$ chrt -f -p 99 1519
3) Run sched_test:
[root@hermes sched]$ chrt -f 10 ./sched_test 100
bye now.
Here during the execution of sched_test everything is frozen.
Did I do something wrong ????
sched_test.c
=============
#include <sys/time.h>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
int end_time;
struct timeval now;
if (argc < 2)
{
end_time = 1;
}
else
{
end_time = atoi(argv[1]);
}
gettimeofday(&now, NULL);
end_time += now.tv_sec + 1;
do{
gettimeofday(&now, NULL);
}while (now.tv_sec < end_time);
printf("bye now.\n");
return 0;
}
==========
Regards
--
Emmanuel Fleury
Computer Science Department, | Office: B1-201
Aalborg University, | Phone: +45 96 35 72 23
Fredriks Bajersvej 7E, | Fax: +45 98 15 98 89
9220 Aalborg East, Denmark | Email: fleury@cs.auc.dk
next reply other threads:[~2004-03-17 14:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-17 14:20 Emmanuel Fleury [this message]
2004-03-17 23:00 ` Nick Piggin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1079533212.25474.370.camel@rade7.s.cs.auc.dk \
--to=fleury@cs.auc.dk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®