Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PAGE 31 LECTURE 5 23. Write the steps in a system call to read a byte from the keyboard. Refer to page 31 of Lecture
PAGE 31 LECTURE 5
23. Write the steps in a system call to read a byte from the keyboard. Refer to page 31 of Lecture 05 as a starting point. However, note that this will require more steps because the user may not type anything in the keyboard immediately. What is the state of the process while it is waiting for the keyboard input? How does it come back to the CPU? Discuss with the help of Process State Diagram. (b) Now repeat the above when the user presses Ctrl+C from the keyboard without providing a valid input? How does this process navigate the process state diagram? System Calls Kernel User Program foo () { open ("test", "rw"); open_handler (argi, arg2) { //do operation (3) (4) Kernel Stub User Stub open (argi, arg2) { push SYSOPEN - trap return. - open_handler_stub () { //copy args from user memory //check args open_handler (argi, arg2) //copy return value to user nem. return 23. Write the steps in a system call to read a byte from the keyboard. Refer to page 31 of Lecture 05 as a starting point. However, note that this will require more steps because the user may not type anything in the keyboard immediately. What is the state of the process while it is waiting for the keyboard input? How does it come back to the CPU? Discuss with the help of Process State Diagram. (b) Now repeat the above when the user presses Ctrl+C from the keyboard without providing a valid input? How does this process navigate the process state diagram? System Calls Kernel User Program foo () { open ("test", "rw"); open_handler (argi, arg2) { //do operation (3) (4) Kernel Stub User Stub open (argi, arg2) { push SYSOPEN - trap return. - open_handler_stub () { //copy args from user memory //check args open_handler (argi, arg2) //copy return value to user nem. returnStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started