Control Program for Device Driver Process

In summary: Hi Ho!In summary, 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.
  • #1
D a M i E n
5
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
  • #2
Ok, so where is your attempt at solving the problem?
 
  • #3
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
 
  • #4
Hey Eus..

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

How is this really any different ?

Please explain.

Respectfully.

Aquafire
 
  • #5
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
 

Related to Control Program for Device Driver Process

1. What is a control program for device driver process?

A control program for device driver process is a software program that manages the communication between a computer's operating system and its hardware devices. It acts as a bridge between the two, allowing the operating system to send commands and receive data from the hardware devices.

2. What is the purpose of a control program for device driver process?

The main purpose of a control program for device driver process is to ensure that the hardware devices are functioning correctly and efficiently. It also helps to improve the stability and performance of the computer by managing the communication between the operating system and the devices.

3. How does a control program for device driver process work?

A control program for device driver process works by translating commands from the operating system into a language that the hardware devices can understand. It also handles any errors or conflicts that may occur between the devices and the operating system.

4. What types of devices require a control program for device driver process?

Any hardware device that needs to communicate with the computer's operating system requires a control program for device driver process. This includes devices such as printers, scanners, keyboards, and network adapters.

5. Can a control program for device driver process be updated or changed?

Yes, a control program for device driver process can be updated or changed. As technology advances and new devices are developed, the control program may need to be updated to ensure compatibility. Additionally, software updates or patches may be released to fix bugs or improve performance.

Similar threads

  • Computing and Technology
Replies
2
Views
746
  • Computing and Technology
Replies
10
Views
2K
  • General Engineering
Replies
2
Views
5K
  • Programming and Computer Science
Replies
29
Views
3K
Replies
4
Views
4K
  • Sticky
  • Programming and Computer Science
Replies
13
Views
4K
Replies
11
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
Replies
10
Views
2K
Back
Top