联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codehelp

您当前位置:首页 >> Java程序Java程序

日期:2020-12-21 08:39

CSCI-UA.0201-001
Computer Systems Organization
Final Exam Part 2
Practice

Answer the following questions.
a)What is the difference between a process and a program?
b)What is the difference between a EXECVE and fork?

c)Describe the benefits of SegList dynamic memory allocation.

TLB , Cache Questions from Exam 3 and Project 4.
1.Given the Attachment showing Cache contents, what is the byte accessed for this VPN
2.What VPN would be needed to access a particular byte?

Cache Sizing
3. Determine how many bits are needed for each section of the address parsed in terms of the Tag, Set Index and byte offset. The system information is:
? 32 bit address
? 64K cache
? 4 Way set associative caching
? 64-byte blocks
Your answer should state the number of bits for the Tag, Set Index and Byte offset

4.Given the following:

An instruction accessing cache takes 3 cycles .
Moving data from Main memory to cache takes 40 cycles.
Assume the cache miss rate is 20%.
Assume 1/4 of operations access memory. Those operations not accessing memory take 1 cycle.
What is the total number of cycles needed to process 1000 operations?

Processes
5. What changes would be needed to ProcessPractice and or ForkExcePractice to end the program when a -1 in the input?

6.What changes would be needed to ProcessPractice and ForkExcePractice to have the ProcessPractice signal back to ForkExecPractice that 2 resets are not allowed. ForkExePractice would respond by stating 2 resets are not allowed and end. Note that getppid returns the pid of the parent.
FORKS
Question type

pid_t pid;
int child_status;
int i;
pid = fork();
if (pid == 0) {
pid = fork();
if (pid > 0) {
printf("1-" );
exit(0);
}
} else {
printf("2-" );
exit(0);
}
wait(&child_status);
printf("3-" );
return 0;
List 3 possible outputs for this execution.
OR what are all possible outcomes.

版权所有:留学生程序辅导网 2019 All Rights Reserved 联系方式:QQ:99515681 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。