freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

geekos操作系統(tǒng)的研究與實(shí)現(xiàn)操作系統(tǒng)課程設(shè)計(jì)-閱讀頁(yè)

2025-07-09 06:16本頁(yè)面
  

【正文】 ){ //TODO(Create a new thread to execute in user mode)。 unsigned csSelector=userContextcsSelector。//DS選擇子 Attach_User_Context(kthread, userContext)。 //數(shù)據(jù)選擇子 Push(kthread, userContextstackPointerAddr)。 //Eflags Push(kthread, csSelector)。 //程序計(jì)數(shù)器 Push(kthread, 0)。 //中斷號(hào)(0) //初始化通用寄存單元,將ESI用戶(hù)傳遞參數(shù)塊地址 Push(kthread, 0)。 /* ebx */ Push(kthread, 0)。 /* edx */ Push(kthread, userContextargBlockAddr)。 /* edi */ Push(kthread, 0)。 /* ds */ Push(kthread, dsSelector)。 /* fs */ Push(kthread, dsSelector)。 struct Kernel_Thread* kthread = Create_Thread(PRIORITY_USER, detached)。 Make_Runnable_Atomic(kthread)。} ================ =================//需在此文件別的函數(shù)前增加一個(gè)函數(shù),函數(shù)名為Copy_User_String,它被函數(shù)Sys_PrintString調(diào)用,具體實(shí)現(xiàn)如下:static int Copy_User_String(ulong_t uaddr, ulong_t len, ulong_t maxLen, char **pStr){ int rc = 0。 //超過(guò)最大長(zhǎng)度 if (len maxLen){ return EINVALID。 if (0 == str){ rc = ENOMEM。 } //從用戶(hù)空間中復(fù)制數(shù)據(jù) if (!Copy_From_User(str, uaddr, len)){ rc = EINVALID。 goto fail。\039。fail: return rc。 Exit(stateebx)。 int rc = 0。//字符串長(zhǎng)度 uchar_t* buf = 0。buf)) != 0) goto done。 }done: if (buf != 0) Free(buf)。}static int Sys_GetKey(struct Interrupt_State* state){ //TODO(GetKey system call)。 //()}static int Sys_SetAttr(struct Interrupt_State* state){ //TODO(SetAttr system call)。 return 0。 int row, col。row, amp。 if (!Copy_To_User(stateebx, amp。col, sizeof(int))) return 1。}static int Sys_PutCursor(struct Interrupt_State* state){ //TODO(PutCursor system call)。}static int Sys_Spawn(struct Interrupt_State* state){ //TODO(Spawn system call)。 //函數(shù)返回值 char *program = 0。 //用戶(hù)命令 struct Kernel_Thread *process。program)) != 0) {//從用戶(hù)空間復(fù)制進(jìn)程名稱(chēng) goto fail。mand)) != 0) {//從用戶(hù)空間復(fù)制用戶(hù)命令 goto fail。 //開(kāi)中斷 rc = Spawn(program, mand, amp。//得到進(jìn)程名稱(chēng)和用戶(hù)命令后便可生成一個(gè)新進(jìn)程 if (rc == 0) {//若成功則返回新進(jìn)程ID號(hào) KASSERT(process != 0)。 } Disable_Interrupts()。 if (mand != 0) Free(mand)。}static int Sys_Wait(struct Interrupt_State* state){ //TODO(Wait system call)。 struct Kernel_Thread *kthread = Lookup_Thread(stateebx)。 Enable_Interrupts()。 Disable_Interrupts()。}static int Sys_GetPID(struct Interrupt_State* state){ //TODO(GetPID system call)。}================= ==================static void Spawn_Init_Process(void){ //TODO(Spawn the init process)。 Spawn(/c/,/c/,amp。}=========================================2. 編譯GeekOS項(xiàng)目project21) cd /.../2) 執(zhí)行 make depend build] make depend3) 執(zhí)行 make build] make 成功之后在build 。2. 在編輯器中輸入以下配置內(nèi)容vgaromimage: file=$BXSHARE/VGABIOSlgpllatestromimage: file=$BXSHARE/BIOSbochslatest, address=0xf0000megs: 8boot: afloppya: 1_44=, status=insertedlog: ./keyboard_serial_delay: 200floppy_mand_delay: 500vga_update_interval: 300000ips: 1000000mouse: enabled=0private_colormap: enabled=0i440fxsupport: enabled=0ata0:enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14ata0master:type=disk,mode=flat,path=,cylinders=40,heads=8,spt=643. 保存,退出 gedit4. 啟動(dòng)bochs:在build目錄中執(zhí)行 bochs f bochsrcbuild] bochs f bochsrc simulation 系統(tǒng)編譯運(yùn)行的結(jié)果1. Project0 運(yùn)行結(jié)果:終端打開(kāi):$ $ make $ make depend $ bochs Please choose one: [5] 5 2. Project1 運(yùn)行結(jié)果:終端打開(kāi):$ $ make $ make depend $ bochs Please choose one: [5] 5 3. Project2的運(yùn)行結(jié)果:終端打開(kāi):$ $ make $ make depend $ bochs Please choose one: [5] 5 遇到的問(wèn)題和解決方法1. 安裝Ubuntu ,安裝bochs時(shí)出現(xiàn)了了一系列的問(wèn)題,在$ cd $./configure 后出現(xiàn)錯(cuò)誤ERROR: X windows gui was selected, but X windows libraries were not found. 按照提示后上網(wǎng)查找資料后,輸入命令:$ sudo aptget install libx11dev $ sudo aptget install xserverxorgdev $ sudo aptget install xorgde..但是還是出現(xiàn)了錯(cuò)誤!再用命令$ ./configure withnogui依然還是出現(xiàn)錯(cuò)誤!確定此版本的Linux操作系統(tǒng)附帶文件可能存在一定問(wèn)題,所以安裝了另外一個(gè)CentOS 。$ cd $ ./configure$ cd $ make$ cd $ make install之后出現(xiàn)了make[1]: *** [allrecursive]3. PC機(jī)與虛擬機(jī)數(shù)據(jù)交換的問(wèn)題。最初的想法是在虛擬機(jī)掛載U盤(pán),并上網(wǎng)下載了不少資料,但以失敗告終。雖然后來(lái)具體實(shí)施時(shí)也有點(diǎn)小波折,但最終也解決了該難題。之前學(xué)習(xí)到的都是課本上概念性的東西,當(dāng)要自己做一個(gè)東西的時(shí)候就覺(jué)得不知從何下手了,看老師給的PPT講解Geekos內(nèi)核、bochs安裝、make的工作原理、makefile的使用等,也還是不怎么清楚。后來(lái)上機(jī)實(shí)驗(yàn)時(shí),有研究生學(xué)長(zhǎng)帶我們,通過(guò)他的操作和解釋?zhuān)斫饬诉@個(gè)課設(shè)如何去做,也了解了一些具體步驟如何進(jìn)行。最后,看了很久的課本,把一些基本的函數(shù)搞清楚了,程序運(yùn)行的過(guò)程感覺(jué)明了許多。通過(guò)這次操作系統(tǒng)課程設(shè)計(jì),我逐步了解了Liunx操作系統(tǒng)的使用,以及GeekOS編譯環(huán)境和運(yùn)行環(huán)境,了解計(jì)算機(jī)系統(tǒng)的啟動(dòng)原理,熟悉可執(zhí)行鏈接文件(ELF文件)的結(jié)構(gòu),并學(xué)會(huì)加載和運(yùn)行可執(zhí)行文件,如何安裝和使用bochs,make工具的使用如果沒(méi)有經(jīng)過(guò)實(shí)踐的話,課本上的概念過(guò)一段時(shí)間就忘記了,但是有了課程設(shè)計(jì),這些知識(shí)便能
點(diǎn)擊復(fù)制文檔內(nèi)容
法律信息相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1