Control Program for Device Driver Process

Click For Summary

Discussion Overview

The discussion revolves around the control program for a device-driver process, specifically focusing on the implications of polling for I/O requests and the effects on multiprogramming. Participants explore theoretical aspects of device drivers, I/O processes, and the relationship between these and multiprogramming techniques.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant describes the control program for a device driver as an infinite loop that waits for I/O requests, sends commands, waits for completion, and notifies the user process.
  • Another participant questions the meaning of how I/O processes affect multiprogramming, suggesting that the correlation between the number of programs in memory and I/O wait times is unclear.
  • A participant proposes that without DMA, the CPU's involvement in data transfer could limit the efficiency of multiprogramming, as fewer programs may be loaded into memory to keep the CPU busy.
  • Another participant introduces the concept of multi-threading, questioning its relevance to the discussion and asking for clarification on its differences from multiprogramming.
  • A participant explains multi-threading as a technique that allows multiple threads to share the same address space, contrasting it with processes that require separate memory spaces, and discusses its potential to keep the CPU busy without exhausting memory.

Areas of Agreement / Disagreement

Participants express differing views on the relationship between I/O processes and multiprogramming, with some questioning the impact of polling and DMA on efficiency. The discussion includes competing perspectives on multi-threading and its role in relation to multiprogramming.

Contextual Notes

Participants have not reached a consensus on the implications of polling for I/O requests on multiprogramming or the effectiveness of multi-threading compared to traditional multiprogramming techniques.

D a M i E n
Messages
5
Reaction score
0
Code:
The control program for a device-driver process is an infinite loop.
Roughly, the loop body is: wait for I/O request from user process; send 
I/O command to device; wait for command completion; notify (unblock) user
process.

    a) [10 marks] Suppose the device driver waits by polling the device for
    command completion.  How does this affect multiprogramming?

    b) [10 marks] Assume there is a timer interrupt 60 times a second.  Can
    you find a reasonable solution for waiting that does not use device 
    interrupts?  If you find one, describe it.


Help please !
 
Computer science news on Phys.org
Ok, so where is your attempt at solving the problem?
 
What does "how does this affect multiprogramming" mean?

Hi Ho! :smile:

I know that multiprogramming is a technique of loading several programs into the main memory at once so that when one program is waiting for the I/O process to finish, the CPU can be kept busy by executing another program.

So, I wonder in what way the I/O process is going to affect multiprogramming because as far as I know there is no correlation between the number of programs that can be loaded into the main memory and the time a program must wait for the I/O process to finish.

I also have a similar question like that, which is "if a computer does not employ DMA, the CPU must take care the transfer of data from an I/O device to the memory, or from the memory to an I/O device. So, how does this affect multiprogramming?"

I think multiprogramming will be affected in a way that there is no good reason of loading too many programs into the main memory if DMA is not employed, since with a small amount of programs in the main memory, the CPU will be busy enough.

What do you think?

Regards,
Eus
 
Hey Eus..

Excuse me for wondering if you ever heard of multi threading...?

How is this really any different ?

Please explain.

Respectfully.

Aquafire
 
Hi Ho! :smile:

Thread is a light-weight process because it uses the same address space (core image) of the instantiating process.

Creating a process is a much expensive business since a process must have its own address space (program text, data, and stack), whereas a thread shares its parent's data, and perhaps, program text.

So, multi-threading is a technique of instantiating many threads from a program (the parent process) to tackle a big job in such a way that does not exhaust the main memory but keeps the CPU busy all the time.

For example, if you do a recursive quick sort like:

sort (0, middle);
sort (middle+1, end);

the first function that you call to sort [0, middle] must return first before the function to sort the rest will work.

But, if you employ multi-threading like:

threadSort (0, middle).start; // 1
threadSort (middle+1, end).start; // 2

both of the "functions" will work in turn like:
1 1 1 1 2 2 2 2 1 2 2 1 1 2 2 1 ...

So, generally multi-threading employs multi-programming in a way that each thread can maintain its own local variables in the main memory so that the CPU can execute one of the thread in case the CPU is idle.

Regards,
Eus
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
10
Views
4K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 4 ·
Replies
4
Views
4K
Replies
11
Views
3K
Replies
2
Views
2K
Replies
1
Views
4K
Replies
29
Views
6K
  • · Replies 16 ·
Replies
16
Views
2K
  • Sticky
  • · Replies 13 ·
Replies
13
Views
9K