LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-26-2008, 08:19 AM   #1
linuxpassion
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Rep: Reputation: 0
kernel-related homework questions


dear friends
how can i find the time for context switch in kernel .
is there some system call
please do let me know
i need it as a part of my project


igniting the passion for linux

linuxpassion
 
Old 03-26-2008, 08:23 AM   #2
linuxpassion
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Original Poster
Rep: Reputation: 0
kernel-related homework questions

friends
i wanted to know how much time does linux takes to fork a process.how can we find it
and on what factors does it depends.
its very urgent need it for my summer project
entering into the world of linux lovers

linuxpasssion
 
Old 03-26-2008, 08:27 AM   #3
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
You want something to do with context switching.

Intel CPUs do context switching in hardware. To figure out when this happens, you need to find the events which cause a context switch.

http://www.informit.com/articles/art...seqNum=3&rll=1
In the linux kernel, it is handled by context_switch() defined in kernel/sched.c ... i.e. read through the scheduler documentation.
 
Old 03-26-2008, 08:35 AM   #4
linuxpassion
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Original Poster
Rep: Reputation: 0
system call

friends
what is system call overhead time and how it is calculated.
friends it is urgent nee for my project
linuxpassion
 
Old 03-26-2008, 08:42 AM   #5
linuxpassion
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Original Poster
Rep: Reputation: 0
os related

friends
what is this cpu quantum size.and is there some method to calculate it.
urgently neede for project work
really in need plz help
linuxpassion
 
Old 03-26-2008, 08:44 AM   #6
linuxpassion
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Original Poster
Rep: Reputation: 0
a good problem

friends
how can we find page size in linux without using getpagesize syatem call.
i hope there is some method
please friend do let me know
urgently neede for project
thanking u
linuxpassion
 
Old 03-26-2008, 08:51 AM   #7
linuxpassion
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Original Poster
Rep: Reputation: 0
linux memory management

friends
can anyone tell me what is the maximum amount of memory that can be allocated to a user process.
friends
its urgently needed for our summer project
really in need
linuxpassion
 
Old 03-26-2008, 10:27 AM   #8
ehawk
Senior Member
 
Registered: Jul 2003
Posts: 1,257

Rep: Reputation: 48
http://www.computerhope.com/unix/upagesiz.htm
 
Old 03-26-2008, 12:42 PM   #9
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
www.google.com/linux probably has the answer.
 
Old 03-26-2008, 12:53 PM   #10
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
would your project be your homework? Please review the LQ rules regarding homework.
 
Old 03-26-2008, 01:15 PM   #11
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529
Quote:
Originally Posted by bigrigdriver View Post
www.google.com/linux probably has the answer.
I can understand your irritation seeing someone post 6-something threads about the same subject, in one forum and in one day, and asking for handouts without offering any insights about the subject or efforts himself or whatever else. However posting nearly the same reply in all his threads isn't helping anyone and could be considered spamming as well. Next time just report the thread or please move on if you can't contain yourself. TIA
 
Old 03-26-2008, 01:32 PM   #12
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I have merged your six homework-threads into one to make
it easier for us mods to keep an eye on them. I'd highly
recommend that you put some effort into it yourself, you'll
only benefit from the attempts on information retrieval.

And no, sitting down and posting a question is NOT considered
a valid effort here.



Cheers,
Tink
 
Old 03-27-2008, 04:50 AM   #13
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,052

Rep: Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881
Quote:
Originally Posted by linuxpassion View Post
dear friends
how can i find the time for context switch in kernel .
is there some system call
please do let me know
i need it as a part of my project
...urgh, homework! Well, at least you still have work to do in answering these...

Traditionally, you get a time value just before the context switch and the time value just after the context switch. You then decide that the time in between is the time that you want.

However, the context switch that you are trying to time might be interrupted by other context switches, so you either have to eliminate that possibility or time several times and check that you have a stable, low, value.

And there is also the issue of how long your 'instrumentation' code adds, so you probably also need to time just the timing code (and is that a stable time) and make sure its small/eliminate the remainder.

Quote:
igniting the passion for linux

linuxpassion
Can I make a personal request for you to eliminate the sickly, unnecessary, comments, please? It is also an assumption that everyone here is a friend, and while people here are friendly, in general, it doesn't always extend to people who are pushing at the borders of friendship abuse (if this is homework).

Quote:
i wanted to know how much time does linux takes to fork a process.
Having read my answer to your previous question, are you now in a position to answer this querstion yourself? (If not, I probably have wasted my time...)

Quote:
how can we find page size in linux without using getpagesize syatem call.
You do not say what is wrong with 'getpagesize'. My guess is that all that is wrong is that your tutour would want you to actually think about the question and not use a pre-existing system call for the purpose. Being an open source OS, you can look at the 'getpagersize' call, understand how it works and write something similar which just does what you want.

Probably less worthy would be to look at getpagesize, cut and paste the code into a call of your own name and use that. This may well be cheating, of course.

Question to mods: Why if this guy (assumption) has posted several threads doesn't it show his number of posts incrementing? Do only replies (and not thread originations) count?
 
Old 03-27-2008, 06:35 AM   #14
linuxpassion
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Original Poster
Rep: Reputation: 0
i am sorry but this was no homwork i was working on a project as my industrial trng project "working and improving performance of unix kernel" for that i need to know this details i jst wanted to know a site or place where i can find answers or related concepts so that i can go through it.i am sorry if i have voilated any of the lq rules but i had no such intentions.
ok no quotes hereafter
 
Old 03-27-2008, 07:11 AM   #15
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
To me, "summer project" or "industrial training project" looks like homework. Oh well.....

I think it would be good to read a book on the Linux kernel--go to the O'Reilly website and see what they have free online. Depending on where you live, most large bookstores will have some also.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
setsid() without forking OR debugging forked process with gdb ta0kira Programming 3 08-09-2007 07:22 AM
Newbie on forking child process and I/O redirection neo_in_matrix Programming 4 09-16-2005 04:05 AM
Forking process using python thinkgeek Programming 4 07-03-2005 12:36 PM
Question on forking a child process brianvdc Programming 2 10-16-2003 05:07 AM
Forking and multiprocessors sniff Programming 4 02-18-2003 06:28 PM


All times are GMT -5. The time now is 07:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration