Opened 12 years ago

Last modified 5 years ago

#414 new enhancement

Graceful system shutdown — at Version 9

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.

Details
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.
Difficulty
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.
Documentation
Possible mentors
HelenOS Core Team, Vojtech Horky

Change History (9)

comment:1 by Jakub Jermář, 12 years ago

Keywords: gsoc12 added; 2012 removed

comment:2 by Jakub Jermář, 12 years ago

Keywords: needswork added

comment:3 by Vojtech Horky, 12 years ago

Description: modified (diff)

comment:4 by Jakub Jermář, 12 years ago

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

comment:5 by Vojtech Horky, 12 years ago

Description: modified (diff)
Keywords: needswork removed

comment:6 by Jiri Svoboda, 12 years ago

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 by Jakub Jermář, 11 years ago

Keywords: gsoc13 added

comment:8 by Martin Decky, 11 years ago

Component: helenos/kernel/generichelenos-infrastructure

comment:9 by Martin Decky, 11 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.