日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

鸿蒙微内核游戏,华为鸿蒙微内核

發(fā)布時(shí)間:2025/3/15 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 鸿蒙微内核游戏,华为鸿蒙微内核 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

該樓層疑似違規(guī)已被系統(tǒng)折疊?隱藏此樓查看此樓

Minix是《操作系統(tǒng):設(shè)計(jì)與實(shí)現(xiàn)》示例代碼。\ Linus的Linux內(nèi)核本身就參考了Minix。 Minix2.0.4http://download.minix3.org/previous-versions/Intel-2.0.4/小白入門的版本,需要自己做軟盤。 Minix 3.2.,Minix2.0.4 ps ax 界面:可以看到文件系統(tǒng),進(jìn)程內(nèi)存管理這些已經(jīng)是系統(tǒng)獨(dú)立進(jìn)程的形式存在了,在ps中可以看到FS,MM。但Minix2版本無(wú)法手動(dòng)操作這些進(jìn)程,可以看到它們的pid都是0。 Minix3ps 返回結(jié)果:FS變成了VFS,但實(shí)質(zhì)上一樣。試著殺掉VFS進(jìn)程,系統(tǒng)馬上就不重啟了。 FS進(jìn)程請(qǐng)求SYS進(jìn)程將從磁盤讀取的內(nèi)容復(fù)制到用戶進(jìn)程P的緩沖區(qū),這一步是沒有用戶進(jìn)程參與的,所以FS進(jìn)程至少要知道用戶進(jìn)程P的內(nèi)存信息元數(shù)據(jù),這樣才可以讓內(nèi)核態(tài)的SYS進(jìn)程完成復(fù)制操作。 MM服務(wù)進(jìn)程,該進(jìn)程為用戶進(jìn)程的fork,exec,exit,wait等調(diào)用管理內(nèi)存,系統(tǒng)所有進(jìn)程的快照保存在mproc數(shù)組中,詳見mm/mproc.h文件:/* This table has one slot per process. It contains all the memory management* information for each process. Among other things, it defines the text, data* and stack segments, uids and gids, and various flags. The kernel and file* systems have tables that are also indexed by process, with the contents* of corresponding slots referring to the same process in all three.*/EXTERN struct mproc {struct mem_map mp_seg[NR_SEGS];/* points to text, data, stack */char mp_exitstatus;/* storage for status when process exits */char mp_sigstatus;/* storage for signal # for killed procs */pid_t mp_pid;/* process id */pid_t mp_procgrp;/* pid of process group (used for signals) */pid_t mp_wpid;/* pid this process is waiting for */int mp_parent;/* index of parent process */...// } mproc[NR_PROCS];// fs/fproc.h:/* This is the per-process information. A slot is reserved for each potential* process. Thus NR_PROCS must be the same as in the kernel. It is not possible* or even necessary to tell when a slot is free here.*/EXTERN struct fproc {mode_t fp_umask;/* mask set by umask system call */struct inode *fp_workdir;/* pointer to working directory's inode */struct inode *fp_rootdir;/* pointer to current root dir (see chroot) */struct filp *fp_filp[OPEN_MAX];/* the file descriptor table */...// } fproc[NR_PROCS];// 同樣是read讀取文件,微內(nèi)核只是把宏內(nèi)核的縱向通信換成了橫向通信而已。然而這個(gè)一縱一橫的背后,卻隱藏著大不同。縱向通信是實(shí)際發(fā)生的服務(wù)調(diào)用,即物理通信。橫向通信是對(duì)等層通信,即邏輯通信。 對(duì)于Minix微內(nèi)核的read場(chǎng)景,和TCP/IP的模型幾乎一致,在橫向?qū)Φ菼PC之下,宏內(nèi)核一個(gè)系統(tǒng)調(diào)用的事,微內(nèi)核的IPC竟然要12個(gè)系統(tǒng)調(diào)用,而且僅僅是send/receive重復(fù)6對(duì)!如此設(shè)計(jì)性能顯然好不了對(duì)于微內(nèi)核只需要send,receive兩個(gè)系統(tǒng)調(diào)用就夠了,所有的系統(tǒng)功能都可以通過(guò)send/receive兩個(gè)系統(tǒng)調(diào)用封裝IPC消息來(lái)完成:int read

總結(jié)

以上是生活随笔為你收集整理的鸿蒙微内核游戏,华为鸿蒙微内核的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。