US2021286628A1PendingUtilityA1

Operating System With A Single Kernel Stack Per Processor

61
Assignee: FACEBOOK TECH LLCPriority: Jul 31, 2019Filed: May 4, 2021Published: Sep 16, 2021
Est. expiryJul 31, 2039(~13 yrs left)· nominal 20-yr term from priority
Y02D10/00G06F 9/4812G06F 9/545G06F 9/4881G06F 2212/1028G06F 9/4406G06F 12/0875G06F 9/5027G06F 2212/1021
61
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

In one embodiment, a method includes storing thread state information associated with the first user-mode thread into a memory space associated with the first user-mode thread when executing in kernel space in response to a first system call by a first-user mode thread, executing first operations corresponding to the first system call on a processor, where data associated with executing the first operations are stored on a kernel stack associated with the processor, determining to pause the execution of the first operations, enqueuing a workload on a schedule queue for resuming execution of the first operations in a future, where the workload comprises data associated with executing a remainder of the first operations, and executing second operations corresponding to a second system call from a second user-mode thread on the processor, where data associated with executing the second operations are stored on the kernel stack associated with the processor.

Claims

exact text as granted — not AI-modified
1 - 20 . (canceled) 
     
     
         21 . A method comprising, by a kernel-mode thread of an operating system of a computing device:
 executing first operations corresponding to a first system call, wherein data associated with executing the first operations are stored on a kernel stack associated with a processor;   determining to pause the execution of the first operations;   enqueuing a workload on a schedule queue for resuming the execution of the first operations in a future, wherein the workload comprises data associated with executing a remainder of the first operations; and   executing second operations corresponding to a second system call, wherein data associated with executing the second operations are stored on the kernel stack associated with the processor.   
     
     
         22 . The method of  claim 21 , wherein a processor of the computing device is associated with only one kernel-mode thread. 
     
     
         23 . The method of  claim 22 , wherein the first operations and the second operations are executed by the kernel-mode thread running on the processor. 
     
     
         24 . The method of  claim 21 , wherein determining to pause the execution of the first operations comprises calling a scheduler function, wherein the scheduler function makes a schedule decision among a plurality of workloads in the schedule queue. 
     
     
         25 . The method of  claim 24 , wherein the schedule decision is made based on one or more scheduling policies. 
     
     
         26 . The method of  claim 21 , wherein the operating system is a microkernel-based operating system, wherein user-mode threads in the operating system comprise user application threads and service-providing threads. 
     
     
         27 . The method of  claim 26 , wherein a first service-providing thread provides a particular service to one or more user-mode threads. 
     
     
         28 . The method of  claim 27 , wherein a request for the particular service from one of the one or more user-mode threads to the first service-providing thread is communicated through one of available Inter-Process Communication (IPC) mechanisms. 
     
     
         29 . The method of  claim 28 , wherein a result of the particular service from the first service-providing thread to the one of the one or more user-mode threads is communicated through one of the available IPC mechanisms or a shared memory. 
     
     
         30 . The method of  claim 26 , wherein the service-providing threads comprise device drivers. 
     
     
         31 . The method of  claim 26 , wherein the user application threads are implemented with an event-driven architecture. 
     
     
         32 . The method of  claim 21 , wherein the first system call is made by a first user-mode thread, wherein thread state information associated with the first user-mode thread is stored into a memory space associated with the first user-mode thread before the first operations are executed, and wherein the thread state information associated with the first user-mode thread is a snapshot of register values associated with the processor when the first user-mode thread makes the first system call. 
     
     
         33 . The method of  claim 32 , wherein the memory space associated with the first user-mode thread is a Thread-Local Storage (TLS) associated with the first user-mode thread or a Thread Control Block (TCB) associated with the first user-mode thread. 
     
     
         34 . The method of  claim 21 , wherein the second system call is made by a second user-mode thread, and wherein the second operations comprise returning to the second user-mode thread. 
     
     
         35 . The method of  claim 34 , wherein returning to the second user-mode thread comprises:
 retrieving thread state information associated with the second user-mode thread from a memory space associated with the second user-mode thread;   returning results of the second operations to the second system call; and   restoring registers of the processor with the retrieved thread state information.   
     
     
         36 . One or more computer-readable non-transitory storage media embodying software that is operable by a kernel-mode thread of an operating system of a computing device when executed to:
 execute first operations corresponding to a first system call, wherein data associated with executing the first operations are stored on a kernel stack associated with a processor;   determine to pause the execution of the first operations;   enqueue a workload on a schedule queue for resuming the execution of the first operations in a future, wherein the workload comprises data associated with executing a remainder of the first operations; and   execute second operations corresponding to a second system call, wherein data associated with executing the second operations are stored on the kernel stack associated with the processor.   
     
     
         37 . The media of  claim 36 , wherein a processor of the computing device is associated with only one kernel-mode thread. 
     
     
         38 . The media of  claim 37 , wherein the first operations and the second operations are executed by the kernel-mode thread running on the processor. 
     
     
         39 . The media of  claim 36 , wherein determining to pause the execution of the first operations comprises calling a scheduler function, wherein the scheduler function makes a schedule decision among a plurality of workloads in the schedule queue. 
     
     
         40 . A computing device comprising:
 one or more processors; and   one or more computer-readable non-transitory storage media coupled to one or more of the one or more processors and comprising instructions operable when executed by one of the one or more processors to cause a kernel-mode thread of an operating system of the computing device to:
 execute first operations corresponding to a first system call, wherein data associated with executing the first operations are stored on a kernel stack associated with a processor among the one or more processors; 
 determine to pause the execution of the first operations; 
 enqueue a workload on a schedule queue for resuming the execution of the first operations in a future, wherein the workload comprises data associated with executing a remainder of the first operations; and 
 execute second operations corresponding to a second system call, wherein data associated with executing the second operations are stored on the kernel stack associated with the processor.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.