[SOLVED] CSC139- Homework 2: OS Principles

30.00 $

Category:

Description

Rate this product

   General rules: Create homework, compose specifications using a common document-creation tool, such as Microsoft® Word.

Hints: Refer to the wwweb or lecture notes for this class to answer the questions below. Be concise, complete, and precise.

  1. Charactrize high-level the Solaris OS State some key advantages of its design.
  2. Write a concise, complete English description of the C/C++ function system(). Be thorough.
  3. Write a concise English language description of the C/C++ function fflush().
  4. Write a concise, complete English language description of the OS command Be thorough but write only few lines of printed text. Also try WHOAMI on MS Windows; describe and document what you observe.
  5. Write C++ program system1 that calls library function “system()”. Issue 3 distinct calls to system(), each with a single argument: “ls”, “pwd”, and “whoami”. Show the source and all generated outputs. Describe briefly what you observe.
  6. Write C or C++ program system2 that reads OS commands via command line parameters, and then executes them. The command line parameters must be legal Unix/Linux commands. Print the number of commands entered. To prepare, read about argc, argv, and envp. Focus is only argc and argv. A sample execution by fictitious user “herb$” is:

herb$ ./a.out pwd ls whoami

argc = 4

 

argv[1] = pwd

Executing command ‘pwd’

/Users/herbertmayer

 

argv[2] = ls

Executing command ‘ls’

Applications    Downloads      Music         familie      test1

Contacts        Favorites      Pictures      herb         test1.c

Desktop         Library       Public        pix_low_2020 test2

Documents       Movies        a.out         test.c       test2.c

argv[3] = whoami

Executing command ‘whoami’

herbertmayer

  1. What is an Operating System (OS)? What is it used for? What are the goals of an OS?
  2. What are 5 key functions and responsibilities of an OS? List, name, and describe them.
  3. OS commands can be visual or purely textual, or completely graphical. Explain pros and cons. Name a sample OS for both types.
  4. What is the meaning of Information Hiding? How is this related to OS? State your assessment, regarding OS design.
  5. Briefly contrast ages, origins, uses of: MS-DOS, Unix BSD, Linux
  6. Name and briefly outline some ideal, high-level OS design goals.