Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Explain why an operating system can be viewed as a resource allocator. (10 points) Direct memory access is used for high-speed IO devices in
1. Explain why an operating system can be viewed as a resource allocator. (10 points) Direct memory access is used for high-speed IO devices in order to avoid increasing the CPU's execution load. (10 points) 2. a) How does the CPU interface with the device to coordinate the transfer? b) How does the CPU know when the memory operations are complete? c The CPU is allowed to execute other programs while the DMA controller is transferring data. Does this process interfere with the execution of the user programs? If so, describe what forms of interference are caused. 3. Describe the operating system's two modes of operation. (5 points) 4. Write a C program that counts the number of non white-space characters in an input text file. Program takes as command argument(s) the name of the input file (and the output file with option -f). Based on the option flags, it displays the output on the standard output, or writes the output to an output file. (25 points) The command format is as follows: command f inputfile outputfile or, commands inputfile -f indicates writing to an output file; -s indicates displaying the output on the screen. Also notice the errors caused by incomplete arguments. Be sure to document your program. Documentation should include: (1) The name of the author of the program (your name) and the date it was written, (2) a concise description of what the program does, (3) a clear description of its limitations if it does not meet all specifications, and (4) comments of critical code and data declarations. The same should also be done for each function written in the program. You'll lose some points if the above documentation is missin
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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