JOURNAL ARTICLE

Semi-Extended Tasks: Efficient Stack Sharing Among Blocking Threads

Abstract

Memory is an expensive and, therefore, limited resource in deeply embedded real-time systems. Thread stacks substantially contribute to the RAM requirements. To reduce the system's worst-case stack consumption (WCSC), it is state of the art to exploit thread-level preemption constraints to let multiple threads share the same stack. However, deriving a tight, yet correct bound for the shared stack is a difficult undertaking and stack sharing is currently restricted to run-to-completion threads, which are preemptable, but cannot block (i.e., passively wait for an event) at run time. With semi-extended tasks (SETs), we propose a solution for efficient stack sharing among blocking and non-blocking threads on the system level. For this, we refine the stack-sharing granularity from the thread to function level. We provide an efficient intra-thread stack-switch mechanism and an ILP-based WCSC analysis that considers fine-grained preemption constraints and possible function-level switching points from the private to the shared stack. A genetic algorithm then selects switching points that lead to the reduction of the overall WCSC. Compared to systems that run only non-blocking threads on the shared stack, semi-extended tasks decrease the WCSC in our benchmarks on average by 7 percent and up to 52 percent for some systems.

Keywords:
Computer science Thread (computing) Preemption Call stack Stack (abstract data type) Protocol stack Parallel computing Shared resource Granularity Distributed computing Exploit Shared memory Operating system

Metrics

2
Cited By
0.00
FWCI (Field Weighted Citation Impact)
37
Refs
0.19
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Real-Time Systems Scheduling
Physical Sciences →  Computer Science →  Hardware and Architecture
Parallel Computing and Optimization Techniques
Physical Sciences →  Computer Science →  Hardware and Architecture
Distributed systems and fault tolerance
Physical Sciences →  Computer Science →  Computer Networks and Communications

Related Documents

BOOK-CHAPTER

Tasks and threads

Jim JeffersJames ReindersAvinash Sodani

Elsevier eBooks Year: 2016 Pages: 155-172
BOOK-CHAPTER

Threads und Tasks

Bjarne Stroustrup

Year: 2015 Pages: 1307-1353
© 2026 ScienceGate Book Chapters — All rights reserved.