Interrupt Service Routines

2005-03-29 Thread Ashwin Chandra
Do you guys know of any example code of ISR's in the kernel? Ash ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Thread Suspensions??

2005-03-09 Thread Ashwin Chandra
So does anyone know why the following code in the scheduler causes normal processes like bash and cron to be suspended as well? I have printed out all the proc names in this loop (inside the if statements) and none of them are bash or cron. FOREACH_THREAD_IN_PROC(p, td) {

taking a process and all associated threads off the run queue

2005-03-06 Thread Ashwin Chandra
Hi all, I am trying to modify the scheduler to take off some processes (such as those generated by a forkbomb ... malicious) off the run queue. I have been looking into the scheduler and proc.h and see there is one way by putting threads on the 'suspension' queue. I am not sure if this is the sa

Libc

2005-03-03 Thread Ashwin Chandra
Hey guys, if we broke libc, and we cannot do anything at the prompt /libexec/ld-elf.so.1: Shared object "libc.so.5" not found.. what is the quick fix for this? also what is the correct way of adding names to system calls in libc so instead of doing a syscall(445), we can actually call it by n

sched_4BSD

2005-02-28 Thread Ashwin Chandra
I wanted to get some clarification about the 4BSD scheduler. I am sort of confused why there are two forms of scheduling, one done between processes and another done between threads in a process. The priority calculations seem to be done only with processes and I assume that the global run queue

Fw: Priority Increasing

2005-02-27 Thread Ashwin Chandra
ot;, I don't see why there is so much overhead too. Do you recommend anotoher way to solve this forkbomb problem and keep the system DoS free for others? Ash - Original Message - From: "Coleman Kane" <[EMAIL PROTECTED]> To: "Ashwin Chandra" <[EMAIL PROTECTED]

Priority Increasing

2005-02-27 Thread Ashwin Chandra
Hi all, Ive been trying to counter the malicious effects of a forkbomb by setting the forkbomb parent and children to a PRI_MAX priority, although this is not having any effect on the system load. Basically in my code when I know which process is acting maliciously (forkbomb), I run the followi

sched_4bsd.c Quantum change

2005-02-24 Thread Ashwin Chandra
Quick question for you hackers! If i wanted to change the scheduler to have a certain marked bad process have a higher time quantum than everyone elses (because it is behaving bad, high mem usage and context switching) to let it run longer to finish faster and avoid context switches and swappin

Memory Accounting in Proc.h

2005-02-18 Thread Ashwin Chandra
I am trying to get the fields ru_idrss, and ru_isrss to see the the current stack and data sizes for each process thats running in user space. I read up on getrusage which says that ru_idrss and ru_isrss are measured in kilobytes * the number of clock ticks. So I wanted to retrieve the actual va

Kernel monitor, the return

2005-02-14 Thread Ashwin Chandra
In trying to create a simple kernel thread that prints out all the processes data and stack size, i still get a panic fault (vm_fault on no entry) at the printf statement...ive narrowed it down to the ru_idrss variable that is causing the problem, im not sure why. I thought maybe I was not locki

Kernel Monitor?

2005-02-14 Thread Ashwin Chandra
Hi everyone, Im having issues with the following code running as a kernel thread. when i do the prinft (which i traced with kgdb) it crashes...but those two variables that i print out, are fine if i do comparisons or store them into variables...only printing them causes a panic. anyone have any

Re: VMCORE NOT FOUND

2005-02-12 Thread Ashwin Chandra
quot;/usr/crash" So I am doing all this correctly, yet still no dump comes up and I am not sure why! =( Ash - Original Message - From: "Ryan Sommers" <[EMAIL PROTECTED]> To: "Ashwin Chandra" <[EMAIL PROTECTED]> Cc: Sent: Saturday, February 12,

Re: VMCORE NOT FOUND

2005-02-12 Thread Ashwin Chandra
el O'Connor" <[EMAIL PROTECTED]> To: Cc: "Ashwin Chandra" <[EMAIL PROTECTED]> Sent: Saturday, February 12, 2005 3:48 AM Subject: Re: VMCORE NOT FOUND Is there enough space in /var? Does the kernel actually write the crashdump when it panics? Wha

VMCORE NOT FOUND

2005-02-12 Thread Ashwin Chandra
I am trying to get a vmcore to appear after a kernel panic. I have done EVERYTHING in the developers handbook, including adding dumpdev in the rc.conf and a savecore with flags -f. My savecore directory is /var/crash. but nothing appears in it after the kernel panic except the minfree file and t

Opening files in Kernel Mode: help

2005-02-06 Thread Ashwin Chandra
So this is the code I got from help from you hackers out there and templates in the /kern library. This compiles but causes a kernel panic. I was wondering if any of you knew why this was happening and if I am calling all the virtual node functions correctly? ***CODE BELOW

Opening and wriiting to file in Kern

2005-02-06 Thread Ashwin Chandra
Does anyone know the correct calls to open a file, write to it, and close it, IN *kernel* mode. Ash ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTE

KVM linking

2005-02-03 Thread Ashwin Chandra
Hi, I am trying to create a kernel thread to monitor memory usage and context switches. I wrote a simple program in the kern dir, updated the files file in conf and i cant seem to link to the kvm libraries...whats the easy way to include the lib/libkvm files and directory without having to hack

KVM Linking

2005-02-02 Thread Ashwin Chandra
Hi, I am trying to create a kernel thread to monitor memory usage and context switches. I wrote a simple program in the kern dir, updated the files file in conf and i cant seem to link to the kvm libraries...whats the easy way to include the lib/libkvm files and directory without having to hack