Exploring Real-Time Futexes in LITMUSRT

Total Page:16

File Type:pdf, Size:1020Kb

Exploring Real-Time Futexes in LITMUSRT Fast on Average, Predictable in the Worst Case: Exploring Real-Time Futexes in LITMUSRT Roy Spliet Manohar Vanga Bjorn¨ B. Brandenburg Sven Dziadek MPI-SWS MPI-SWS MPI-SWS TU Dresden [email protected] [email protected] [email protected] [email protected] Abstract—This paper explores the problem of how to improve locking overhead in such applications allows for supporting the average-case performance of real-time locking protocols, much higher throughput (e.g. higher frame-rate) and reducing preferably without significantly deteriorating worst-case perfor- the number of deadline misses. Another advantage is in mixed- mance. Motivated by the futex implementation in Linux, where uncontended locks under the Priority Inheritance Protocol (PIP) criticality systems where optimizing for the average-case can do not incur kernel-switching overheads, we extend this concept help avoid deadline misses in low-criticality tasks. While these to more sophisticated protocols; namely the PCP, the MPCP and examples motivate the need for low average-case overheads, the FMLP+. We identify the challenges involved in implementing system schedulability is ultimately based on the worst-case futexes in these protocols and present the design and evaluation overheads. Thus, average-case overhead reductions must not of their implementation under LITMUSRT, a real-time extension of the Linux kernel. Our evaluation shows that the average-case significantly increase worst-case overheads. locking overhead is improved by up to 87% for some scenarios, An effective approach for achieving these goals is through but it does come at a price in the worst case overhead. the support for the fast userspace mutexes (futexes) [11] in the Linux kernel, a mechanism that supports efficient lock I. INTRODUCTION implementations with low average-case overheads. By ex- Suspension-based real-time locking protocols, such as the porting lock-state information to userspace, expensive system Priority Inheritance Protocol (PIP), are used in real-time calls can be avoided when a lock is uncontended. Linux’s systems to ensure mutually exclusive access to shared re- PIP implementation uses futexes to reduce the average-case sources while preventing unbounded priority inversions, where locking overhead. a higher priority task that should be scheduled can be delayed While prior work [1] has successfully applied the futex by lower priority tasks for potentially unbounded durations. approach to the PIP, the approach does not easily generalize to Such blocking, termed priority-inversion blocking (henceforth more sophisticated protocols. This is problematic as the PIP is pi-blocking), increases worst-case response times of tasks. limited in its theoretical properties: it has non-optimal bounds Various protocols have been proposed which provide different on pi-blocking and is susceptible to deadlocks unlike the PCP. bounds on worst-case blocking time. The choice of real-time Additionally protocols such as FIFO Multiprocessor Locking locking protocol is thus critical in the design of real-time Protocol (FMLP+) are asymptotically optimal in clustered systems as it affects their schedulability. Job-Level Fixed-Priority scheduling, a property not shared by Practical systems, in addition to accounting for pi-blocking, the PIP. However, it is unclear whether the futex approach must also carefully account for system overheads associated can be extended to improve the average-case performance of with the lock acquisition and lock release operations. These these protocols. In fact, even though the Pthreads package pro- overheads typically comprise both hardware overheads, such vides an implementation of the PCP (called PRIO PROTECT) as those incurred by protection mode switches, as well as which uses the futex API, the PRIO PROTECT implemen- bookkeeping code in the operating system kernel. Failure tation does not adhere to the futex philosophy and requires to account for these overheads can lead to execution time multiple system calls for uncontended lock operations. underestimates and consequently to deadline misses. Ideally, The key challenge in generalizing the PIP futex imple- one would choose an optimal locking protocol, such as the mentation to more sophisticated protocols boils down to the Priority Ceiling Protocol (PCP), provided that an efficient following difference: The PIP can be considered a reactive implementation is available. locking protocol, in that it makes all its decisions in reaction The majority of prior work dealing with the efficient im- to lock acquisition or lock release operations. In contrast, plementation of real-time locking protocols has focused on the PCP and multiprocessor locking protocols such as MPCP worst-case overheads. However, there are numerous workloads and FMLP+ are what we term anticipatory locking protocols: that can benefit from faster average-case overheads, where they make use of additional information about the workload locks are typically uncontended. A prime example is that to anticipate problematic scenarios and prevent them. For of soft real-time workloads such as video playback where example, in the PCP, each lock is associated with a priority locks may be acquired by threads of different priorities many ceiling that specifies the highest priority task that may acquire thousands of times per second [7]. Reducing average-case it. This can result in scenarios where a lock is uncontended but the semantics of the protocol forbid a task from acquiring it. A. Futexes + Similarly, MPCP and FMLP keep track of additional infor- Futexes, short for fast userspace mutexes, are a mechanism mation to ensure bounded remote blocking via the technique found in the Linux kernel to support the implementation of priority boosting, where jobs in critical sections are boosted of suspension-based locks in userspace [11]. A basic futex- in priority to ensure progress. enabled lock consists of (i) a shared integer that contains the This motivates the key question of this paper: can the current state of the lock, and (ii) a kernel-side wait-queue futex approach be extended to support anticipatory real-time exposed through the futex API. The integer represents the locking protocols without violating their semantics? Further, number of tasks contending for this lock: 0 means free, 1 can this be done without significantly increasing the worst- means acquired, and any larger value indicates there are jobs case overheads? In this paper, we show that this is indeed blocking on this mutex. Lock and unlock operations are imple- possible and we describe the key properties that help us + mented using atomic fetch-and-increment/fetch-and-decrement achieve this for three protocols: the PCP, MPCP and FMLP . respectively, where the old value indicates whether the lock We implemented futex-based versions of these protocols in RT + operation succeeded or some further action is required. Further LITMUS called the PCP-DU, MPCP-DU and FMLP -DU. action involves an expensive system call to the kernel in order Here, “DU” stands for deferred update, as our implementations to manipulate the wait-queue. implement futexes by deferring the update of the state of a lock until the next time the scheduler is called. B. Locking in LITMUSRT A. Contributions LITMUSRT is a real-time extension of the Linux ker- In this paper, we make the following contributions: nel [8], providing a testbed for novel scheduling and locking algorithms. It supports the sporadic task model and modular • We identify key properties of the PCP, MPCP and + scheduler plugins. Besides several multiprocessor scheduling FMLP (Secs.IV andV) that allow us to extend the futex RT approach to anticipatory real-time locking protocols. policies, LITMUS also implements a variety of locking • protocols, including the PCP, MPCP, FMLP [6] and the We describe futex-based implementations of these pro- + tocols (Secs.IV andV) in LITMUS RT: the PCP-DU, FMLP . These implementations have been designed primarily MPCP-DU and FMLP+-DU respectively. with low worst-case locking overheads in mind. • We evaluated these protocols (Sec.VI) and observe Real-time tasks use the mutex-based locking API of RT upto 93% reduction in overheads in certain uncontended LITMUS to ensure mutually exclusive access to shared scenarios, and only at most 22% increase in contended resources. Tasks use special system calls provided by RT overheads. LITMUS to create locks associated with a particular pro- tocol, and to lock and unlock them. These routines track We begin by providing the necessary background informa- the state of a lock and take care of task blocking when the tion before presenting the design, implementation details and protocol forbids lock acquisition for a particular task. We evaluation of the improved implementations. implemented our protocols in LITMUSRT to benefit from the II. BACKGROUND AND DEFINITIONS generic scheduling framework and extensible API it offers. We consider real-time scheduling under a system compris- C. Real-Time Locking Protocols ing a set of n tasks fT1;:::;Tng running on a set of m processors fP1;:::;Pmg, where each task Ti releases a series The simplest suspension-based real-time locking protocol th of jobs, where the j job is denoted Ji;j. We assume the is the Priority Inheritance Protocol (PIP) proposed by Sha sporadic task model where each task is defined by the worst- et al.[14]. Under the PIP, when a high-priority task blocks case execution time (WCET) ei, a minimum inter-arrival time on a lock currently held by a lower-priority task, the latter or period pi and a relative deadline di. There are a set of shared inherits the priority of the high-priority task, thus preventing resources 2 R = fr1; : : : ; rng in the system, each associated unbounded priority inversions. PRIO INHERIT is the Linux with a lock. implementation of the PIP, which uses the futex API and We assume Partitioned Fixed-Priority (P-FP) scheduling [9], consequently does not incur system call overheads for uncon- where the set of tasks are partitioned among the m processors tended lock operations.
Recommended publications
  • Microkernel Mechanisms for Improving the Trustworthiness of Commodity Hardware
    Microkernel Mechanisms for Improving the Trustworthiness of Commodity Hardware Yanyan Shen Submitted in fulfilment of the requirements for the degree of Doctor of Philosophy School of Computer Science and Engineering Faculty of Engineering March 2019 Thesis/Dissertation Sheet Surname/Family Name : Shen Given Name/s : Yanyan Abbreviation for degree as give in the University calendar : PhD Faculty : Faculty of Engineering School : School of Computer Science and Engineering Microkernel Mechanisms for Improving the Trustworthiness of Commodity Thesis Title : Hardware Abstract 350 words maximum: (PLEASE TYPE) The thesis presents microkernel-based software-implemented mechanisms for improving the trustworthiness of computer systems based on commercial off-the-shelf (COTS) hardware that can malfunction when the hardware is impacted by transient hardware faults. The hardware anomalies, if undetected, can cause data corruptions, system crashes, and security vulnerabilities, significantly undermining system dependability. Specifically, we adopt the single event upset (SEU) fault model and address transient CPU or memory faults. We take advantage of the functional correctness and isolation guarantee provided by the formally verified seL4 microkernel and hardware redundancy provided by multicore processors, design the redundant co-execution (RCoE) architecture that replicates a whole software system (including the microkernel) onto different CPU cores, and implement two variants, loosely-coupled redundant co-execution (LC-RCoE) and closely-coupled redundant co-execution (CC-RCoE), for the ARM and x86 architectures. RCoE treats each replica of the software system as a state machine and ensures that the replicas start from the same initial state, observe consistent inputs, perform equivalent state transitions, and thus produce consistent outputs during error-free executions.
    [Show full text]
  • Advanced Operating Systems #1
    <Slides download> https://www.pf.is.s.u-tokyo.ac.jp/classes Advanced Operating Systems #2 Hiroyuki Chishiro Project Lecturer Department of Computer Science Graduate School of Information Science and Technology The University of Tokyo Room 007 Introduction of Myself • Name: Hiroyuki Chishiro • Project Lecturer at Kato Laboratory in December 2017 - Present. • Short Bibliography • Ph.D. at Keio University on March 2012 (Yamasaki Laboratory: Same as Prof. Kato). • JSPS Research Fellow (PD) in April 2012 – March 2014. • Research Associate at Keio University in April 2014 – March 2016. • Assistant Professor at Advanced Institute of Industrial Technology in April 2016 – November 2017. • Research Interests • Real-Time Systems • Operating Systems • Middleware • Trading Systems Course Plan • Multi-core Resource Management • Many-core Resource Management • GPU Resource Management • Virtual Machines • Distributed File Systems • High-performance Networking • Memory Management • Network on a Chip • Embedded Real-time OS • Device Drivers • Linux Kernel Schedule 1. 2018.9.28 Introduction + Linux Kernel (Kato) 2. 2018.10.5 Linux Kernel (Chishiro) 3. 2018.10.12 Linux Kernel (Kato) 4. 2018.10.19 Linux Kernel (Kato) 5. 2018.10.26 Linux Kernel (Kato) 6. 2018.11.2 Advanced Research (Chishiro) 7. 2018.11.9 Advanced Research (Chishiro) 8. 2018.11.16 (No Class) 9. 2018.11.23 (Holiday) 10. 2018.11.30 Advanced Research (Kato) 11. 2018.12.7 Advanced Research (Kato) 12. 2018.12.14 Advanced Research (Chishiro) 13. 2018.12.21 Linux Kernel 14. 2019.1.11 Linux Kernel 15. 2019.1.18 (No Class) 16. 2019.1.25 (No Class) Linux Kernel Introducing Synchronization /* The cases for Linux */ Acknowledgement: Prof.
    [Show full text]
  • Process Scheduling Ii
    PROCESS SCHEDULING II CS124 – Operating Systems Spring 2021, Lecture 12 2 Real-Time Systems • Increasingly common to have systems with real-time scheduling requirements • Real-time systems are driven by specific events • Often a periodic hardware timer interrupt • Can also be other events, e.g. detecting a wheel slipping, or an optical sensor triggering, or a proximity sensor reaching a threshold • Event latency is the amount of time between an event occurring, and when it is actually serviced • Usually, real-time systems must keep event latency below a minimum required threshold • e.g. antilock braking system has 3-5 ms to respond to wheel-slide • The real-time system must try to meet its deadlines, regardless of system load • Of course, may not always be possible… 3 Real-Time Systems (2) • Hard real-time systems require tasks to be serviced before their deadlines, otherwise the system has failed • e.g. robotic assembly lines, antilock braking systems • Soft real-time systems do not guarantee tasks will be serviced before their deadlines • Typically only guarantee that real-time tasks will be higher priority than other non-real-time tasks • e.g. media players • Within the operating system, two latencies affect the event latency of the system’s response: • Interrupt latency is the time between an interrupt occurring, and the interrupt service routine beginning to execute • Dispatch latency is the time the scheduler dispatcher takes to switch from one process to another 4 Interrupt Latency • Interrupt latency in context: Interrupt! Task
    [Show full text]
  • What Is an Operating System III 2.1 Compnents II an Operating System
    Page 1 of 6 What is an Operating System III 2.1 Compnents II An operating system (OS) is software that manages computer hardware and software resources and provides common services for computer programs. The operating system is an essential component of the system software in a computer system. Application programs usually require an operating system to function. Memory management Among other things, a multiprogramming operating system kernel must be responsible for managing all system memory which is currently in use by programs. This ensures that a program does not interfere with memory already in use by another program. Since programs time share, each program must have independent access to memory. Cooperative memory management, used by many early operating systems, assumes that all programs make voluntary use of the kernel's memory manager, and do not exceed their allocated memory. This system of memory management is almost never seen any more, since programs often contain bugs which can cause them to exceed their allocated memory. If a program fails, it may cause memory used by one or more other programs to be affected or overwritten. Malicious programs or viruses may purposefully alter another program's memory, or may affect the operation of the operating system itself. With cooperative memory management, it takes only one misbehaved program to crash the system. Memory protection enables the kernel to limit a process' access to the computer's memory. Various methods of memory protection exist, including memory segmentation and paging. All methods require some level of hardware support (such as the 80286 MMU), which doesn't exist in all computers.
    [Show full text]
  • Linux Kernal II 9.1 Architecture
    Page 1 of 7 Linux Kernal II 9.1 Architecture: The Linux kernel is a Unix-like operating system kernel used by a variety of operating systems based on it, which are usually in the form of Linux distributions. The Linux kernel is a prominent example of free and open source software. Programming language The Linux kernel is written in the version of the C programming language supported by GCC (which has introduced a number of extensions and changes to standard C), together with a number of short sections of code written in the assembly language (in GCC's "AT&T-style" syntax) of the target architecture. Because of the extensions to C it supports, GCC was for a long time the only compiler capable of correctly building the Linux kernel. Compiler compatibility GCC is the default compiler for the Linux kernel source. In 2004, Intel claimed to have modified the kernel so that its C compiler also was capable of compiling it. There was another such reported success in 2009 with a modified 2.6.22 version of the kernel. Since 2010, effort has been underway to build the Linux kernel with Clang, an alternative compiler for the C language; as of 12 April 2014, the official kernel could almost be compiled by Clang. The project dedicated to this effort is named LLVMLinxu after the LLVM compiler infrastructure upon which Clang is built. LLVMLinux does not aim to fork either the Linux kernel or the LLVM, therefore it is a meta-project composed of patches that are eventually submitted to the upstream projects.
    [Show full text]
  • A Linux Kernel Scheduler Extension for Multi-Core Systems
    A Linux Kernel Scheduler Extension For Multi-Core Systems Aleix Roca Nonell Master in Innovation and Research in Informatics (MIRI) specialized in High Performance Computing (HPC) Facultat d’informàtica de Barcelona (FIB) Universitat Politècnica de Catalunya Supervisor: Vicenç Beltran Querol Cosupervisor: Eduard Ayguadé Parra Presentation date: 25 October 2017 Abstract The Linux Kernel OS is a black box from the user-space point of view. In most cases, this is not a problem. However, for parallel high performance computing applications it can be a limitation. Such applications usually execute on top of a runtime system, itself executing on top of a general purpose kernel. Current runtime systems take care of getting the most of each system core by distributing work among the multiple CPUs of a machine but they are not aware of when one of their threads perform blocking calls (e.g. I/O operations). When such a blocking call happens, the processing core is stalled, leading to performance loss. In this thesis, it is presented the proof-of-concept of a Linux kernel extension denoted User Monitored Threads (UMT). The extension allows a user-space application to be notified of the blocking and unblocking of its threads, making it possible for a core to execute another worker thread while the other is blocked. An existing runtime system (namely Nanos6) is adapted, so that it takes advantage of the kernel extension. The whole prototype is tested on a synthetic benchmarks and an industry mock-up application. The analysis of the results shows, on the tested hardware and the appropriate conditions, a significant speedup improvement.
    [Show full text]
  • Demarinis Kent Williams-King Di Jin Rodrigo Fonseca Vasileios P
    sysfilter: Automated System Call Filtering for Commodity Software Nicholas DeMarinis Kent Williams-King Di Jin Rodrigo Fonseca Vasileios P. Kemerlis Department of Computer Science Brown University Abstract This constant stream of additional functionality integrated Modern OSes provide a rich set of services to applications, into modern applications, i.e., feature creep, not only has primarily accessible via the system call API, to support the dire effects in terms of security and protection [1, 71], but ever growing functionality of contemporary software. How- also necessitates a rich set of OS services: applications need ever, despite the fact that applications require access to part of to interact with the OS kernel—and, primarily, they do so the system call API (to function properly), OS kernels allow via the system call (syscall) API [52]—in order to perform full and unrestricted use of the entire system call set. This not useful tasks, such as acquiring or releasing memory, spawning only violates the principle of least privilege, but also enables and terminating additional processes and execution threads, attackers to utilize extra OS services, after seizing control communicating with other programs on the same or remote of vulnerable applications, or escalate privileges further via hosts, interacting with the filesystem, and performing I/O and exploiting vulnerabilities in less-stressed kernel interfaces. process introspection. To tackle this problem, we present sysfilter: a binary Indicatively, at the time of writing, the Linux
    [Show full text]
  • Chapter 5. Kernel Synchronization
    Chapter 5. Kernel Synchronization You could think of the kernel as a server that answers requests; these requests can come either from a process running on a CPU or an external device issuing an interrupt request. We make this analogy to underscore that parts of the kernel are not run serially, but in an interleaved way. Thus, they can give rise to race conditions, which must be controlled through proper synchronization techniques. A general introduction to these topics can be found in the section "An Overview of Unix Kernels" in Chapter 1 of the book. We start this chapter by reviewing when, and to what extent, kernel requests are executed in an interleaved fashion. We then introduce the basic synchronization primitives implemented by the kernel and describe how they are applied in the most common cases. 5.1.1. Kernel Preemption a kernel is preemptive if a process switch may occur while the replaced process is executing a kernel function, that is, while it runs in Kernel Mode. Unfortunately, in Linux (as well as in any other real operating system) things are much more complicated: Both in preemptive and nonpreemptive kernels, a process running in Kernel Mode can voluntarily relinquish the CPU, for instance because it has to sleep waiting for some resource. We will call this kind of process switch a planned process switch. However, a preemptive kernel differs from a nonpreemptive kernel on the way a process running in Kernel Mode reacts to asynchronous events that could induce a process switch - for instance, an interrupt handler that awakes a higher priority process.
    [Show full text]
  • Advanced Operating Systems #1
    <Slides download> http://www.pf.is.s.u-tokyo.ac.jp/class.html Advanced Operating Systems #5 Shinpei Kato Associate Professor Department of Computer Science Graduate School of Information Science and Technology The University of Tokyo Course Plan • Multi-core Resource Management • Many-core Resource Management • GPU Resource Management • Virtual Machines • Distributed File Systems • High-performance Networking • Memory Management • Network on a Chip • Embedded Real-time OS • Device Drivers • Linux Kernel Schedule 1. 2018.9.28 Introduction + Linux Kernel (Kato) 2. 2018.10.5 Linux Kernel (Chishiro) 3. 2018.10.12 Linux Kernel (Kato) 4. 2018.10.19 Linux Kernel (Kato) 5. 2018.10.26 Linux Kernel (Kato) 6. 2018.11.2 Advanced Research (Chishiro) 7. 2018.11.9 Advanced Research (Chishiro) 8. 2018.11.16 (No Class) 9. 2018.11.23 (Holiday) 10. 2018.11.30 Advanced Research (Kato) 11. 2018.12.7 Advanced Research (Kato) 12. 2018.12.14 Advanced Research (Chishiro) 13. 2018.12.21 Linux Kernel 14. 2019.1.11 Linux Kernel 15. 2019.1.18 (No Class) 16. 2019.1.25 (No Class) Process Scheduling Abstracting Computing Resources /* The case for Linux */ Acknowledgement: Prof. Pierre Olivier, ECE 4984, Linux Kernel Programming, Virginia Tech Outline 1 General information 2 Linux Completely Fair Scheduler 3 CFS implementation 4 Preemption and context switching 5 Real-time scheduling policies 6 Scheduling-related syscalls Outline 1 General information 2 Linux Completely Fair Scheduler 3 CFS implementation 4 Preemption and context switching 5 Real-time scheduling policies
    [Show full text]
  • Kernel and Locking
    Kernel and Locking Luca Abeni [email protected] Monolithic Kernels • Traditional Unix-like structure • Protection: distinction between Kernel (running in KS) and User Applications (running in US) • The kernel behaves as a single-threaded program • One single execution flow in KS at each time • Simplify consistency of internal kernel structures • Execution enters the kernel in two ways: • Coming from upside (system calls) • Coming from below (hardware interrupts) Kernel Programming Kernel Locking Single-Threaded Kernels • Only one single execution flow (thread) can execute in the kernel • It is not possible to execute more than 1 system call at time • Non-preemptable system calls • In SMP systems, syscalls are critical sections (execute in mutual exclusion) • Interrupt handlers execute in the context of the interrupted task Kernel Programming Kernel Locking Bottom Halves • Interrupt handlers split in two parts • Short and fast ISR • “Soft IRQ handler” • Soft IRQ hanlder: deferred handler • Traditionally known ass Bottom Half (BH) • AKA Deferred Procedure Call - DPC - in Windows • Linux: distinction between “traditional” BHs and Soft IRQ handlers Kernel Programming Kernel Locking Synchronizing System Calls and BHs • Synchronization with ISRs by disabling interrupts • Synchronization with BHs: is almost automatic • BHs execute atomically (a BH cannot interrupt another BH) • BHs execute at the end of the system call, before invoking the scheduler for returning to US • Easy synchronization, but large non-preemptable sections! • Achieved
    [Show full text]
  • Challenges Using Linux As a Real-Time Operating System
    https://ntrs.nasa.gov/search.jsp?R=20200002390 2020-05-24T04:26:54+00:00Z View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by NASA Technical Reports Server Challenges Using Linux as a Real-Time Operating System Michael M. Madden* NASA Langley Research Center, Hampton, VA, 23681 Human-in-the-loop (HITL) simulation groups at NASA and the Air Force Research Lab have been using Linux as a real-time operating system (RTOS) for over a decade. More recently, SpaceX has revealed that it is using Linux as an RTOS for its Falcon launch vehicles and Dragon capsules. As Linux makes its way from ground facilities to flight critical systems, it is necessary to recognize that the real-time capabilities in Linux are cobbled onto a kernel architecture designed for general purpose computing. The Linux kernel contain numerous design decisions that favor throughput over determinism and latency. These decisions often require workarounds in the application or customization of the kernel to restore a high probability that Linux will achieve deadlines. I. Introduction he human-in-the-loop (HITL) simulation groups at the NASA Langley Research Center and the Air Force TResearch Lab have used Linux as a real-time operating system (RTOS) for over a decade [1, 2]. More recently, SpaceX has revealed that it is using Linux as an RTOS for its Falcon launch vehicles and Dragon capsules [3]. Reference 2 examined an early version of the Linux Kernel for real-time applications and, using black box testing of jitter, found it suitable when paired with an external hardware interval timer.
    [Show full text]
  • Thread Evolution Kit for Optimizing Thread Operations on CE/Iot Devices
    Thread Evolution Kit for Optimizing Thread Operations on CE/IoT Devices Geunsik Lim , Student Member, IEEE, Donghyun Kang , and Young Ik Eom Abstract—Most modern operating systems have adopted the the threads running on CE/IoT devices often unintentionally one-to-one thread model to support fast execution of threads spend a significant amount of time in taking the CPU resource in both multi-core and single-core systems. This thread model, and the frequency of context switch rapidly increases due to which maps the kernel-space and user-space threads in a one- to-one manner, supports quick thread creation and termination the limited system resources, degrading the performance of in high-performance server environments. However, the perfor- the system significantly. In addition, since CE/IoT devices mance of time-critical threads is degraded when multiple threads usually have limited memory space, they may suffer from the are being run in low-end CE devices with limited system re- segmentation fault [16] problem incurred by memory shortages sources. When a CE device runs many threads to support diverse as the number of threads increases and they remain running application functionalities, low-level hardware specifications often lead to significant resource contention among the threads trying for a long time. to obtain system resources. As a result, the operating system Some engineers have attempted to address the challenges encounters challenges, such as excessive thread context switching of IoT environments such as smart homes by using better overhead, execution delay of time-critical threads, and a lack of hardware specifications for CE/IoT devices [3], [17]–[21].
    [Show full text]