Follow us on Google+ Follow us on Facebook Follow us on Twitter

Opened 5 years ago

Last modified 3 years ago

#414 new enhancement

Graceful system shutdown

Reported by: Jakub Jermář Owned by: Jakub Jermář
Priority: major Milestone:
Component: helenos-infrastructure Version: mainline
Keywords: gsoc12, gsoc13, gsoc14 Cc:
Blocker for: Depends on:
See also:

Description (last modified by Martin Decky)

Design and implement graceful shutdown of HelenOS.

The current support for shutdown in HelenOS is rather minimal. It is possible to halt the CPUs or reboot the machine. What is missing is a graceful way to tell running tasks that the system is about to be shut down. For example, the reboot sequence now consists of forceful kill of all existing tasks. The goal is to design and implement way to notify tasks of imminent shutdown (reboot) to allow them terminate in a clean and consistent way. The design decisions must reflect microkernel-specific issues, such as order of shutdown of vital services (e. g. VFS, naming service or drivers).
What Gains and Benefits will this bring?
The benefits of this task come at rather low level but are nevertheless very important. Graceful shutdown means that drivers could terminate communication with hardware in a predictable manner or that filesystem servers would be able to unmount file systems cleanly.
Medium to High. The solution will require work both in kernel and in userspace.
Required skills
A successful applicant will have good skills of programming in the C languages and the ability to survive in a non-standard non-POSIX application environment.
Possible mentors
HelenOS Core Team, Vojtech Horky

Change History (10)

comment:1 Changed 5 years ago by Jakub Jermář

Keywords: gsoc12 added; 2012 removed

comment:2 Changed 5 years ago by Jakub Jermář

Keywords: needswork added

comment:3 Changed 5 years ago by Vojtech Horky

Description: modified (diff)

comment:4 Changed 5 years ago by Jakub Jermář

Component: helenos/unspecifiedhelenos/kernel/generic
Owner: set to Jakub Jermář

comment:5 Changed 5 years ago by Vojtech Horky

Description: modified (diff)
Keywords: needswork removed

comment:6 Changed 5 years ago by Jiri Svoboda

The key point here is determining which parts of the system need to be shut down and in which order. The strategy could be static or highly dynamic, based on known run-time service inter-dependencies. This process is, to a degree, similar to a reverse of the boot.

Random observations:

  • User tasks (tasks created as part of a login session, if we had one) need to be terminated
  • User tasks need to be given a chance to terminate gracefully
  • File systems need to be unmounted or re-mounted read-only (useful especially for the root fs where letting go of it / coping with a forced unmount might be difficult)
  • The dependencies are often complex, circular and dynamic. Rather than designing ad-hoc approaches (e.g. order of unmounting file systems), it might be more clever to put servers into a shutdown mode, where any service that is not busy (in use) is torn down. That may free other service(s) from use and they can be shut down, etc.

comment:7 Changed 5 years ago by Jakub Jermář

Keywords: gsoc13 added

comment:8 Changed 4 years ago by Martin Decky

Component: helenos/kernel/generichelenos-infrastructure

comment:9 Changed 4 years ago by Martin Decky

Description: modified (diff)

comment:10 Changed 3 years ago by Vojtech Horky

Keywords: gsoc14 added
Note: See TracTickets for help on using tickets.