`
highsky
  • 浏览: 269519 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表
用来表示可被Linux理解的二进制文件格式。 struct linux_binfmt {   struct linux_binfmt * next;   long *use_count;   int (*load_binary)(struct linux_binprm *, struct  pt_regs * regs);   int (*load_shlib)(int fd);   int (*core_dump)(long signr, struct pt_regs * regs); };
用来描叙系统的中断处理过程。 struct irqaction {   void (*handler)(int, void *, struct pt_regs *);   unsigned long flags;   unsigned long mask;   const char *name;   void *dev_id;   struct irqaction *next; };
此结构描叙对一个系统V IPC对象的存取权限。 struct ipc_perm {   key_t  key;   ushort uid;   /* owner euid and egid */   ushort gid;   ushort cuid;  /* creator euid and egid */   ushort cgid;   ushort mode; /* access modes see mode flags below */   ushort seq;   /* sequence number */ };
此VFS inode结构描叙磁盘上一个文件或目录的信息。 struct 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;     kd ...
包含关于某个硬盘的信息。用于磁盘初始化与分区检查时。 struct hd_struct {     long start_sect;     long nr_sects; }; struct gendisk {     int major;              /* major number of driver */     const char *major_name; /* name of major driver */     int minor_shift;         /* number of times minor is shifted to      ...
这个还不知道是啥 struct fs_struct {   int count;   unsigned short umask;   struct inode * root, * pwd; };
描叙被某进程打开的所有文件。 struct files_struct {   int count;   fd_set close_on_exec;   fd_set open_fds;   struct file * fd[NR_OPEN]; };
每个打开的文件、套接口都用此结构表示。 struct 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 in ...
此结构被块设备和字符设备用来向核心登记(包含设备名称以及可对此设备进行的文件操作)。chrdevs和blkdevs 中的每个有效分别表示一个字符设备和块设备。 struct device_struct {     const char * name;     struct file_operations * fops; };
系统中每个网络设备都用一个设备数据结构来表示。 struct device {   /*    * This is the first field of the "visible" part of this structure    * (i.e. as seen by users in the "Space.c" file).  It is the name    * the interface.    */   char                    *name;   /* I/O specific fields      ...
此结构包含关于buffer cache中一块缓存的信息。 /* bh state 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 i ...
此结构用于向核心登记块设备,它还被buffer cache实用。所有此类结构都位于blk_dev数组中。 struct blk_dev_struct {     void (*request_fn)(void);     struct request * current_request;     struct request   plug;     struct tq_struct plug_tq; };
struct task_struct{ /* these are hardcoded - don't touch */ volatile long        state;          /* -1 unrunnable, 0 runnable, >0 stopped */   long                 counter;   long                 priority;   unsigned             long signal;   unsigned             long blocked;   /* bitma ...
   今天同学去面Nortel,被问及一个问题,也是一个流传的老问题:如果让你来设计操作系统,你会怎么设计进程的数据结构?    借鉴一下linux的设计思想吧:       在linux的内核的实现中,有一些数据结构使用频度较高,他们是:    task_struct.    进程调度是Linux操作系统的核心,它对整个操作系统的执行效率至关重要.进程调度控制着进程对CPU的访问,Linux 内核利用一个数据结构(task_struct)代表一个进程,task_struct容纳了一个进程的所有信息,是系统对进程进行控制的唯一手段;    代表进程的数据结构指针形成了一个task数组( ...
Global site tag (gtag.js) - Google Analytics