timer interrupt


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers timer interrupt
# 1  
Old 06-18-2006
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  
Old 06-18-2006
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  
Old 06-30-2006
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
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

The UNIX clock/timer interrupt

The book The Design of the Unix Operating System speaks of a clock or timer that is used in scheduling. The clock generates interrupts that update priority information for processes and preempt processes in a round-robin fashion. It's apparent that this "clock" is not the same thing as the CPU... (1 Reply)
Discussion started by: Ultrix
1 Replies

2. Shell Programming and Scripting

How to interrupt running application?

Hello i have problem passing ctrl+C into shell script this script will run application and return value but never ends and stay running. i tried trap and not working at all the command should look like this : sarm pcsp -s CHG_M_P1 i want something to stop this command after... (9 Replies)
Discussion started by: mogabr
9 Replies

3. What is on Your Mind?

Alarm interrupt and multithreading

Hi Friends any know how became a friend in this Android Programming Language (0 Replies)
Discussion started by: ljarun
0 Replies

4. UNIX for Advanced & Expert Users

Is there any shell command to show which interrupt handler handle which interrupt number?

Hi, all: Is there any shell command to show which interrupt handler handle which interrupt number in the system? li,kunlun (5 Replies)
Discussion started by: liklstar
5 Replies

5. UNIX for Advanced & Expert Users

Interrupt storm detected on "irq 20" throttling interrupt source

I receive the following warning messages on a very new machine which has FreeBSD 8.1 x64 installed on it: Interrupt storm detected on "irq 20" throttling interrupt source It is unclear what this means and what its origins are (motherboard? CPU? RAM?). I can start the desktop and the message is... (4 Replies)
Discussion started by: figaro
4 Replies

6. UNIX for Advanced & Expert Users

hunting down for software interrupt causes

Hi, i have an rhel box with around 20 %soft every 2 seconds. The box is idle. How do i start hunting down what's causing this? i believe /proc/interrupts is hardware related, procinfo is basically the same. where else can i look? thanks, Marc (5 Replies)
Discussion started by: marcpascual
5 Replies

7. Shell Programming and Scripting

Interrupt handling in k shell

Hi All, Is interrupt handling possible in k shell? Say if the user press CTRL-C or CTRl-D,I want to perform a particular action before terminating? Thnaks! (2 Replies)
Discussion started by: prasperl
2 Replies

8. Shell Programming and Scripting

Sending an interrupt in a script?

Is it possible to sent a ^C interrupt via the command line? For example if I want to tail a log for 10 minutes at a time, kill the tail and then start it again is there a way to go about that? I would imagine there would be some way to do it by finding and killing the PID, but I'm curious if... (2 Replies)
Discussion started by: DeCoTwc
2 Replies

9. UNIX for Dummies Questions & Answers

erase and interrupt keys

This is on our Ultra 5/10 Sparc with Solaris 9. I need to store the following (stty) keys in the .profile and /etc/profile files as shown here. erase "Back Space Key" Interrupt "Ctrl + C" I need the exact syntax/procudure as I have to set these two keys whenever I login to the terminal... (1 Reply)
Discussion started by: chrs0302
1 Replies

10. UNIX for Advanced & Expert Users

Trapping Interrupt From 'ulimit'

I want to know the interrupt passed to a process through 'ulimit' I am running a process which gets killed when the 'ulimit -t' reaches. But after killing the process I want to start another process which would send a message or do some clean up or anything at all. To do the same I am... (5 Replies)
Discussion started by: mrnuttynuts
5 Replies
Login or Register to Ask a Question