1. Homepage
  2. Writing
  3. CS480 Operating Systems - Assignment 02 Free Response Questions
This question has been solved

CS480 Operating Systems - Assignment 02 Free Response Questions

Get in Touch with Our Experts
SDSUCS480Operating SystemsL1 CacheScheduler

Assignment 02 Free Response Questions Assignment Writing Service


Assignment Writing Service

Turning into Gradescope Assignment Writing Service

Submit ONE PDF file with your answers in the order of the questions. Make sure the file contains your name and Red ID at the beginning! Assignment Writing Service

Make sure to include the single examinee affidavit (refer to SingleExamineeAffidavit_NonProgrammingAssignment.docx in Canvas) at the beginning of your answer sheet. You must work on your own for this part. It would be a red flag if we find submissions from two students are with highly similar answers in multiple parts. Also as specifically mentioned in the Syllabus, posting questions to online platforms, and asking for help are considered plagiarism. Answers from online sources will be investigated during grading, particularly the AI chatbot platforms such as chatgpt, gemini, etc. Assignment Writing Service

SINGLE EXAMINEE AFFIDAVIT Assignment Writing Service

“I, the undersigned, promise that this assignment submission is my own work. I recognize that should this not be the case; I will be subject to plagiarism penalties as outlined in the course syllabus.” Assignment Writing Service

Student Name: __________________ RED ID: __________________ Date: __________________ Assignment Writing Service

Part I Questions (60 points) Each question is worth 10 points. Assignment Writing Service

  1. A run-time profiling tool shows that a machine with more CPU cores often has better cache hit rate (i.e., more effective caching) than the one with less CPU cores, this is particularly true when running many applications concurrently: Assignment Writing Service

    1. Explain why. Hint: consider the principles behind the caching mechanism and how context switches for concurrent executions could affect caching. Assignment Writing Service

    2. Suppose the CPU cores have L1 cache per core, using a cache write through policy, can cache incoherency happen in the L1 cache, and why? Assignment Writing Service

  2. Based on what was discussed in the class about the detailed steps in interrupt handling and system call execution, what are the similarities between handling an interrupt from a mouse click and handling a system call to read data from a persistent storage. Assignment Writing Service

  3. A user program executes the following C code in a Linux virtual machine that runs on top of a type I hypervisor. Based on what was discussed in the class, describe how the code execution is carried out in detail by the VM user, VM kernel, hypervisor and hardware, particularly how the run-time conditions are handled (if there are any) between them. Hint: consider how the software interrupts (run time exceptions and system calls if there are any) are handled in a virtualized environment. Watch the lecture recording where we discussed the details of those scenarios. Assignment Writing Service

    void *workerthread(void *arg) { Assignment Writing Service

    char* message = (char *) arg; Assignment Writing Service

    return NULL; } Assignment Writing Service

    int main() {
    pthread_t thread_id; int *recordRes;
    Assignment Writing Service

    char message[] = "Learning OS is awesome"; Assignment Writing Service

    int result = pthread_create(&thread_id, NULL, &workerthread, (void*) message); Assignment Writing Service

    printf(“%s”, message); Assignment Writing Service

    *recordRes = result; } Assignment Writing Service

  1. In a 32-bit system, the following function is invoked: Assignment Writing Service

    int countBitMasks(int level, unsigned int *masks) Assignment Writing Service

    where level is an integer with a value of 5, mask is a 32-bit unsigned integer pointer Assignment Writing Service

    pointing at a memory address of 0xAC27, and the return value is an integer. Assume: Assignment Writing Service

    1. Each integer or pointer occupies 4 bytes, i.e., 32 bits. Assignment Writing Service

    2. The stack is used for passing data between the caller and callee, and right before Assignment Writing Service

      invoking the function, the $SP register has a value of 0x7004. Assignment Writing Service

    3. The calling convention pushes the arguments to stack in reverse order, and the Assignment Writing Service

      caller reserves the space for the return value on the stack after pushing the return Assignment Writing Service

      address to the stack. Assignment Writing Service

    4. The very next instruction in the caller after the function invocation is at address Assignment Writing Service

      0x103D. Assignment Writing Service

    Based on the steps we discussed in the class for invoking a function call, show a table (or diagram) for the stack content from the current top of the stack right before the execution is transitioned to the countBitMasks function. Make sure to specify the address and value of each item on the stack, if the value is unknown, put unknown there. (Note the stack grows to the lower address space.) Assignment Writing Service

  2. In a uniprocessor system, processes P0, P1, P2 are admitted for scheduling at the same time in that order, each process has a series of alternating CPU bursts and I/O bursts as follows: Assignment Writing Service

    P0: 3ms (CPU), 5ms (I/O), 6ms (CPU)
    P1: 4ms (CPU), 7ms (I/O), 3ms (CPU), 1ms (I/O), 6ms (CPU) P2: 5ms (CPU), 2ms (I/O), 3ms (CPU)
    Assignment Writing Service

    Show your steps to find the turnaround (completion) and wait times of all processes using the Round Robin scheduling algorithm with a time quantum of 3ms. Assignment Writing Service

    For simplicity, assume context switch time and other overheads are comparatively negligible. Note: Assignment Writing Service

o During the CPU burst (execution) of a process, all blocked processes due to I/O Assignment Writing Service

would be executing their respective current I/O burst at the same time. Assignment Writing Service

You must show your steps by using the notation p (e, s, r) system below to track CPU execution of a process over the time: Assignment Writing Service

e - total CPU burst time that has been executed for a particular process,
s - total system time passed from the beginning of executing first process,
r - the reason why the process is stopped along the execution (either suspended or completed) due to:
Assignment Writing Service

Assignment Writing Service

  • i - process initiated an I/O, Assignment Writing Service

  • c - process completed execution Assignment Writing Service

  • t - time quantum expired during RR Assignment Writing Service

  • For example: P0(10, 16, i) means total CPU burst time that has been Assignment Writing Service

    executed for process P0 is 10ms, total system time passed is 16ms since the start of system executing, and process P0 is suspended due to entering an I/O burst. P1(5, 18, t) means total CPU burst time that has been executed for process P1 is 5ms, total system time passed is 18ms since the start of system executing, and process P1 is suspended due to quantum expiring before finishing the current CPU burst. Assignment Writing Service

    Summarize your results for turnaround and wait times (after the completion of scheduling) in the following table: Assignment Writing Service

Turnaround Time RR Assignment Writing Service

P0
P1
P2 Average
Assignment Writing Service

6. A non-preemptive scheduler is scheduling a system with 8 processes. The CPU has two cores executing processes P3 and P7. P12 and P27 (first in the queue) are ready to be executed. P8 (first in the queue) and P45 are waiting for input from the keyboard. P32 (first in the queue) and P6 are waiting to finish sending data over network. Assignment Writing Service

  1. Show a scheduling queueing diagram for these processes (use a separate queue for each type of I/O). Assignment Writing Service

  2. Assuming P3 is finishing its current CPU burst in 2ms and then will wait for keyboard input, and P32 is finishing its current network I/O burst in 2ms. When P3 completes the current CPU burst, draw arrows of where the processes would go for those who change queues. Label each process with its process state. Assignment Writing Service

联系辅导老师!
私密保护
WeChat 微信
SDSU代写,CS480代写,Operating Systems代写,L1 Cache代写,Scheduler代写,SDSU代编,CS480代编,Operating Systems代编,L1 Cache代编,Scheduler代编,SDSU代考,CS480代考,Operating Systems代考,L1 Cache代考,Scheduler代考,SDSU代做,CS480代做,Operating Systems代做,L1 Cache代做,Scheduler代做,SDSUhelp,CS480help,Operating Systemshelp,L1 Cachehelp,Schedulerhelp,SDSU作业代写,CS480作业代写,Operating Systems作业代写,L1 Cache作业代写,Scheduler作业代写,SDSU编程代写,CS480编程代写,Operating Systems编程代写,L1 Cache编程代写,Scheduler编程代写,SDSU作业答案,CS480作业答案,Operating Systems作业答案,L1 Cache作业答案,Scheduler作业答案,