Re: Seek Help !!!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
 I'm implementing a new real time scheduling algorithm in the linux
kernel. For that I need to change the default fork() sytem call, so
that the new system call takes extra arguments like deadline and
execution time while creating the process.
 In the context of the user process fork() doesn't take any
parameters. But in /usr/src/linux-2.4/arch/i386/kernel/process.c , the
declaration for the fork() sytem call is like this
 asmlinkage int sys_fork(struct pt_regs regs).

Which library function passes "struct pt_regs" parameter to "sys_fork"
after the fork() sytem call is invoked in the user process.

Is there any other way I can implement a new system call which behaves
as the fork() system call, but can take arguments.

It's very urgent for me. Pls help me out regarding this. 

Seshu. 

Hi,
 If your goal is to implement another scheduling algorithm. I think
there is no reason for changing the fork system call.
The better way is to change few things in sched.c.  It is recommended
to add a new scheduling policy NOT change the existing ones.
 If i had to do that, i would add another policy like SCHED_xxxx. 
And on sched() function check if task's policy is SCHED_xxxx. If it is
SCHED_xxxx i would call my function which implements my scheduling
algorithm.
 I would also change sched_setschedular to accept SCHED_xxx value as
policy. Which my test application calls to switch another scheduling
policy.
In this way you need to change least thing.

regards manish

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux