Home|News blank.gif
When Design Matters CoreLinux++ CoreLinux Consortium
blank.gif
CoreLinux++
blank.gif
Goals
blank.gif
Developer's Corner
blank.gif
Contacts
Thread System Requirement Specification

CoreLinux++ Functional Requirement Document
Revision $Revision: 1.2 $
Last Modified : Tuesday, March 21, 2000

Title : Thread

Requirement ID: 1588
Analysis References: Use Case Report , Analysis Diagrams
Design References: Class Report , Design Diagrams
Cross References: Semaphore

1. Introduction

A thread is a single, sequential flow of control within a program. It is also the smallest unit of execution that Linux schedules. A thread consists of a stack, the state of the CPU registers, and an entry in the execution list of the system scheduler. At the implementors discretion, each thread can share all of the process's resources (Memory, Files, Signals, etc.).

A process consists of one or more threads, data, and other resources of a program in memory. A multi-threaded application is considered when there is at least one thread in addition to the main thread of the program. A program executes when the system scheduler gives one of its threads execution control. The scheduler determines which threads should run and when they should run. Threads of lower priority may have to wait while higher priority threads complete their tasks. On multiprocessor machines, the scheduler can move individual threads to different processors to "balance" the CPU load, or providing maximum throughput.

Each thread in a process operates independently. Unless you make them visible to each other, the threads execute individually and are unaware of the other threads in a process. Collectively, the resources a thread references (stack, registers, variables, instructions, etc.) are considered as part of the context for the path of execution. Threads sharing common resources, however, may need to coordinate their work by using semaphores or other methods of interprocess communication.

1.1 Deliverables Overview

Objective

The main deliverable objective is to provide for the overall management of threads in a user application. This includes supporting starting the user defined entry point, providing default stack and stack management, instrumentation, exception management, signal management, clean-up management, accountability, and necessary thread safe functions that are not dependent upon system libraries.

2. Functional Requirements

General Requirements

  1. The CoreLinux++ Thread implementation shall provide interface which supports starting a thread of execution.

  2. The CoreLinux++ Thread implementation shall provide interface for specifying variable number of arguments to the thread of execution.

  3. The CoreLinux++ Thread implementation shall provide interface for specifying a caller defined stack to use.

  4. The CoreLinux++ Thread implementation shall allocate a default stack for a new thread if one is not specified by the caller.

  5. The CoreLinux++ Thread implementation shall provide interface for specifying a default stack allocation size.

  6. The CoreLinux++ Thread implementation shall provide options for creating default stacks in system memory.

  7. The CoreLinux++ Thread implementation shall manage all threads created through it's interface

  8. The CoreLinux++ Thread implementation shall create a ThreadContext for each thread it creates.

  9. The CoreLinux++ Thread implementation shall maintain the ThreadContext on behalf of the caller.

  10. The CoreLinux++ Thread implementation shall provide the ThreadContext to the caller upon request.

  11. The CoreLinux++ Thread implementation shall provide a iterator over all the ThreadContexts created through it's interface.

  12. The CoreLinux++ Thread implementation shall provide instrumentation information.

  13. The CoreLinux++ Thread implementation instrumentation shall include the number of threads created count.

  14. The CoreLinux++ Thread implementation instrumentation shall include the number of threads completed count.

  15. The CoreLinux++ Thread implementation instrumentation shall include the number of threads active count.

  16. The CoreLinux++ Thread implementation instrumentation shall include the number of threads blocked count.

  17. The CoreLinux++ Thread implementation shall provide the interface for setting a threads priority.

  18. The CoreLinux++ Thread implementation shall provide the interface for getting a threads priority.

  19. The CoreLinux++ Thread implementation shall provide the interface for sending a signal to a thread.

  20. The CoreLinux++ Thread implementation shall handle all signals for a thread by default.

  21. The CoreLinux++ Thread implementation shall provide the interface for setting a threads signal mask.

  22. The CoreLinux++ Thread implementation shall provide the interface for getting a threads signal mask.

  23. The CoreLinux++ Thread implementation shall provide the interface for instructing a thread to exit imediatley.

  24. The CoreLinux++ Thread implementation shall provide the interface for a caller to block until a thread completes execution.

2.1 User Interface Specifications

NA

2.2 Product Services

NA

2.3 External Interfaces and Database Requirements

NA

2.4 Error Handling

2.5 Foreseeable Functional Changes and Enhancements

3. Non-Functional Requirements

3.1 Performance Requirements

3.2 User Documentation and Other User Aids

Use Case, Analysis, Design, and Class Reference documentation.

3.3 Development Requirements

Standards: CoreLinux++ C++ Standards and Guidelines

3.4 Foreseeable Non-Functional Changes

TBD

4. Remarks and Guidelines for Later Life Cycle Phases

TBD

5. Term Glossary




Copyright © 1999, 2000 by CoreLinux Consortium
This material may be distributed only subject to the terms and conditions set forth in the Open Publication License
Contacts
- contact the webmaster
News
Powered / Hosted by

SourceForge.net
Contributor
NoMagic, inc.
thanks Gary!
Cool OO Sites
cetus
corba
omg
patterns
  Made with xemacs / php Comments to webmaster blank.gif