上海交通大学试卷(A卷) (2012至2013学年第2_学期) 班级号 学号 姓名 课程名称Operating System 成绩 Part I:Filling the blanks(20%) 1.A computer system can be divided roughly into four components: and 2.Java applications are typically compiled to (class file)that can run on any JVM regardless of computer architecture. 3.Analyze the following program: #include <sys/types.h> #include <stdio.h> #include <unistd.h> int value 12; int mainO { pid t pid; pid forkO; if (pid ==0){ value +=20; else if (pid >0){ wait(NULL); printf(“PARENT:value=%d”,value);LINE A*/ exit(O); The output of value at LINE A is 4.A socket is defined as an endpoint for communication.A socket is identified by an concatenated with a A卷总8_页第_1页A 卷 总 8 页 第 1 页 Part I: Filling the blanks ( 20%) 1. A computer system can be divided roughly into four components: _______________, ______________, _______________ and _______________. 2. Java applications are typically compiled to _______________ (class file) that can run on any JVM regardless of computer architecture. 3. Analyze the following program: #include <sys/types.h> #include <stdio.h> #include <unistd.h> int value = 12; int main() { pid_t pid; pid = fork(); if (pid ==0) { value +=20; } else if (pid > 0) { wait(NULL); printf(“PARENT: value = %d”, value); /* LINE A*/ exit(0); } } The output of value at LINE A is _______________. 4. A socket is defined as an endpoint for communication. A socket is identified by an _____________________ concatenated with a _____________________. 上 海 交 通 大 学 试 卷( A 卷) ( 2012 至 2013 学年 第_2__学期 ) 班级号_______________________ 学号______________ 姓名 课程名称 Operating System 成绩