- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I know intel sgx can support multithreading and an enclave can have several tcs.
In multicore system, what's the mapping relation between the SGX threads and cpu cores?If one tcs is mapped to one core, enclave threads are limited by cpu core number.
SGX threads are mapped directly to logical processors ? Why?
Thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>> I know intel sgx can support multithreading and an enclave can have several tcs. In multicore system, what's the mapping relation between the SGX threads and cpu cores?If one tcs is mapped to one core, enclave threads are limited by cpu core number.
SGX thread is mapped directly to logical processor. For example consider a multi core system having 4 processors and each one supporting two cores.Since there is one to one mapping exists between the enclave threads and logical processor, here the number of enclave threads(that can run in parallel) are limited to 4*2 =8.
>> SGX threads are mapped directly to logical processors ? Why?
In non sgx environment, User threads are mapped to one or many kernel threads to achieve more parallelism. But kernel threads are controlled by the OS. There might be possibility of attack on these kernel threads due to malware OS. In order to avoid this security issue, SGX threads are mapped directly to Logical processor.
-Surenthar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much Surenthar!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Threads running inside an enclave are the same threads running the user application, and the OS is responsible for all thread scheduling.
The main difference is that while a thread is running within an enclave it uses a stack and (sgx) thread descriptor that are inside the enclave. These are different from the stack and thread descriptor the thread has while running outside, which are assigned by the OS.
The number of threads that can run simultaneously inside an enclave is limited by the number of TCSes. The number of TCSes is limited by the amount of EPC memory available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Juan D. (Intel) wrote:
Threads running inside an enclave are the same threads running the user application, and the OS is responsible for all thread scheduling.
The main difference is that while a thread is running within an enclave it uses a stack and (sgx) thread descriptor that are inside the enclave. These are different from the stack and thread descriptor the thread has while running outside, which are assigned by the OS.
The number of threads that can run simultaneously inside an enclave is limited by the number of TCSes. The number of TCSes is limited by the amount of EPC memory available.
In the example above, if you have 10 Tcses in a multi core system which has 8 logical processors. How many threads can you run ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since there is an one to one mapping exists between the enclave threads and logical processor, here the number of enclave threads that can run in parallel for a system which has 8 logical processors are 8.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your application may create 10 threads to run inside the enclave. However, as Padma said, if the platform the enclave is running on has 8 logical processors, only 8 threads may be running simultaneously at any point of time. The remaining two will be scheduled in/out by the OS.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page