Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider using a word processor. If you were writing high-level code for reading and writing a file, what system calls would you expect? Use C-like

Consider using a word processor. If you were writing high-level code for reading and writing a file, what system calls would you expect? Use C-like pseudocode to structure your answer for in terms of two functions: readFile and saveFile. Hint for pseudocode outline: Use a temp file/variable to buffer the contents of a file. In readFile, read a File to the temp file (can use a global variable), so user can read and then edit. When user saves the temp file, it will be written back to the file. (Slide 10 may help.)image text in transcribed

SYSTEM CALLS source file destination file .A SYstem call is a call that invokes some loW level subroutine that likely requires a high level of privilege such that the OS alone offers Example System Call Sequence Acquire input file name Write prompt to screen its service Accept input Acquire output file name Write prompt to screen Consider an example program that makes a Accept input copy of a file. How many system level calls are Open the input file needed? if file doesn't exist, abort Create output file if file exists, abort Loop "Fetch Parameters: read fllename, display message Open: open flles, checks errors (display, Read from input file terminate) Copy: read from src, write to dest Close: close lles, display message, terminate Write to output file Until read fails Close output file Write completion message to screen Terminate normally 10 Image from Operatin tem Concepts

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

Deductive And Object Oriented Databases Second International Conference Dood 91 Munich Germany December 18 1991 Proceedings Lncs 566

Authors: Claude Delobel ,Michael Kifer ,Yoshifumi Masunaga

1st Edition

3540550151, 978-3540550150

More Books

Students also viewed these Databases questions

Question

What are the historical roots of data visualization?

Answered: 1 week ago