User Tools

Site Tools


developersguide:driverprogramming

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
developersguide:driverprogramming [2016/02/06 12:34]
lionelsambuc fixed an incorrect path in an example
developersguide:driverprogramming [2017/05/24 22:18]
e_szabados old revision restored (2017/05/24 14:54)
Line 85: Line 85:
 }; };
 </​code>​ </​code>​
-Starting, stopping and restarting device drivers must be done using the **service(8)** command. To start the hello program, enter the following command:+Starting, stopping and restarting device drivers must be done using the **minix-service(8)** command. To start the hello program, enter the following command:
  
 <code bash> <code bash>
-# service up /​service/​hello+#minix-service up /​service/​hello
 Hello, World! Hello, World!
 RS: restarting /​service/​hello,​ restarts 0 RS: restarting /​service/​hello,​ restarts 0
 </​code>​ </​code>​
-And what a surprise, it displays the //Hello, World!// message :-) Stop the driver with:+And what a surprise, it displays the //Hello, World!// message :-) in the kernel log. Check with writing the contents of /​var/​log/​messages. ​Stop the driver with:
  
 <code bash> <code bash>
-# service down hello+#minix-service down hello
 </​code>​ </​code>​
 We received another message as well from the so-called //​Reincarnation Server// (RS). In Minix as a [[http://​en.wikipedia.org/​wiki/​Microkernel|microkernel]],​ device drivers are separate programs which send and receive message to communicate with the other operating system components. Device drivers, like any other program, may contain bugs and could crash at any point in time. The Reincarnation server will attempt to restart device drivers when it notices they are abruptly killed by the kernel due to a crash, or in our case when they exit(2) unexpectedly. You can see the Reincarnation Server in the process list as **rs**, if you use the **ps(1)** command. The Reincarnation Server sends keep-a-live messages to each running device driver on the system periodically,​ to ensure they are still responsible and not i.e. stuck in an infinite loop. We received another message as well from the so-called //​Reincarnation Server// (RS). In Minix as a [[http://​en.wikipedia.org/​wiki/​Microkernel|microkernel]],​ device drivers are separate programs which send and receive message to communicate with the other operating system components. Device drivers, like any other program, may contain bugs and could crash at any point in time. The Reincarnation server will attempt to restart device drivers when it notices they are abruptly killed by the kernel due to a crash, or in our case when they exit(2) unexpectedly. You can see the Reincarnation Server in the process list as **rs**, if you use the **ps(1)** command. The Reincarnation Server sends keep-a-live messages to each running device driver on the system periodically,​ to ensure they are still responsible and not i.e. stuck in an infinite loop.
developersguide/driverprogramming.txt · Last modified: 2022/02/10 14:58 by stux