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 > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
interrupt a blocking lock(F_SETLKW) ktmchen High Level Programming 4 12-22-2007 02:26 AM
#! symbols when doing sea at boot interrupt saleckda HP-UX 1 10-29-2007 12:04 PM
Interrupt level 14 woes kerwen UNIX for Advanced & Expert Users 0 03-27-2006 09:19 PM
erase and interrupt keys chrs0302 UNIX for Dummies Questions & Answers 1 06-21-2005 06:24 PM
Trapping Interrupt From 'ulimit' mrnuttynuts UNIX for Advanced & Expert Users 5 04-22-2005 12:52 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 06-18-2006
compbug compbug is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 26
timer interrupt

hello all

since a process running in kernel mode cannnot be preempted by any other process what would be the status of Timer interrupt that occurs when the time quantum of a process is elapsed?


thanks
  #2 (permalink)  
Old 06-18-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Sometimes a process needs something that is not available....a free disk buffer, some data from disk, or maybe just a signal. So it will go to sleep and wait for the resource to become available. This act of sleeping on a resource is what raises a process' priority to a kernel priority. But a sleeping process is not using a cpu. When the resource becomes available, the process will run at the elevated level, but, if the kernel is well written, this will be a very short time. Either it will sleep for something else or it will return to user mode. At return to user mode time, the priority is recalculated. Since the process recently spent time asleep, it will get credit for not hogging the cpu.

Thus very high priority processes tend to not be running and do not want the cpu. The quantum is based on cpu time, not elapsed time. But if the quantum were to be consumed while the process is in system mode, this will be detected upon the return to user mode.

But no matter how high the priority is, if another higher priority wants the cpu, the lower priority process will be preempted. You are getting confused with another issue. Unix guarantees that some system calls are atomic. To meet this guarantee, it has a concept of very high priority. The difference is a that a very high priority process will not wake up if a signal is sent to it. The signal will be pending until its priority lowers somewhat. If a process is writing to a disk file, it will not be signalable until the write completes. But if a process is writing to a tty, a signal can interrupt the write before it completes.
  #3 (permalink)  
Old 06-30-2006
compbug compbug is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 26
Thanks

hey Thanks Man I got enough Idea.
I go on with further chapters.if I get any doubts I do approach you.

sorry for the delayed reply I was kind busy with other project works.


thanks a lot
Closed Thread

Bookmarks

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:06 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