next up previous contentsNext: Thread Library Functions Up: Threads: I translation - next up previous contentsNext: Thread Library Functions Up: Threads: I Vietnamese how to say

next up previous contentsNext: Thre

next up previous contents
Next: Thread Library Functions Up: Threads: Implementation Previous: Threads: Implementation Contents

Thread Control Block
The following is the declaration of the Thread Control Block.

struct tcb {
u32_t status;
struct reg_context thread_context;
void *stack;
struct thread_info thread_params;
u32_t executedTime;
struct tcb *recoveryTask;
u32_t sched_field;
u32_t magic_key;
};

unsigned int status

This field holds the status information of the current thread. It can be one of THREAD_ON_CPU, THREAD_READY, THREAD_SUSPENDED THREAD_BLOCKED, THREAD_EXITED or THREAD_MISSED_DEADLINE.

This field is not directly updated by the kernel. The kernel thread library informs the scheduler about the status of a thread through the Scheduler API. It is upto the scheduler object to keep this field consistent. For example when a thread exits, the kernel calls the function set_mode(curr_thread,THREAD_EXITED) of the scheduler API. This approach of calling a scheduler function to update the status helps, when the sheduler needs to do additional work (apart from setting it's status) whenever the status of a thread changes. For example, for periodic threads, it might reset them when they exit.
struct reg_context thread_context

This structure stores the context of a thread. The structure reg_context is architecture specific. This field is accessed by the kernel thread library only. (The scheduler object should not mess with it).
struct thread_info thread_params

This field holds the initial thread parameters, like the start function, stack size, deadline etc. This information is required for resetting threads.
void * stack

This field is a pointer to the stack of the thread.
u32_t executedTime

This field can be used for keeping profiling information for the thread. This is currently not being used.
u32_t sched_field

This field is meant for use by the scheduler object. The kernel never accessed this field.

Typically this field will be used by the scheduler object for constructing datastructure of tcb's. For example if the scheduler object stores the ready threads in a list, this field would be used as next pointer.
u32_t magic_key

This field is used for debugging and should go away in the final release.

next up previous contents
Next: Thread Library Functions Up: Threads: Implementation Previous: Threads: Implementation Contents
Soumyadeb Mitra 2002-08-07
0/5000
From: -
To: -
Results (Vietnamese) 1: [Copy]
Copied!
next up previous contentsNext: Thread Library Functions Up: Threads: Implementation Previous: Threads: Implementation ContentsThread Control BlockThe following is the declaration of the Thread Control Block.struct tcb { u32_t status; struct reg_context thread_context; void *stack; struct thread_info thread_params; u32_t executedTime; struct tcb *recoveryTask; u32_t sched_field; u32_t magic_key;}; unsigned int status This field holds the status information of the current thread. It can be one of THREAD_ON_CPU, THREAD_READY, THREAD_SUSPENDED THREAD_BLOCKED, THREAD_EXITED or THREAD_MISSED_DEADLINE. This field is not directly updated by the kernel. The kernel thread library informs the scheduler about the status of a thread through the Scheduler API. It is upto the scheduler object to keep this field consistent. For example when a thread exits, the kernel calls the function set_mode(curr_thread,THREAD_EXITED) of the scheduler API. This approach of calling a scheduler function to update the status helps, when the sheduler needs to do additional work (apart from setting it's status) whenever the status of a thread changes. For example, for periodic threads, it might reset them when they exit. struct reg_context thread_context This structure stores the context of a thread. The structure reg_context is architecture specific. This field is accessed by the kernel thread library only. (The scheduler object should not mess with it). struct thread_info thread_params This field holds the initial thread parameters, like the start function, stack size, deadline etc. This information is required for resetting threads. void * stack This field is a pointer to the stack of the thread. u32_t executedTime This field can be used for keeping profiling information for the thread. This is currently not being used. u32_t sched_field This field is meant for use by the scheduler object. The kernel never accessed this field. Typically this field will be used by the scheduler object for constructing datastructure of tcb's. For example if the scheduler object stores the ready threads in a list, this field would be used as next pointer. u32_t magic_key This field is used for debugging and should go away in the final release.next up previous contentsNext: Thread Library Functions Up: Threads: Implementation Previous: Threads: Implementation ContentsSoumyadeb Mitra 2002-08-07
Being translated, please wait..
Results (Vietnamese) 2:[Copy]
Copied!
tiếp theo lên nội dung trước
Tiếp theo: Người Gởi Chức năng Thư viện Up: Chủ đề: Thực hiện trước: Chủ đề: Nội dung Thực hiện chủ Control Block Sau đây là tuyên bố của Chủ đề Control Block. struct TCB {status u32_t; struct reg_context thread_context; void * chồng; struct thread_info thread_params; u32_t executedTime; struct TCB * recoveryTask; u32_t sched_field; u32_t magic_key;}; tình trạng int unsigned lĩnh vực này giữ thông tin trạng thái của thread hiện hành. Nó có thể là một trong những THREAD_ON_CPU, THREAD_READY, THREAD_SUSPENDED THREAD_BLOCKED, THREAD_EXITED hoặc THREAD_MISSED_DEADLINE. Trường này không được cập nhật trực tiếp bởi hạt nhân. Thư viện đề hạt nhân thông báo lịch trình về tình trạng của một chủ đề thông qua các API Scheduler. Đó là tối đa các đối tượng lên lịch để giữ cho lĩnh vực này phù hợp. Ví dụ khi một sợi lối thoát hiểm, hạt nhân gọi set_mode chức năng (curr_thread, THREAD_EXITED) của API lịch. Cách tiếp cận này gọi một chức năng lên lịch để cập nhật trạng thái sẽ giúp, khi sheduler cần phải làm công việc bổ sung (ngoài thiết lập đó là tình trạng) bất cứ khi nào tình trạng của một chủ đề thay đổi. Ví dụ, đối với chủ đề định kỳ, nó có thể thiết lập lại cho họ khi họ xuất cảnh. Struct reg_context thread_context Cấu trúc này lưu bối cảnh của một thread. Các reg_context cấu trúc là kiến trúc cụ thể. Lĩnh vực này được truy cập bởi các chủ đề thư viện hạt nhân duy nhất. (Các đối tượng lập lịch không nên gây rối với nó). Struct thread_info thread_params lĩnh vực này nắm giữ các thông số chủ đề ban đầu, giống như chức năng bắt đầu, stack kích thước, thời hạn vv Những thông tin này là cần thiết để cài đặt lại chủ đề. Void * ngăn xếp lĩnh vực này là một con trỏ trỏ tới stack của thread. u32_t executedTime lĩnh vực này có thể được sử dụng để giữ cho profiling thông tin cho thread. Điều này hiện không được sử dụng. Sched_field u32_t lĩnh vực này là có nghĩa là để sử dụng bởi các đối tượng lên lịch. Các hạt nhân không bao giờ truy cập lĩnh vực này. Điển hình là lĩnh vực này sẽ được sử dụng bởi các đối tượng lên lịch cho việc xây dựng datastructure của TCB. Ví dụ, nếu các cửa hàng đối tượng lên lịch các chủ đề đã sẵn sàng trong danh sách, lĩnh vực này sẽ được sử dụng như là con trỏ tới. U32_t magic_key lĩnh vực này được sử dụng để gỡ lỗi và sẽ tự khỏi trong phiên bản chính thức. Nội dung trước đó lên tới Next: Chức năng chủ Thư viện Up : Chủ đề: Thực hiện trước: Chủ đề: Thực hiện Nội dung Soumyadeb Mitra 2002/08/07












































Being translated, please wait..
 
Other languages
The translation tool support: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bosnian, Bulgarian, Catalan, Cebuano, Chichewa, Chinese, Chinese Traditional, Corsican, Croatian, Czech, Danish, Detect language, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, Frisian, Galician, Georgian, German, Greek, Gujarati, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Korean, Kurdish (Kurmanji), Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Myanmar (Burmese), Nepali, Norwegian, Odia (Oriya), Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scots Gaelic, Serbian, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Spanish, Sundanese, Swahili, Swedish, Tajik, Tamil, Tatar, Telugu, Thai, Turkish, Turkmen, Ukrainian, Urdu, Uyghur, Uzbek, Vietnamese, Welsh, Xhosa, Yiddish, Yoruba, Zulu, Language translation.

Copyright ©2025 I Love Translation. All reserved.

E-mail: