Appendix A (Appendix A) Inux Data Structures This appendix lists the main data structures used in the Linux used in this book. In order to visit on the page, they have passed a small amount of editing. The block_dev_structblock_dev_struct data structure is used to register the available block devices, allowing the buffer cache. They are placed in the BLK_DEV vector table. See include / linux / blkdev.hstruct blk_dev_struct {void (* request_fn) (void); struct request * current_request; struct request plug; struct tq_struct plug_tq;}; buffer_headbuffer_head data structure of information stored in a block buffer cache buffer.
See include / linux / fs.h * bhstate bits * / # define bh_uptodate 0 / * 1 if the buffer contains valid data * / # define bh_dirty 1 / * 1 if the buffer is dirty * / # define BH_LOCK 2 / * 1 If the buffer is locked * / # define bh_req 3 / * 0 if the buffer HAS been invalidated * / # define bh_touched 4 / * 1 if The buffer HAS been touch (aging) * / # define bh_has_aged 5 / * 1 if the buffer has been aged (aging) * / # define BH_Protected 6 / * 1 if the buffer is protected * / # define BH_FreeOnIO 7 / * 1 to discard the buffer_head after IO * / struct buffer_head {/ * First cache line: * / unsigned long b_blocknr; / * block number * / kdev_t b_dev; / * device (B_FREE = free) * / kdev_t b_rdev; / * Real device * / unsigned long b_rsector; / * Real buffer location on disk * / struct buffer_head * b_next; / * hash queue list * / struct buffer_head * b_this_page; / * circular list of buffers in onepage * // * Second cache line: * / unsigned long b_state; / * buffer state bitmap (above) * / struct buffer_head * b_next_free; unsigned int b_count ; / * Users US ing this block * / unsigned long b_size;. / * block size * // * Non-performance-critical data follows * / char * b_data; / * pointer to data block * / unsigned int b_list; / * List that this buffer appears * / unsigned long b_flushtime; / * Time when this (dirty) buffer * should be written * / unsigned long b_lru_time; / * Time when this buffer was * last used * / struct wait_queue * b_wait;. struct buffer_head * b_prev; / * doubly linked hash list * / struct buffer_head * b_prev_free; / * doubly linked list of buffers * / struct buffer_head * b_reqnext; / * request queue * /}; each network device device in the system are using a device data structure represented Referring include /LINUX/netDevice.hstruct device {/ ** this is the first field of the "visible" part of this structure * (IE as seen by users in the "
Space.c "file). IT is the name * the interface. * / Char * name; / * I / o specifici specification * / unsigned long rmem_end; / * shMem" RECV "end * / unsigned long rmem_start; / * shMem "recv" start * / unsigned long mem_end; / * shared mem end * / unsigned long mem_start; / * shared mem start * / unsigned long base_addr; / * device I / O address * / unsigned char irq; / * device IRQ number . * // * Low-level status flags * / volatile unsigned char start, / * start an operation * / interrupt; / * interrupt arrived * / unsigned long tbusy; / * transmitter busy * / struct device * next; / * The .. device initialization function Called only once * / int (* init) (struct device * dev); / * Some hardware also needs these fields, but they are not part ofthe usual set specified in Space.c * / unsigned char if_port. ; / * Selectable aui, tp, * / unsigned char DMA; / * DMA CHANNEL * / STRUCT ENET_STATISTICS * (* get_stats) (Struct Device * dev); / ** this mark the end of the "Visible" Part of the Structure . All * Fields Hereafter Are Internal to The System, And May Cha . Nge at * will. (Read: may be cleaned up at will) * // * These may be needed for future network-power-down code * / unsigned long trans_start; / * Time (jiffies) oflast transmit * / unsigned long last_rx; / * Time of last Rx * / unsigned short flags; / * interface flags (BSD) * / unsigned short family; / * address family ID * / unsigned short metric; / * routing metric * / unsigned short mtu; / * MTU value * / unsigned short type; / * hardware type * / unsigned short hard_header_len; / * hardware hdr len * / void * priv;. / * private data * // * Interface address info * / unsigned char broadcast [MAX_ADDR_LEN]; Unsigned char PAD; unsigned char dev_addr [max_addr_len]; unsigned char addr_len; / * hardware addr len * / unsigned long pa_addr;
/ * Protocol address * / unsigned long pa_brdaddr; / * protocol broadcast addr * / unsigned long pa_dstaddr; / * protocol PP other addr * / unsigned long pa_mask; / * protocol netmask * / unsigned short pa_alen; / * protocol address len * / struct dev_mc_list * mc_list; / * M'cast mac addrs * / int mc_count; / * No installed mcasts * / struct ip_mc_list * ip_mc_list; / * IP m'cast filter chain * / __ u32 tx_queue_len; / * Max frames per queue * / / * For load balancing driver pair support * / unsigned long pkt_queue; / * Packets queued * / struct device * slave; / * Slave device * / struct net_alias_info * alias_info; / * main dev alias info * / struct net_alias * my_alias; / * alias devs * // * Pointer to the interface buffers * / struct sk_buff_head buffs [DEV_NUMBUFFS];. / * Pointers to interface service routines * / int (* open) (struct device * dev);. int (* stop) ( struct device * dev); int (* hard_start_xmit) (struct sk_buff * skb, struct device * dev); int (* hard_header) (struct sk_buff * skb, struct device * dev, unsigned short type, void * daddr, void * Saddr, unsigned len); int (* rebuild_header) (void * eth, struct device * dev, unsigned long raddr, struct sk_buff * skb); void (* set_multicast_list) (struct device * dev); int (* set_mac_address) ( Struct Device * DEV, VOID * AddR); INT (* DO_IOCTL) (Struct IFREQ * IFR, INT CMD); int (* set_config) (Struct IFMAP * MAP); void (* header_cache_bind) (struct hh_cache ** hhp, struct device * dev, unsigned short htype, __ u32 daddr); void (* header_cache_update) (struct hh_cache * hh, struct device * dev, unsigned char * haddr); int (* change_mtu) ( Struct Device * dev, int new_mtu); struct IW_statistics * (* get_wireless_stats) (Struct Device * dev);}; device_structDevice_struct data structure is used to register characters and block devices (store the name of this device and possible file operations).
Each valid member in the Chrdevs and BLKDEVS tables represents a character or block device, respectively. See fs / devices.cstruct device_struct {const char * name; struct file_operations * fops;}; File Each open file, socket, etc. use a File data structure representative to see include / Linux / fs.hstruct file {mode_t f_mode; loff_t f_pos; unsigned short f_flags; unsigned short f_count; unsigned long f_reada, f_ramax, f_raend, f_ralen, f_rawin; struct file * f_next, * f_prev; int f_owner; / * pid or -pgrp where SIGIO should be sent * / struct inode * f_inode; struct file_operations * f_op; unsigned long f_version; void * private_data; / * needed for tty driver, and maybe others * /}; file_structfile_struct describes a data structure of the file open process see include / linux / sched.hstruct files_struct {int count; fd_set close_on_exec; fd_set open_fds; struct file * fd [NR_OPEN];}; fs_struct see include / linux / sched.hstruct fs_struct {int count; unsigned short umask; struct inode * root, * pwd;}; gendiskgendisk data structure stored Hard disk information.
See include / Linux / genhd.hstruct hd_struct {long start_sect; long nr_sects;}; struct gendisk {int major; / * major number of driver; / * major number of driver * / const char * major_name; / * name of major driver * / int minor_shift; / * number of times minor is shifted toget real minor * / int max_p; / * maximum partitions per device * / int max_nr; / * maximum number of real devices * / void (* init ) (struct gendisk *); / * Initialization called before wedo our thing * / struct hd_struct * part; / * partition table * / int * sizes; / * device size in blocks, copied toblk_size [] * / int nr_real; / * Number of real deAices; / * infer_devices; / * infrink;}; Inodevfs inode data structure stores a file or directory on disk to include include / linux / fs.hstruct inode {kdev_t i_dev; unsigned long i_ino; umode_t i_mode; nlink_t i_nlink; uid_t i_uid; gid_t i_gid; kdev_t i_rdev; off_t i_size; time_t i_atime; time_t i_mtime; time_t i_ctime; unsigned long i_blksize; unsigned long i_blocks; unsigned long i_version; unsigned long i_nrpages; struct semaphore i_se m; struct inode_operations * i_op; struct super_block * i_sb; struct wait_queue * i_wait; struct file_lock * i_flock; struct vm_area_struct * i_mmap; struct page * i_pages; struct dquot * i_dquot [MAXQUOTAS]; struct inode * i_next, * i_prev; struct inode * i_hash_next, * i_hash_prev; struct inode * i_bound_to, * i_bound_by; struct inode * i_mount; unsigned short i_count; unsigned short i_flags; unsigned char i_lock; unsigned char i_dirt; unsigned char i_pipe; unsigned char i_sock; unsigned char i_seek; unsigned char i_update ; unsigned short i_writecount; union {struct pipe_inode_info pipe_i; struct minix_inode_info minix_i; struct ext_inode_info ext_i; struct ext2_inode_info ext2_i; struct hpfs_inode_info hpfs_i; struct msdos_inode_info msdos_i;
struct umsdos_inode_info umsdos_i; struct iso_inode_info isofs_i; struct nfs_inode_info nfs_i; struct xiafs_inode_info xiafs_i; struct sysv_inode_info sysv_i; struct affs_inode_info affs_i; struct ufs_inode_info ufs_i; struct socket socket_i; void * generic_ip;} u;}; ipc_permipc_perm data structure describes a System V IPC objects Access Permissions See IPC_PINUX / IPC.H Struct IPC_Perm {Key_t Key; Ushort Uid; / * Owner Euid and Egid * / Ushort GID; Ushort Cuid; / * Creat Euid and Egid * / USHORT CGID; Ushort Mode; / * Access modes see mode flag; / * sequence number * /}; Irqactionirqaction data structure description system interrupt handler See include / linux / interrupt.h struct Irqaction {void (* handler) (int, void *, struct pt_regs *); unsigned long flags; unsigned long mask; const char * name; void * dev_id; struct irqaction * next;}; each binary file format linux_binfmtLinux appreciated both by a linux_binfmt data structure represents see include / linux / binfmt .h struct Linux_binfmt {struct Linux_binfmt * next; long * use_count; int (* load_binary) (struct pt_regs * regs); int (* load_shlib) (INT FD); i NT (* core_dump) (long Signr, Struct Pt_regs * Regs);}; MEM_MAP_TMEM_MAP_T data structure (also called Page) For information on each physical memory page See include / linux / mm.htypedef struct Page {/ * THESE MUST be first (free area handling) * / struct page * next; struct page * prev; struct inode * inode; unsigned long offset; struct page * next_hash; atomic_t count; unsigned flags; / * atomic flags, some possiblyupdated asynchronously * / unsigned dirty: 16, age: 8; struct wait_queue * wait; struct page * prev_hash; struct buffer_head * buffers; unsigned long swap_unlock_entry; unsigned long map_nr; / * page-> map_nr == page - mem_map * /} mem_map_t; mm structmm_struct data Structure is used to describe virtual memory for tasks or processes See include / Linux / schent.hstruct mm_struct {int count; pgd_t * pgd; unsigned long context;
unsigned long start_code, end_code, start_data, end_data; unsigned long start_brk, brk, start_stack, start_mmap; unsigned long arg_start, arg_end, env_start, env_end; unsigned long rss, total_vm, locked_vm; unsigned long def_flags; struct vm_area_struct * mmap; struct vm_area_struct * mmap_avl; struct semaphore mmap_sem;}; for each PCI bus in a data structure pci_bus pci_bus system represents see include / linux / pci.hstruct pci_bus {struct pci_bus * parent; / * parent bus this bridge is on * / struct pci_bus * children; / * chain of P2P bridges on this bus * / struct pci_bus * next; / * chain of all PCI buses * / struct pci_dev * self; / * bridge device as seen by parent * / struct pci_dev * devices; / * devices behind this bridge * / void * sysdata; / * hook for sys-specific extension * / unsigned char number; / * bus number * / unsigned char primary; / * number of primary bridge * / unsigned char secondary; / * number of secondary Bridge * / unsigned char subordinate; / * max number of subordinate buses * /}; each PCI device in the PCI_DEV system, including PCI-PCI and PCI-ISA bridge equipment pci_dev data structure represents see include / linux / pci.h / ** There is one pci_dev structure for each slot-number / function-number * combination: * / struct pci_dev {struct pci_bus * bus; / * bus this device is on * / struct pci_dev * sibling; / * next device on this bus * / struct pci_dev * next; / * chain of all devices * / void * sysdata; / * hook for sys-specific extension * / unsigned int devfn; / * encoded device & Function index * / unsigned short vevice; unsigned due; / * 3 bytes: (Base, Sub, prog-if) * / unsigned int master: 1; / * set if device is master capable * //// ** in Theory, The Irq Level Can Be Read from Configuration * Space and All Would Be Fine. However, Old PCI Chips Don '
t * support these registers and return 0 instead. For example, * the Vision864-P rev 0 chip can uses INTA, but returns 0 in * the interrupt line and pin registers. pci_init () * initializes this field with the value at PCI_INTERRUPT_LINE * and it is the job of pcibios_fixup () to change it if * necessary The field must not be 0 unless the device * can not generate interrupts at all * / unsigned char irq;.. / * irq generated by this device * /}; requestrequest Used to issue a request to the block devices in the system. See requests are include / linux / blkdev.hstruct request from / to the buffer cache read / write block {volatile int rq_status; #define RQ_INACTIVE (-1) #define RQ_ACTIVE 1 # define RQ_SCSI_BUSY 0xffff # define RQ_SCSI_DONE 0xfffe # define RQ_SCSI_DISCONNECTING 0xffe0kdev_t rq_dev; int cmd; / * READ or WRITE * / int errors; unsigned long sector; unsigned long nr_sectors; unsigned long current_nr_sectors; char * buffer; struct semaphore * sem; struct buffer_head * bh; struct buffer_head * bhtail; struct request * next }; Rtable Each RTABLE data structure stores information from a routing of the IP host. The RTABLE data structure is used in the IP Route cache. See include / net / route.hstruct rtable {struct rtable * rt_next; __ u32 rt_dst; __ u32 rt_src; __ u32 rt_gateway; atomic_t rt_refcnt; atomic_t rt_use; unsigned long rt_window; atomic_t rt_lastuse; struct hh_cache * rt_hh; struct device * rt_dev; unsigned short rt_flags Unsigned short rt_mtu; unsigned short rt_irl; unsigned char rt_tos;}; Semaphore signal light is used to protect important data structures and code areas. See INCLUDE / ASM / SEMAPHORE.HSTRUCT SEMAPHORE {Int Count; int WAIT_QUEUE * WAIT;}; SK_Buffsk_buff data structure When network data moves between the protocol layer Describe network data.
See include / linux / sk_buff.hstruct sk_buff {struct sk_buff * next; / * Next buffer in list * / struct sk_buff * prev; / * Previous buffer in list * / struct sk_buff_head * list; / * List we are on * / int magic_debug_cookie; struct sk_buff * link3; / * Link for IP protocol level buffer chains * / struct sock * sk; / * Socket we are owned by * / unsigned long when; / * used to compute rtt's * / struct timeval stamp; / * Time we arrived * / struct device * dev; / * Device we arrived on / are leaving by * / union {struct tcphdr * th; struct ethhdr * eth; struct iphdr * iph; struct udphdr * uh; unsigned char * raw; / * for passing file handles in a unix domain socket * / void * filp;} h; union {/ * As yet incomplete physical layer views * / unsigned char * raw; struct ethhdr * ethernet;} mac; struct iphdr * ip_hdr; / * For IPPROTO_RAW * / unsigned long len; / * Length of actual data * / unsigned long csum; / * Checksum * / __ u32 saddr; / * IP source address * / __ u32 daddr; / * IP target address * / __ u32 raddr; / * Ip next hop address * / __ u32 seq; / * TCP SEQUENCE Number * / __ u32 end_seq; / * SEQ [ FIN] [ SYN] DATALEN * / __ U32 ACK_SEQ; / * TCP ACK SEQUENCE NUMBER * / Unsigned Char Proto_Priv [16]; Volatile CHAR ACKED, / * Are We attched? * / used, / * area we in use? * / free, / * how to free this buffer * / arp; / * HAS IP / ARP resolution finished * / unsigned char TRIES, / * TIMES TRIED * / LOCK, / * ARE ? we locked * / localroute, / * Local routing asserted for this frame * / pkt_type, / * Packet class * / pkt_bridged, / * Tracker for bridging * / ip_summed; / * Driver fed us an IP checksum * / # define PACKET_HOST 0 / * To us * / # define packet_broadcast 1 / * to all * / # define packet_multicast 2 / * to group * / # define packet_otherhost 3 / * to someone else * / unsigned short user;
/ * User count - see datagram.c, tcp.c * / unsigned short protocol;. / * Packet protocol from driver * / unsigned int truesize; / * Buffer size * / atomic_t count; / * reference count * / struct sk_buff * Data_skb; / * link to the actual data skb * / unsigned char * head; / * head of buffer * / unsigned char * data; / * data head pointer * / unsigned char * tail; / * tail pointer * / unsigned char * End; / * end pointer * / void (* destructor) (STRUCT SK_BUFF *); / * Destruct function * / __ u16 redirport; / * redirect port * /}; SOCK Each SOCK data structure is stored in a BSD socket neutral and protocol Related information.
For example, for an INET SOCKET, this data structure stores all TCP / IP and UDP / IP-related information to include include / linux / net.hstruct sock {/ * this must be first_next; struct sock * sklist_prev; struct options * opt; atomic_t wmem_alloc; atomic_t rmem_alloc; unsigned long allocation; / * Allocation mode * / __ u32 write_seq; __ u32 sent_seq; __ u32 acked_seq; __ u32 copied_seq; __ u32 rcv_ack_seq; unsigned short rcv_ack_cnt; / * count of same ack * / __ u32 window_seq; __ u32 fin_seq; __ u32 urg_seq; __ u32 urg_data; __ u32 syn_seq; int users; / * user count * // ** Not all are volatile, but some are, so we * might as well say they all are * /. volatile char dead, urginline, intr, blog, done, reuse, keepopen, linger, delay_acks, destroy, ack_timed, no_check, zapped, broadcast, nonagle, bsdism; unsigned long lingertime; int proc; struct sock * next; struct sock ** pprev; struct sock * bind_next; struct sock ** bind_pprev; struct sock * pair; int hashent; struct sock * prev; struct sk_buff * volatile send_head; struct sk_buff * volatile send_next; struct sk_buff * volatile send_tail; struct sk_buff_head back_log; struct sk_buff * partial; struct timer_list partial_timer; long retransmits; struct sk_buff_head write_queue, receive_queue; struct proto * prot; struct wait_queue ** sleep; __ u32 daddr; __ u32 saddr; / * Sending source * / __ u32 rcv_saddr; / * Bound address * / unsigned short max_unacked; unsigned short window; __ u32 lastwin_seq; / * sequence number when we lastupdated the window we offer * / __ u32 high_seq; / * sequence number when we didcurrent fast retransmit * / volatile unsigned long ato; / * ack timeout * / volatile unsigned long lrcvtime; / * jiffies at last data rcv * / volatile unsigned long idletime; / * jiffies at last rcv * / unsigned int bytes_rcv; / ** mss is min (mtu, max_window) * / unsigned short mtu;
/ * Mss negotiated in the syn's * / volatile unsigned short mss; / * current eff mss - can change * / volatile unsigned short user_mss;. / * Mss requested by user in ioctl * / volatile unsigned short max_window; unsigned long window_clamp; unsigned int ssthresh; unsigned short num; volatile unsigned short cong_window; volatile unsigned short cong_count; volatile unsigned short packets_out; volatile unsigned short shutdown; volatile unsigned long rtt; volatile unsigned long mdev; volatile unsigned long rto; volatile unsigned short backoff; int err, err_soft; / * Soft holds errors that don'tcause failure but are the causeof a persistent failure notjust 'timed out' * / unsigned char protocol; volatile unsigned char state; unsigned char ack_backlog; unsigned char max_ack_backlog; unsigned char priority; unsigned char debug ; int rcvbuf; int sndbuf; unsigned short type; unsigned char localroute;. / * Route locally only * // ** This is where all the private (optional) areas that do not * overlap will eventually live * / union {struct unix_opt af_unix; #if defined (CONFIG_ATALK) || defined (CONFIG_ATALK_MODULE) struct atalk_sock af_at; # endif # if defined (CONFIG_IPX) || defined (CONFIG_IPX_MODULE) struct ipx_opt af_ipx; # endif # ifdef CONFIG_INETstruct inet_packet_opt af_packet; #ifdef CONFIG_NUTCPstruct tcp_opt af_tcp ; # endif # endif} protinfo; / ** IP 'private area' * / int ip_ttl; / * TTL setting * / int ip_tos; / * TOS * / struct tcphdr dummy_th; struct timer_list keepalive_timer; / * TCP keepalive hack * / struct timer_list retransmit_timer; / * TCP retransmit timer * / struct timer_list delack_timer; / * TCP delayed ack timer * / int ip_xmit_timeout; / * Why the timeout is running * / struct rtable * ip_route_cache; / * Cached output route * / unsigned char ip_hdrincl ;
? / * Include headers * / # ifdef CONFIG_IP_MULTICASTint ip_mc_ttl; / * Multicasting TTL * / int ip_mc_loop; / * Loopback * / char ip_mc_name [MAX_ADDR_LEN]; / * Multicast device name * / struct ip_mc_socklist * ip_mc_list; / * Group array * / #ENDIF / ** THIS PART IS Used for the timeout functions (Timer.c). * / int Timeout; / * What Are We waiting for? * / Struct Timer_List Timer; / * this is the time_wait / receive * Timer WHEN WE Are doing ip * / struct timeval stat stamp; / ** identd * / struct socket * Socket; / ** callbacks * / void (* state_change) (STRUCT SOCK * SK) (STRUCT SOCK * SK, INT Bytes); void (* Write_Space); void (* error_report) (STRUCT SOCK * SK);}; Socket Each Socket data structure stores a BSD socket information.
It does not exist independently, in fact, part of the VFS Inode data structure See include / Linux / net.hstruct socket {short type; / * sock_stream, ... * / socket_state state; long flag; structure ;_ops * Ops; / * protocols do most everything * / void * data; / * protocol data * / struct socket * conn; / * server socket connected to * / struct socket * iconn; / * incomplete client conn.s * / struct socket * next; struct wait_queue ** wait; / * ptr to place to wait on * / struct inode * inode; struct fasync_struct * fasync_list; / * Asynchronous wake up list * / struct file * file; / * File back pointer for gc * /}; task_struct each A task_struct description system in a system or process See include Task_struct {/ * treste area Hardcoded - don't touch * / volatile long state; / * -1 unrunnable, 0 runnable,> 0 stopped * / long counter; long priority; unsigned long signal; unsigned long blocked; / * bitmap of masked signals * / unsigned long flags; / * per process flags, defined below * / int errno; long debugreg [8]; / * Hardware debugging registers * / STRUCT EXEC_DOMAIN * EXEC_DOMAIN; / * VARIOUS FIELDS * / S truct linux_binfmt * binfmt; struct task_struct * next_task, * prev_task; struct task_struct * next_run, * prev_run; unsigned long saved_kernel_stack; unsigned long kernel_stack_page; int exit_code, exit_signal; / * ??? * / unsigned long personality; int dumpable: 1; int did_exec: 1; int pid; int pgrp; int tty_old_pgrp; int session; / * boolean value for session group leader * / int leader; int groups [NGROUPS]; / ** pointers to (original) parent process, youngest child, . younger sibling, * older sibling, respectively (p-> father can be replaced with * p-> p_pptr-> pid) * / struct task_struct * p_opptr, * p_pptr, * p_cptr, * p_ysptr, * p_osptr; struct wait_queue * wait_chldexit Unsigned short uid, euid, suid, fsuid; unsigned short gid, egid, sgID, fsgid;
unsigned long timeout, policy, rt_priority; unsigned long it_real_value, it_prof_value, it_virt_value; unsigned long it_real_incr, it_prof_incr, it_virt_incr; struct timer_list real_timer; long utime, stime, cutime, cstime, start_time; / * mm fault and swap info: this can arguably be seen as eithermm-specific or thread-specific * / unsigned long min_flt, maj_flt, nswap, cmin_flt, cmaj_flt, cnswap; int swappable: 1; unsigned long swap_address; unsigned long old_maj_flt; / * old value of maj_flt * / unsigned long dec_flt ; / * page fault count of the last time * / unsigned long swap_cnt; / * number of pages to swap on next pass * // * limits * / struct rlimit rlim [RLIM_NLIMITS]; unsigned short used_math; char comm [16]; / * file system info * / int link_count; struct tty_struct * tty; / * NULL if no tty * // * ipc stuff * / struct sem_undo * semundo; struct sem_queue * semsleeping; / * ldt for this task - used by Wine. If NULL, DEFAULT_LDT IS USED * / STRUCT DESC_STRUCT * LDT; / * TSS for this task * / struct thread_struct TSS; / * FileSy stem information * / struct fs_struct * fs; / * open file information * / struct files_struct * files; / * memory management info * / struct mm_struct * mm; / * signal handlers * / struct signal_struct * sig; #ifdef __SMP__int processor; int Last_Processor; INT LOCK_DEPTH; / * LOCK DEPTH.WE CAN Context Switch In and Outof Holding A Syscall Kernel Lock ... * / # ENDIF}; Timer_ListTimer_List data structure is used to implement the real-time timer of the process. See include / linux / timer.hstruct timer_list {struct timer_list * next; struct timer_list * prev; unsigned long expires; unsigned long data; void (* function) (unsigned long);}; tq_struct each task queue (tq_struct) data structure There are information that is in linequatting work. Usually a task that a device driver is required, but it is not necessary to complete immediately.