合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

        代做Operating Systems 、代寫C++程序語(yǔ)言
        代做Operating Systems 、代寫C++程序語(yǔ)言

        時(shí)間:2025-02-15  來(lái)源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)



        Operating Systems - 

        New York University

        Tandon School of Engineering

        Department of Computer Science and Engineering

        Introduction to Operating Systems

        Spring 2025


        Assignment 3

        (10 points)


        Develop a simple Linux kernel module that runs on your virtual machine. The only functionality required of your

        module is to be able to load and unload, printing a debug message while doing so.

        When a Linux kernel module is loaded, it invokes an init function, and when it is removed (or unloaded), it

        invokes an exit function.

        A) (0 points) Read chapter 2 of the freely available O’Reilly book “Linux Device Drivers, 3

        rd

        Edition”

        (https://lwn.net/Kernel/LDD3/), in particular p.16, as well as your text book p.96 to get you started. Note that

        even though the LDD3 book is written for kernel version 2.6, most mechanisms are applicable with minor or

        no changes. The relevant example code is copied below as a starting point.

        #include

        #include

        MODULE_LICENSE("Dual BSD/GPL");

        static int hello_init(void)

        {

        printk(KERN_ALERT "Hello, world\n");

        return 0;

        }

        static void hello_exit(void)

        {

        printk(KERN_ALERT "Goodbye, cruel world\n");

        }

        module_init(hello_init);

        module_exit(hello_exit);

        The hello_init() function is invoked when you insert your module (using the insmod shell command),

        whereas the hello_exit() is called when you unload your module (using the rmmod shell command).

        B) (0 points) Read the description of the global kernel variable jiffies and the macro HZ in the O’Reilly book

        (search in the searchable pdf). Then read about the ktime_get_boottime() routine in

        https://www.kernel.org/doc/html/latest/core-api/timekeeping.html


        C) (0 points) You may need to install the kernel headers if not already installed. Type:


        sudo apt-get install linux-headers-$(uname -r)


        D) (10 points) Modify the c code given above (which becomes your lab3.c) such that:

        1) The init function prints the tick time in milliseconds (i.e. the timer interval, as we defined it in weeks 1/2)

        after the hello message.

        The init function shall also save the value of jiffies and the current time.

        Operating Systems - Prof. Omar Mansour

        2) The exit function prints a goodbye message and the time in milliseconds between the insertion and

        removal of the module i.e. between init and exit functions) using two different methods:

        a. Using the difference in the value of jiffies from inserting the module to removing the module.

        b. Using the time difference obtained by reading the timer (Hint: use ktime_get_boottime().

        You shall use the Makefile provided with the assignment (In some cases, you may need to slightly modify the

        Makefile provided to suit your setup). You should place it in the same directory as your .c file (lab3.c)

        Hints:

        E) Your module should use printk() to print messages. You will use this print facility to also debug your

        code if needed ( ). More information may be found on https://www.kernel.org/doc/html/latest/core-

        api/printk-basics.html

        F) Use dmesg shell command to view messages printed by printk(), e.g. type:

        dmesg

        You may clear the log using:

        dmesg -C

        What to submit to gradescope:

        Please submit the following files individually:

        1) Source file(s) with appropriate comments.

        The naming should be similar to “lab#_$.c” (# is replaced with the assignment number and $ with the

        question number within the assignment, e.g. lab4_b.c, for lab 4, question b OR lab5_1a for lab 5, question

        1a).

        2) A single pdf file (for images + report/answers to questions), named “lab#.pdf” (# is replaced by the

        assignment number), containing:

         Screen shot(s) of your terminal window showing the current directory, the command used to

        compile your program, the command used to run your program and the output of your program.

        3) Your Makefile, if any. This is applicable only to kernel modules.


        RULES:

         You shall use kernel version 4.x.x or above. You shall not use kernel version 3.x.x.

         You may consult with other students about GENERAL concepts or methods but copying code (or code

        fragments) or algorithms is NOT ALLOWED and is considered cheating (whether copied form other

        students, the internet or any other source).

         If you are having trouble, please ask your teaching assistant for help.

         You must submit your assignment prior to the deadline.

        請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp




         

        掃一掃在手機(jī)打開當(dāng)前頁(yè)
      1. 上一篇:代做COP 3402、代寫Python/c++語(yǔ)言程序
      2. 下一篇:代寫COMP S311、代做Java編程語(yǔ)言
      3. 無(wú)相關(guān)信息
        合肥生活資訊

        合肥圖文信息
        急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
        急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
        出評(píng) 開團(tuán)工具
        出評(píng) 開團(tuán)工具
        挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
        挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
        海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
        海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
        合肥機(jī)場(chǎng)巴士4號(hào)線
        合肥機(jī)場(chǎng)巴士4號(hào)線
        合肥機(jī)場(chǎng)巴士3號(hào)線
        合肥機(jī)場(chǎng)巴士3號(hào)線
        合肥機(jī)場(chǎng)巴士2號(hào)線
        合肥機(jī)場(chǎng)巴士2號(hào)線
        合肥機(jī)場(chǎng)巴士1號(hào)線
        合肥機(jī)場(chǎng)巴士1號(hào)線
      4. 短信驗(yàn)證碼 酒店vi設(shè)計(jì) deepseek 幣安下載 AI生圖 AI寫作 aippt AI生成PPT 阿里商辦

        關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

        Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
        ICP備06013414號(hào)-3 公安備 42010502001045

        主站蜘蛛池模板: 成人无码AV一区二区| 免费萌白酱国产一区二区三区| 久久精品免费一区二区| 一区二区三区在线观看| 国产aⅴ一区二区三区| 无码精品久久一区二区三区 | 日韩经典精品无码一区| 国产在线观看一区精品| 国产一区二区好的精华液 | 国产日韩精品一区二区三区在线 | 国产精品日韩欧美一区二区三区| 国产在线一区视频| 在线观看一区二区精品视频| 国产视频一区二区在线播放| 国产成人精品无人区一区 | AV怡红院一区二区三区| 国产在线一区二区三区av| 国产微拍精品一区二区| 无码国产精品一区二区免费| 91精品国产一区| 亚洲综合在线成人一区| 极品人妻少妇一区二区三区 | 无码人妻一区二区三区免费手机 | 国产日韩精品一区二区三区| 香蕉久久ac一区二区三区| 日本精品3d动漫一区二区| 日美欧韩一区二去三区| 日韩精品无码Av一区二区| 日韩经典精品无码一区| 亚洲国产一区二区视频网站| 国产午夜精品一区理论片飘花| 亚洲国产成人一区二区精品区| 日韩精品无码一区二区中文字幕 | 国产无吗一区二区三区在线欢 | 韩国资源视频一区二区三区| 无码人妻久久一区二区三区蜜桃| 国精产品一区一区三区免费视频| 国产日韩AV免费无码一区二区 | 久久久久人妻一区二区三区| 亚洲一区二区三区91| 久久精品无码一区二区日韩AV|