Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedPAGE 31 LECTURE 5image text in transcribed

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. return

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions