Giter Site home page Giter Site logo

my_ostep_code's Introduction

OS第三次作业

Q1

当用户进行系统调用陷入内核态的时候,特权级别发生变化,因此也需要切换堆栈,内核空间使用的就是内核栈.

Q2

fork()exec()进行分离,能够在创建子进程之后、运行子进程程序之前运行其他代码,从而能够灵活地进行设置,改变子进程程序的运行环境。wait()函数则提供了在进程运行顺序不确定的情况下,保证子进程优先运行的一种方法。

Q3

第一题

父进程与子进程的变量相互独立.

第三题

使用pipe进行进程间通信.

第五题

wait()函数返回子进程pid.如果错误返回(pid_t)-1.

如果一个进程没有子进程,那么wait()返回-1,并且errno设为ECHILD.

第七题

子进程不会产生任何输出。

my_ostep_code's People

Contributors

lin-xs avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.