exam 2 pc o.s

¡Supera tus tareas y exámenes ahora con Quizwiz!

ESSAY QUESTION There are two different ways that commands can be processed by a command interpreter. One way is to allow the command interpreter to contain the code needed to execute the command. The other way is to implement the commands through system programs. Compare and contrast the two approaches.

IN The 1st approach upon the user issuing a command, interpreter jumps to the appropriate section of code, execute the command, and returns control back to user. (ADV: Speed & simplicity; DISADV: New command require rewriting the interpreter program, which can get messy, complicated, & large) in 2nd approach, the interpreter loads the appropriate program into memory along with the appropriate agruement. (adv: new commands can be added w/o altering command interpreter; disadv: reduced speed & passing of parameters from interpreter to system programs.)

ESSAY QUESTION Describe the relationship between an API, the system-call interface, and the operating system.

SYSTEM CALL: serves as link to system calls made available by O.S, the interface intercepts function calls in the API and invokes the necessary system call within the O.S. most of the details of the O.S Interface are hidden from the programmer by the API and managed by the run-time support library

ESSAY QUESTION What is a system call?

Software-triggered interrupt allow- ing a process to request a kernel service.

T or F Mac OS X is a hybrid system consisting of both the Mach microkernel and BSD UNIX.

TRUE

True/False Questions Application programmers typically use an API rather than directory invoking system calls.

TRUE

True/False Questions In general, Windows system calls have longer, more descriptive names and UNIX system calls use shorter, less descriptive names.

TRUE

True/False Questions Many operating system merge I/O devices and files into a combined file because of the similarity of system calls for each.

TRUE

True/False Questions One important principle is the separation of policy from mechanism.

TRUE

True/False Questions iOS and Android combine different structures, resulting in hybrid systems that address performance, security, and usability issues

TRUE

ESSAY QUESTION Describe how Android uses a unique virtual machine for running Java programs.

android runtime (ART) virtual machine is designed specifically for androids and has been optimized for mobile devices w/ limited memory and CPU processing capabilities.

ESSAY QUESTION Describe how Mac OS X is considered a hybrid system.

bc kernel environment is blend of MACH microkernel and BSD unix

ESSAY QUESTION Describe Operating System structure services

common services offered by the O.S for the user and programmers to execute programs.

ESSAY QUESTION Explain why a modular kernel may be the best of the current operating system design techniques.

it combines the benefits of both the layered and microkernel design techniques. in this design the kernel needs only to have the capability to perform the required functions and know how to communicate between modulars.. if more functionality is required in the kernel the user can dynamically load modules into the kernel. the kernel can have sections w/ web-defined, protected interfaces a desirable property found in layered systems. more flexibility can be achieved by allowing the modules to communicate w/ one another

ESSAY QUESTION What kernel data structure can be used for one technique of passing parameters to system calls

stack

ESSAY QUESTION What are the two basic goal groups that must be considered when designing an operating system?

user and system goal groups.

What is the difference between policy and mechanism?

-Mechanisms determine how to do something; -policies determine what will be done.

ESSAY QUESTION What are the advantages of using a higher-level language to implement an operating system?

-code can be written faster more compact easier to understand and debug. -improvements in compiler technology will improve the generated code for the entire O.S by simple recompilation. -O.S will be made easier to move to some other hardware

ESSAY QUESTION Describe three general methods used to pass parameters to the operating system during system calls.

-pass parameters in registers -parameters stored in block, table, of memory and address of blocks are stored in registers -placed or pushed onto the stack by the program and popped off the stack by the O.S

ESSAY QUESTION What is an API?

A set of commands, functions, and other tools that can be used by a programmer in developing a program. application program A program designed for end-user execution, such as a word processor, spreadsheet, compiler, or Web browser.

31. _____ is/are not a technique for passing parameters from an application to a system call. A) Cache memory B) Registers C) Stack D) Special block in memory

A) Cache memory

12. The close() system call in UNIX is used to close a file. What is the equivalent system call in Windows? A) CloseHandle() B) close() C) CloseFile() D) Exit()

A) CloseHandle()

2. Which of the following is an inter-process communication that requires two processes share memory? A) message passing B) shared memory C) socket communication D) all of the above

A) MESSAGE PASSING

10. Which of the following defines the view of the operating system seen by most users? A) application and system programs B) system calls C) device drivers D) library calls

A) application and system programs

26. The major difficulty in designing a layered operating system approach is ____. A) appropriately defining the various layers B) making sure that each layer hides certain data structures, hardware, and operations from higher-level layers C) debugging a particular layer D) making sure each layer is easily converted to modules

A) appropriately defining the various layers

24. Which of the following is the correct program type for GRUB in Linux and Unix systems? A) bootstrap program B) compiler program C) binder program D) system utility

A) bootstrap program

33. A _____ is an example of a systems program. A) command interpreter B) Web browser C) text formatter D) database system

A) command interpreter

25. When a process fails, the operating system takes a ________ which can then be probed by a debugger for failure analysis? A) core dump B) crash dump C) capture of network statistic information D) capture of CPU usage information

A) core dump

15. A message-passing model is ____. A) easier to implement than a shared memory model for intercomputer communication B) faster than the shared memory model C) a network protocol, and does not apply to operating systems D) only useful for small simple operating systems

A) easier to implement than a shared memory model for intercomputer communication

17. Android runs Java programs _____________ A) in the Android RunTime (ART) virtual machine. B) natively. C) in the Java virtual machine. D) Android does not run Java programs.

A) in the Android RunTime (ART) virtual machine.

16. Microkernels use _____ for communication. A) message passing B) shared memory C) system calls D) virtualization

A) message passing

20. Which of the following inter-process communication is used in microkernel? A) message passing B) shared memory C) socket communication D) all of the above

A) message passing

19. Which of the following operating system structure is the one for MS-DOS? A) monolithic structure B) layered structure C) microkernel D) modular approach

A) monolithic structure

9. What category of system call includes the ones for process creation of and termination? A) process control B) file management C) device management D) protection

A) process control

4. Which of the following is a user interface where human fingers slide across the screen or press buttons to select choices? A) touch screen B) graphical user interface C) command line D) voice control

A) touch screen

28 A boot block ____. A) typically only knows the location and length of the rest of the bootstrap program B) typically is sophisticated enough to load the operating system and begin its execution C) is composed of multiple disk blocks D) is composed of multiple disk cylinders

A) typically only knows the location and length of the rest of the bootstrap program

30. _____ allow operating system services to be loaded dynamically. A) Virtual machines B) Modules C) File systems D) Graphical user interfaces

B) Modules

6. _____ provide(s) an interface to the services provided by an operating system. A) Shared memory B) System calls C) Simulators D) Communication

B) System calls

32. If a program terminates abnormally, a dump of memory may be examined by a ____ to determine the cause of the problem. A) module B) debugger C) shell D) control card

B) debugger

34. Policy ____. A) determines how to do something B) determines what will be done C) is not likely to change across places D) is not likely to change over time

B) determines what will be done

13. The Windows CreateFile() system call is used to create a file. What is the equivalent system call in UNIX? A) ioctl() B) open() C) fork() D) createfile()

B) open()

7. Which of the following is the only gateway between user space and kernel space? A) user interface B) system call C) operating system D) hardware drivers

B) system call

ESSAY QUESTION What are the advantages and disadvantages of using a microkernel approach?

Benefits typically include the following: (a) adding a new service does not require modifyingthe kernel, (b) it is more secure, as more operations are done in user mode than in kernel mode, and (c)a simpler kernel design and functionality typically results in a more reliable operating system The primary disadvantages of the microkernel architecture are the overheads associated withinterprocess communication and the need to frequently use the operating system's messaging functionsto enable the user process and the system service to interact with each other.

1. Which of the following statements is incorrect? A) An operating system provides an environment for the execution of programs. B) An operating system manages system resources. C) Operating systems provide both command line as well as graphical user interfaces. D) Operating systems must provide both protection and security.

C) Operating systems provide both command line as well as graphical user interfaces.

14. The ________ provides a portion of the system call interface for UNIX and Linux. A) POSIX B) Java C) Standard C library D) Standard API

C) Standard C library

11. The Windows CreateProcess() system call creates a new process. What is the equivalent system call in UNIX? A) NTCreateProcess() B) process() C) fork() D) getpid()

C) fork()

23. Which of the following is a much more restricted, or even closed, system to developers than others? A) Linux B) Mac OS X C) iOS D) Android

C) iOS

21. Which of the following operating system structure is the one for Mach OS? A) monolithic structure B) layered structure C) microkernel D) modular approach

C) microkernel

ESSAY QUESTION Describe some requirements, or goals, when designing an operating system.

CAN be divided into user and system goals. users want system that is easy to use/learn, reliable, safe, and fast. system goals are created by ppl who design, create, maintain, and operate system. System should be easy to design implement, and maintain while being flexible, reliable, error-free, & efficient

3. Which of the following is not an operating system service? A) program execution B) I/O operation C) protection and security D) graphical user interface

D) GUI

5. Which of the following is not a type of command interpreter? A) Bourne shell B) C shell C) Korn shell D) KDE or GNOME

D) KDE or GNOME

29. _____ is not one of the major categories of system calls. A) Process control B) Communications C) Protection D) Security

D) Security

18. ______ is a mobile operating system designed for the iPhone and iPad. A) Mac OS X B) Android C) UNIX D) iOS

D) iOS

22. Which of the following operating system structure involves using loadable kernel module in design? A) monolithic structure B) layered structure C) microkernel D) modular approach

D) modular approach

8. What is the relationship between library call open() and open() system call? A) open() system call is part of open() B) open() system call in an alternate version of open() C) open() is a predecessor version of open() system call D) open() invokes open() system call to get service from operating system

D) open() invokes open() system call to get service from operating system

27 A microkernel is a kernel ____. A) containing many components that are optimized to reduce resident memory size B) that is compressed before loading in order to reduce its resident memory size C) that is compiled to produce the smallest size possible when stored to disk D) that is stripped of all nonessential components

D) that is stripped of all nonessential components

True/False Questions An initial bootstrap program is in the form of random-access memory (RAM).

FALSE

True/False Questions Applications compiled on one operating system can be directly executable on other operating systems due to common structure.

FALSE

True/False Questions System calls can be run in either user mode or kernel mode.

FALSE

True/False Questions iOS is open source; Android is closed source.

FALSE

ESSAY QUESTION Of the following 5 forms of storage, rank them from fastest to slowest in terms of access time: (1) main memory, (2) magnetic disk, (3) registers, (4) solid state disk, (5) cache.

1. registers 2. cache 3. main memory 4. solid state disk 5. magnetic disk


Conjuntos de estudio relacionados

Cardiovascular Hypertension Chp 32

View Set

1. P1L1-Chapter1- Security Mindset - Practice Test - Midterm1

View Set

Superlativo Assoluto (ITA 2): alcune forme di comparativi e superlativi irregolari degli aggettivi (forme organiche)

View Set

Career Exploration Final Exam Study Guide

View Set

6.1 Measuring the Size of the Economy: Gross Domestic Product

View Set

Anatomy and Physiology: Midterm 1

View Set

Chapter 4 Exam - Premiums and Proceeds

View Set