



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Exam; Class: Introduction to Image Processing and Analysis; Subject: Computer Science and Engineering; University: Arizona State University - Tempe; Term: Fall 2008;
Typology: Exams
1 / 5
This page cannot be seen from the preview
Don't miss anything!




MIDTERM NAME^ Put Name on Every Page
1. (21) Signal Data Structures and Sending Signals The sigset_t data structure is used to indicate the presence/absence of different signal types such as SIGHUP, SIGKILL, in different categories, e.g., pending or blocked. (a) (2) How many 32 bit words are in a sigset_t structure in the x86 architecture? (b) (2) What word or words store the bits representing real-time signal types? HINT: There are 33 real- time signals. (c) (2) What is the name of the pointer in a task’s task_struct that points to the structure that contains the 64 k_sigaction structures for the task? (d) (2) If a signal has a handler, what field of which data structure will have its address? field data structure (e) (2) What two other valid values could be in the field of part (d) above if there is no catching function? (f) (4) What field in which data structure has bits that indicate whether a particular signal type is blocked by a process? data structure field (g) (3) What processes will kill_something_info call send_sig_info to send a signal to when it is passed a pid of -1? (h) (4) Kill_something_info calls kill_pg_info at [35634] and [35651]. What process group gets ‘killed’ in each case? [35634] [35651]
Fall 2008
Put Name on Every Page
2. (17) __wake_up_common and generic lists (a) (2) In general what does the first argument of __wake_up_common point to? (b) (2) What is head set to at [34430]? (c) (7) Given that tmp is the address of a list_head structure named task_list contained in a wait_queue_t structure, what is curr being set to at [34438], [34439]? Note: Simply saying it’s a pointer to a wait_queue_t structure gets you zero points. You need to state the relationship of this address to the address of the wait_queue_t structure, what the task_list structures are used for here and why the address of the wait_queue_t structure is needed. HINT S: See the next part of this question. Also making a simple sketch showing these relationships can help in your answer. (d) (3) What do [34446] and [34447] collectively do? (e) (3) Why is the break at [34458] taken when the expression in the if from [34456] to [34457] is true? To answer this you need to say what WQ_FLAG_EXCLUSIVE and nr_exclusive mean.
Fall 2008
Put Name on Every Page (b) (2) What field in the data structure that holds the addresses of routines that communicate with a PIC holds the address of the routine that is used to send end of interrupt processing information to the PIC? field (c) (2) What field of which data structure holds a pointer to the actual Interrupt Service Routine, i.e., holds a pointer to the actual driver? field data structure (d) (5) What is happening at [2297] in handle_IRQ_event and why is this in a loop, i.e., why isn’t a single invocation of line [2297] sufficient? (e) (3) handle_IRQ_event disables all interrupts at [2302]. Assuming that rescheduling is not necessary and there was no signal pending, what line of which macro enables them again? line section of code (f) (2) To what location does do_IRQ return? (g) (2) What is the label of the section of code that, among other things, sets up this return by do_IRQ. Hint : the code is produced by a macro. (h) (4) What does the BUILD_IRQ(nr) macro expand to when it is called with the argument 0x04? You need just write down the equivalent assembler language code for [13043]- [13045].GIANT HINTS: #nr expands to 0x04 and $”#nr” expands to 4. (i) (2) Why is line [13044] “pushl $”#nr”-256\n\t” instead of the simpler “pushl $”#nr\n\t” ?
Fall 2008
Put Name on Every Page
5. (11+3points extra credit) sys_time (a) (5) What is happening at [39221]? In particular, why is put_user needed and where are i and tloc located? Just repeating the comment is not sufficient, you need to explain why the statement “*tloc = i” won’t work. (b) (6) At [39624] the xtime timeval structure is declared to be volatile. Why is this done? (c) (3 points extra credit) In the timer top half what two conditions must exist for do_process_times to send a SIGXCPU signal at [40118]. Hint: Be careful, the comment on line [40116] is not quite correct.