Exercise 3.2and 3.6 Version 0 |
|
👤 Author: by hsq2013329700004 2015-09-27 21:16:23 |
3.2
Answer:When a context switch occours,the kernel saves the context of the old process in its PCB and loads the saved context of the new process scheduled to run.
3.6
Answer:
#include
#include
#include
#include
int main(int argc, char* argv[]){
pid_t pid;
int i,m;
int f0,f1,f2;
f0=0;
f1=1;
scanf("%d",&m);
if(m<0){
fprintf(stderr,"request a nun-negative numbe