Midterm1 Polling Questions 1-6 Flashcards
Lectures 1-6
Which of the following statements concerning open source operating systems is true?
- Solaris is open source
- Source code is freely available to read
- they are always more secure than commercial, closed systems
- all open source operating systems share the same set of goals
Source code is freely available to read
Which of the following operating systems is not opern source?
- Windows
- BSD UNIX
- Linux
- PCLinuxOS
Windows
A ____ is a custom build of the linux operating system
- LiveCD
- Installation
- Distribution
- VMWare Player
Distribution
Operating System
- Is a collection of programs
- provies user-interface
- is a resource manager
- all of the above
- none of the above
All of the Above
The Operating System kernel consists of all system and application programs in a computer
False
The operating system model consists of..
- a kernel layer, service layer, and user interface layer
- hardware layer, and software layer
- multitasking, time sharing, and multiuser
- system layer, utility layer, and appliation layer
- none of the above
a kernel layer , service layer, and user interface layer
The Kernel Layer manages all the hardware dependent functions
True of False?
True
What would a computer without an operating system be like?
- the software applications you wrote couldn’t send requests to the hardware through standard APIs
- there would only be one program running at a time and exiting
- there would be no graphical user interface
- all of these
All of These
An OS should be able to handle interrputs or signals that are triggered by either hardware or software
True of False?
True
In a C program a mandatory main() function is the start of the execution
True or False?
True
“#include<stdio.h>"in a progarm means</stdio.h>
- Include header files in code before compilation
- Stdio is a predefined standard library of functions under a system path
- contains function definitions that may be called in this file
- all of the above
All of the above
include “mylib.h” in a C program means
- incllude header files in code before compilation
- mylib is a user defined library of functinos under this directory
- contains function definitions that may be called in this file
- all of the above
all of the above
define in a C program may be
- constant
- preprocessor directive
- replaced by preprocessor in code before compilation
- all of the above
all of the above
An operating system is far easier to port to move to some other hardware if it is written in a lower level language(like assembly)
False
Indicate whether the expression evaluates to true or false. Let x = 7, y = 9.
NOT ( (x > 5) AND (y < 20) )
true or false?
False
Given numPeople = 10, userKey = ‘q’. Indicate whether the expression evaluates to true or false.
(numPeople >= 10) && (userKey == ‘x’)
False
Given numPeople = 10. Indicate whether the expression evaluates to true or false.
!( (numPeople == 5) || (numPeople == 6) )
True
Which operator is evaluated first in C?
w + 3 > x - y * z
*
Unary operators, like ! ++ –, have a higher priority than % * / + -.
In what order are the operators evaluated?
w + 3 != y - 1 && x
a) +, !=, -, &&
b) +, -, &&, !=
c) +, -, !=, &&
c) +, -, !=, &&
To what does this expression evaluate, given int x = 4, int y = 7.
x == 3 || x + 1 > y => (x == 3) || ((x + 1) > y )
A) True(1)
B) False(0)
False: B (x == 3) || ((x + 1) > y)
Which illustrates the actual order of evaluation via parentheses?
! green == red
(!green) == red
!(green == red)
(!green =)= red
(!green) == red
Which illustrates the actual order of evaluation via parentheses?
bats < birds || birds < insects
((bats < birds) || birds) < insects
bats < (birds || birds) < insects
(bats < birds) || (birds < insects)
C-> (bats < birds) || (birds < insects)
Which illustrates the actual order of evaluation via parentheses?
! (bats < birds) || (birds < insects)
! ((bats < birds) || (birds < insects))
(! (bats < birds)) || (birds < insects)
((!bats) < birds) || (birds < insects)
(! (bats < birds)) || (birds < insects)
Which illustrates the actual order of evaluation via parentheses?
(num1 == 9) || (num2 == 0) && (num3 == 0)
(num1 == 9) || ((num2 == 0) && (num3 == 0))
((num1 == 9) || (num2 == 0)) && (num3 == 0)
(num1 == 9) || (num2 == (0 && num3) == 0)
(((num1 == (9 || num2) == 0) && num3) == 0)
(num1 == 9) || ((num2 == 0) && (num3 == 0))