2014-05-11 05:55

题目链接

原题:

difference between thread and process.

题目:请描述进程和线程的区别。

解法:操作系统理论题。标准答案在恐龙书上,我自己回忆了一点。我想就算是面试官也不会一字一句地要求你背书的,对于要点掌握住就可以了。

代码:

 // http://www.careercup.com/question?id=5718181884723200
Answer:
Process:
. Basic element of resource allocation in the operating system.
. Possesses independent resources:
a. code segment
b. data segment
i. constant data
ii. global variable
iii. stack
iv. heap
c. register
d. program counter
. Have independent virtual address mapping.
. It has life cycle, it is running, in contrast to a program.
Thread:
. Basic element of CPU scheduling.
. Possesses part of independent resources:
a. register
b. stack
c. program counter
. Multiple threads share part of resources in same process:
a. code segment
b. data segment
i. constant data
ii. global variable
iii. heap
. All threads in a process share the same address space.
. It has life cycle

Careercup - Microsoft面试题 - 5718181884723200的更多相关文章

  1. Careercup - Microsoft面试题 - 6314866323226624

    2014-05-11 05:29 题目链接 原题: Design remote controller for me. 题目:设计一个遥控器. 解法:遥控什么?什么遥控?传统的红外线信号吗?我只能随便说 ...

  2. Careercup - Microsoft面试题 - 6366101810184192

    2014-05-10 22:30 题目链接 原题: Design database locks to allow r/w concurrency and data consistency. 题目:设计 ...

  3. Careercup - Microsoft面试题 - 24308662

    2014-05-12 07:31 题目链接 原题: I have heard this question many times in microsoft interviews. Given two a ...

  4. Careercup - Microsoft面试题 - 5700293077499904

    2014-05-12 00:02 题目链接 原题: For a given map (ie Bing map) given longitude/latitude/ how would you desi ...

  5. Careercup - Microsoft面试题 - 5204967652589568

    2014-05-11 23:57 题目链接 原题: identical balls. one ball measurements ........ dead easy. 题目:9个看起来一样的球,其中 ...

  6. Careercup - Microsoft面试题 - 5175246478901248

    2014-05-11 23:52 题目链接 原题: design an alarm clock for a deaf person. 题目:为聋人设计闹钟? 解法:聋人听不见,那么闪光.震动都可行.睡 ...

  7. Careercup - Microsoft面试题 - 5173689888800768

    2014-05-11 05:21 题目链接 原题: Complexity of a function: int func_fibonacci ( int n) { ) { return n; } el ...

  8. Careercup - Microsoft面试题 - 6282862240202752

    2014-05-11 03:56 题目链接 原题: Given an integer array. Perform circular right shift by n. Give the best s ...

  9. Careercup - Microsoft面试题 - 5428361417457664

    2014-05-11 03:37 题目链接 原题: You have three jars filled with candies. One jar is filled with banana can ...

随机推荐

  1. CentOS6.5下挂载NTFS格式的文件系统

    下载对应CentOS版本的rpmforge,下载地址:http://pkgs.repoforge.org/rpmforge-release/ 安装rpmforge,输入命令:# rpm -ivh rp ...

  2. .NET中 使用数组的注意事项

    1.初始值问题 对于int.double.float等一些值类型数组,没有赋值的情况下, 默认值是0: 而对于String 等引用类型,初始值为null. 2.IndexOutOfRangeExcep ...

  3. ctags对部分目录生成tags

    最近在研究Tiny6410上的uboot移植,看uboot源码时,生成tags文件用的是最粗暴的方法:“ctags -R *”,由于某些函数在各个平台下都有实现,导致在用“g+]”跳转到该函数的定义时 ...

  4. vim编辑器编程配置

    打开/etc/vim/vimrc 添加命令: set cindent  "使用C样式的缩进 syntax on   "语法高亮 set tabstop=4 set softtabs ...

  5. VMware vSphere Client的简单使用教程

    1.首先登陆进去ESXI管理   实验VMware VS6.0版本 2新建虚拟机 确认信息 点击完成 2.开启虚拟机 右键打开控制台 加载光驱 选择虚拟机 Ctrl+Alt+delete重启 安装 来 ...

  6. Send User to a Portal Folder

    Sometimes you would want to give users the option to click a button on the page and send them back t ...

  7. foreach 和 list.foreach 初步测试

    单纯从速度上讲 小数据量下foreach 较快,list.Foreach 由于 public void ForEach(Action<T> action) { ; i <this._ ...

  8. 错记-checkbox radio

    很多时候我想会用到浏览器默认的单选按钮或者复选框,比如说偷懒的时候或者心情不好的时候╮(╯﹏╰)╭, 在html结构里我想实现点击文字旁边的单选按钮就跟着选中或反之,像这样:

  9. php验证手机号码

    大家都应该有这个常识,中国的手机号码都是以数字“1”开头,然后利用“0~9”10个数字组成的11位数字组合,那么我们的验证规则肯定要根据这个思路来写. 根据上面的简单思路,我们便可以写下以下的验证代码 ...

  10. java android 中的Toast

    package com.example.my1; import android.os.Bundle;import android.app.Activity;import android.content ...