The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
multithreading on OSX memoid High Level Programming 3 06-26-2008 07:25 PM
Information about kernel modules slash_blog HP-UX 0 05-25-2007 04:14 AM
kernel, memory and patches information Teh Tiack Ein HP-UX 0 08-18-2005 08:48 AM
load dynamic and shared library in kernel mtaghiloo Linux 0 08-01-2005 10:34 AM
Multithreading in Pro*C shaik786 High Level Programming 16 11-16-2001 09:44 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-24-2008
parkview parkview is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 3
Dynamic information of Kernel using multithreading

Hi , I am new to this forum. Can someone help me on this question, I have no clue how to proceed . Its urgent..
A continuous program should print out the following dynamic information
(average of an interval). Internally, there should be two parameters with
your program, one is the probing interval and the other one is the printing
(display) interval. e.g., the probing interval could be 1 second, and the
printing interval could be 30 seconds, thus your program can calculate the
required metrics in the last 30 collected samples.(In other words-In the dynamic information part, one thread uses the probing interval to read /proc file, the second thread displays the results with a display interval.) The Program should be written in C
• The percentage of time the processor(s) spending in user mode, system
mode, and idle.
• The percentage of available memory.
• The rate of process creations in the system.
• The rate of context switches in the kernel.
• The rate of disk read/write in the system.

Thanks,
  #2 (permalink)  
Old 09-24-2008
jim mcnamara jim mcnamara is online now Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
Does the system have sar? iostat? Unless you are taking a systems programming class just use the available tools.
  #3 (permalink)  
Old 09-24-2008
parkview parkview is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 3
I dont know what do you mean by sar and iostat. I am pretty new to operating systems concepts.
Thanks for the response.
  #4 (permalink)  
Old 09-24-2008
jim mcnamara jim mcnamara is online now Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
Is this for a class?
  #5 (permalink)  
Old 09-24-2008
parkview parkview is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 3
I am doing a project and this question is part of it. I am not sure how to display the dynamic information of kernel in a C program using multithreads in an interval
  #6 (permalink)  
Old 09-24-2008
jim mcnamara jim mcnamara is online now Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
Something is not right here.... however: In order to do this you need to know the OS, and something about C, something about threads.

What OS?

Have you programmed threads in C?
Closed Thread

Bookmarks

Tags
operating systems

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:00 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0