Operating Systems test 1 (ch1-2.6)

studied byStudied by 3 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 113

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

114 Terms

1
\
operating system (OS)
the software that runs on the bare hardware of a computer and provides essential support for users to develop and use applications in the most efficient and safe manner
New cards
2
CPU
Machine instructions perform \n operations on contents of \n registers and memory locations
New cards
3
Main \n memory
Physical memory is a linear \n sequence of addressable bytes \n or words that hold programs \n and data
New cards
4
Secondary storage
Disk and other secondary \n storage devices are multi- \n dimensional structures,
New cards
5
The hardware/user gap is bridged by the OS or by other system software. Does this require OS support: Input a character from the keyboard?
Definitely
New cards
6
The hardware/user gap is bridged by the OS or by other system software. Does this require OS support: Invoking a high level matrix manipulation
Not Necessarily
New cards
7
The hardware/user gap is bridged by the OS or by other system software. Does this require OS support: Allocate n bytes of memory for a new data structure
Most likely
New cards
8
The hardware/user gap is bridged by the OS or by other system software. Does this require OS support: Load a program into memory
Definitely
New cards
9
The hardware/user gap is bridged by the OS or by other system software. Does this require OS support: Change the layout of a document
Not Necessarily
New cards
10
The hardware/user gap is bridged by the OS or by other system software. Does this require OS support: Call a shared library function
Most likely
New cards
11
The hardware/user gap is bridged by the OS or by other system software. Does this require OS support: Call a function defined in the current pogram
Not Necessarily
New cards
12
The hardware/user gap is bridged by the OS or by other system software. Does this require OS support: Exit current program
Definitely
New cards
13
Abstraction
the act of removing unimportant details or attributes of objects in order to construct more general and less complex objects
New cards
14
Virtualization
is the act of creating the illusion of having one or more objects with more desirable characteristics than the real object.
New cards
15

The OS as a resource manager

One of the main tasks of an OS is to optimize the use of all computational resources to ensure good overall performance, while satisfying the requirements of specific applications, including guaranteeing acceptable response times for interactive processes, meeting deadlines of time-critical tasks, and allowing safe communication among different tasks.
New cards
16
***Multiprogramming*** 
 a technique that keeps several programs active in memory and switches execution among the different programs to maximize the use of the CPU and other resources
New cards
17
***Time-sharing*** (***multitasking)***
is an extension of multiprogramming where the CPU is switched periodically among all active computations to guarantee acceptable response times to each user.
New cards
18
Multiprogramming generally improves CPU utilization and throughput.
True
New cards
19
The main objective of time-sharing is to improve resource utilization.
False
New cards
20
Multiprogramming and time-sharing are not used together.
False
New cards
21
To achieve best CPU utilization, _____ computations should run simultaneously.
More than 2
New cards
22
The use of time-sharing will 
Guarantee reasonable response to each computation
New cards
23
Processes p1 and p2 share a single CPU and 2 independent I/O devices. Each process executes a compute-bound phase of 10 time units followed by an I/O-bound phase of 10 units. W/O multiprg
40
New cards
24
Processes p1 and p2 share a single CPU and 2 independent I/O devices. Each process executes a compute-bound phase of 10 time units followed by an I/O-bound phase of 10 units. WITH multiprg
30
New cards
25
Abstraction can be used without virtualization.
Yes, abstraction can be used without virtualization. Abstraction creates objects that are more general and less complex. Those objects do not necessarily need to be virtual objects.
New cards
26
Virtualization can be used without abstraction.
Virtualization can be used without abstraction. Yes, virtualization can be used without abstraction. Virtualization creates the illusion of a new object.
New cards
27
Abstraction and virtualization can be used together.
Yes, abstraction and virtualization can be used together. Virtualization can be used to create the illusion of a new object. Abstraction can then be used to further improve the new object by making it more general and easier to use.
New cards
28
What do multiprogramming and time-sharing have in common? What are differences between the two concepts?
Multiprogramming allows multiple programs to be active in memory simultaneously. While \n one is waiting for I/O completion or some other event, another can run on the CPU. The main objective is to increase CPU and device utilization

\
Time sharing goes beyond multiprogramming by guaranteeing that each computation gets a

\n turn at the CPU in a timely manner, not only when other computations block to wait for a \n resource
New cards
29
kernel
 the minimal set of functions necessary to manage the system resources safely and efficiently. 
New cards
30
privileged instruction
performs critical operations that access I/O devices and the CPU's status and control registers. Thus only the OS kernel is allowed to execute privileged instructions.
New cards
31
Kernel Mode
  the CPU state where both privileged and non-privileged instructions may be used.
New cards
32
User mode
the CPU state where only non-privileged instructions may be used. Any attempt to execute a privileged instruction in user mode automatically transfers control to the kernel.
New cards
33
The OS kernel is the lowest level of software and provides the basic functionalities necessary for efficiently and safely executing programs
True
New cards
34
The kernel is extended by library functions, which invoke kernel functions to offer more convenient service functions to higher-level software.

\
\
True
New cards
35
Applications and system software may invoke kernel functions directly or use the more convenient higher-level abstractions provided by library functions.

\
True
New cards
36

Kernel functions may be invoked by

any program

New cards
37
Privileged instructions may be executed by
only the kernel
New cards
38
An application that needs to access an I/O device could not be written without
Kernel functions
New cards
39
The kernel can execute _____ instructions
Both non privileged and privileged
New cards
40
***graphical user interface*** (***GUI)***
 presets various icons on the screen, which the user can click on in different ways to invoke services associated with the icons, or to reveal pull-down menus for additional tasks.
New cards
41
OS shell 
 a command interpreter that accepts and interprets textual commands issued by the user via a keyboard.
New cards
42
shell script
a program that implements a new operation by combining multiple commands and control statement into one named unit interpreted by the shell.
New cards
43
A script can use an iteration variable, i. The value $i of i can be used to create a different name in each iteration. The script below creates 10 directories named D0, D1, ..., D9, where MKDIR is the command to make a directory.

To create the same directories using a GUI, the user must perform some number of right and left-clicks, type some number of characters, and press Enter several times.
10
New cards
44
A script can use an iteration variable, i. The value $i of i can be used to create a different name in each iteration. The script below creates 10 directories named D0, D1, ..., D9, where MKDIR is the command to make a directory.

\
The required number of right-clicks is
10
New cards
45
A script can use an iteration variable, i. The value $i of i can be used to create a different name in each iteration. The script below creates 10 directories named D0, D1, ..., D9, where MKDIR is the command to make a directory.

\
The number of characters typed is
20
New cards
46
A script can use an iteration variable, i. The value $i of i can be used to create a different name in each iteration. The script below creates 10 directories named D0, D1, ..., D9, where MKDIR is the command to make a directory.

\
The number of times Enter is pressed is
10
New cards
47
 ***system call*** 
a request from an application for an OS service. A system call is implemented as a library function, which sets up the necessary parameters for the requested operation and issues a corresponding supervisor call.
New cards
48
 ***supervisor call*** (***kernel call***)
 a privileged instruction that automatically transfers execution control to a well-defined location within the OS kernel. Thus supervisor calls provide the interface between the OS kernel and the higher-level software.
New cards
49

A supervisor call is similar to a function call with two special features:

  1. The call switches execution from user mode to kernel mode by setting the mode bit in the CPU.

  2. To prevent a call from branching to arbitrary locations within the kernel, the function to be invoked is not specified by an address but indirectly using an index into a branch vector. Thus kernel-mode execution is limited to only well-defined entry points within the kernel.

True
New cards
50
A system call is a
Library function
New cards
51
A supervisor call is a
Privileged instruction
New cards
52
A supervisor call can be executed 
by any program
New cards
53
Changing the mode bit of the CPU _____ can only be done by a privileged instruction.
from user mode to kernel mode
New cards
54
interrupt
an event that diverts the current execution of a program to a predefined location in the kernel in order to respond to an event. An interrupt is triggered by a hardware signal sent to the CPU from an external device.
New cards
55
trap
an interrupt triggered by the currently executing instruction. Dividing by zero, executing an invalid opcode, or causing an arithmetic overflow are all errors, which result in a trap and cause the OS to abort the current program execution.
New cards
56
***interrupt handler*** 
a kernel function, invoked whenever an interrupt occurs, that determines the cause of the interrupt and invokes the appropriate kernel function to provide the response
New cards
57
An application is requesting a service from the OS, which consists of several steps. The current step is: Setup parameters for the service in user mode. What is the next step?
Execute supervisor_call in user mode.
New cards
58
An application is requesting an I/O operation from the OS, which consists of several steps. The current step is: Setup parameters for the service in user mode. What are the next two steps?
Execute supervisor_call in user mode.

Execute kernel function in kernel mode.
New cards
59
What do interrupts and traps have in common?
Traps and interrupts both suspend the execution of the current instruction sequence and temporarily divert control to a dedicated area within the OS kernel
New cards
60
What are the differences between the two concepts?
An interrupt is caused by an event external to the current execution. Ex: The completion of an I/O operation or a time-out signal from a clock. Interrupts are asynchronous to the current execution in that the interruption may occur unpredictably between any two instructions.

\
A trap is a special case of an interrupt caused by an event internal to the current execution. \n Ex: The execution of a privileged instruction or an arithmetic overow. \n Traps are synchronous to the current execution, in that the interruption is caused by the \n currently executing instruction. The interruption can be unintentional, as in the case of an \n error, or intentional, as in the case of a supervisor call.
New cards
61
Is multiprogramming possible without interrupts
Multiprogramming does not require interrupts. A context switch happens whenever a computation terminates or blocks to wait for I/O.
New cards
62
Is time-sharing possible without interrupts?
\n Time sharing requires a periodic interrupt to prevent long-running computations from monopolizing the CPU and thus delaying other computations for unpredictable amounts of \n time
New cards
63
Enabling hardware technology: vacuum tubes
OS type: none
New cards
64
Enabling hardware technology: Transistors replaced \n vacuum tubes as smaller and faster switches
OS type: Batch os
New cards
65
Enabling hardware technology: Integrated circuits allowed the development of microchips to replace \n individual transistors
OS type: Interactive multi user OS
New cards
66
Enabling hardware technology: Very large-scale integration (VLSI) allowed the placement of a \n complete microprocessor on a single chip, leading to \n the development ofpersonal computers(PCs)
OS Type: Desktop and Laptop OS
New cards
67
Enabling hardware technology: Networking hardware \n enabled the harnessing of the power of multiple computers
OS Type: for supercomputers, distributed systems, and \n mobile devices
New cards
68
The invention of transistors marks the transition to the _____ generation of computer systems.
2nd
New cards
69
The invention of integrated circuits marks the transition to the _____ generation of computer systems.
3rd
New cards
70
The invention of microprocessors marks the transition to the _____ generation of computer systems.
4th
New cards
71
Mainframes are considered 
General purpose computers
New cards
72
An advanced aircraft is likely to have a _____ on board to help control the aircraft
real time computer
New cards
73
What multiprocessors and multi-computers (distributed systems) have in common is
The ability to carry out operations in parallel
New cards
74
***process*** 
an instance of a program being executed by an OS. Ex: When a user opens a new application like a web browser or text editor, the OS creates a new process.
New cards
75
***process control block*** (***PCB***)
A data structure that holds information for a process, including the current instruction address, the execution stack, the set of resources used by the process, and the program being executed. 
New cards
76
An OS uses a PCB to represent a process
True
New cards
77
The PCB is created by the process when execution starts
False
New cards
78
The PCB becomes part of the program being executed by a process.
False
New cards
79
Two processes can be executing the same program.
True
New cards
80
The transition (ready -> running) of a process p is caused by
The transition (ready -> running) of a process p is caused by
the OS
New cards
81
The transition (running -> blocked) of a process p is caused by
The transition (running -> blocked) of a process p is caused by
The process P itself
New cards
82
The transition (running -> ready) of a process p is caused by 
The OS
New cards
83
The transition (blocked -> ready) of a process p is caused by
The transition (blocked -> ready) of a process p is caused by
some other process
New cards
84
A newly created process is placed into
new state
New cards
85
A process is placed into the ***terminated state***
when execution can no longer continue but before the PCB is deleted. Ex: The OS may want to examine the final state of a process that committed a fatal error.
New cards
86
A process may be placed into the ***suspended state***
even though the CPU and all resources are available. Ex: The OS may want to stop a process to allow debugging or to regulate performance.
New cards
87
When a newly created process p is ready to compete for the CPU, p moves itself from the new to the ready state.
When a newly created process p is ready to compete for the CPU, p moves itself from the new to the ready state.
False
New cards
88
When a ready process p wishes to temporarily stop competing for the CPU, p moves itself to the suspended state.
When a ready process p wishes to temporarily stop competing for the CPU, p moves itself to the suspended state.
When a ready process p wishes to temporarily stop competing for the CPU, p moves itself to the suspended state.
New cards
89
The transition of a process p from running to terminated can be caused by p itself.
The transition of a process p from running to terminated can be caused by p itself.
True
New cards
90
\
When a blocked process p is suspended and the resource needed by p becomes available, p is moved to the ready state.
False
New cards
91
When a process p is moved from the current state (running, ready, or blocked) to the suspended state, then upon reactivation
When a process p is moved from the current state (running, ready, or blocked) to the suspended state, then upon reactivation
p is either moved to the read or the blocked state
New cards
92
***context switch*** 
 the transfer of control from one process to another and may be triggered by the OS for scheduling reasons or caused by the inability of the current process to continue.
New cards
93
CPU state
consists of all intermediate values held in any CPU registers and hardware flags at the time of the interruption.
New cards
94
A context switch for a currently running process p may be caused by process p itself
True
New cards
95
A context switch for a currently running process p may be caused by the OS
True
New cards
96
A context switch for a currently running process p may be caused by some other process q
False
New cards
97
The PCB contains an up-to-date copy of the CPU state of a process p _____ .

\
when p's state is ready or blocked
New cards
98
Is this valid or invalid? : new ➛ ready ➛ suspended ➛ blocked ➛ suspended.
Invalid
New cards
99
Is this valid? : suspended ➛ blocked ➛ suspended ➛ blocked ➛ ready ➛ running.
Valid
New cards
100
Is this valid? : running ➛ blocked ➛ ready ➛ blocked ➛ suspended.
invalid
New cards

Explore top notes

note Note
studied byStudied by 12 people
732 days ago
5.0(1)
note Note
studied byStudied by 114 people
922 days ago
4.7(3)
note Note
studied byStudied by 3 people
776 days ago
5.0(1)
note Note
studied byStudied by 1390 people
714 days ago
4.3(7)
note Note
studied byStudied by 7 people
140 days ago
5.0(1)
note Note
studied byStudied by 37 people
168 days ago
5.0(2)
note Note
studied byStudied by 1 person
42 days ago
5.0(1)
note Note
studied byStudied by 30 people
972 days ago
4.5(2)

Explore top flashcards

flashcards Flashcard (95)
studied byStudied by 4 people
34 days ago
5.0(1)
flashcards Flashcard (150)
studied byStudied by 171 people
386 days ago
5.0(1)
flashcards Flashcard (47)
studied byStudied by 19 people
326 days ago
5.0(1)
flashcards Flashcard (36)
studied byStudied by 1 person
498 days ago
5.0(1)
flashcards Flashcard (25)
studied byStudied by 11 people
483 days ago
5.0(2)
flashcards Flashcard (80)
studied byStudied by 69 people
409 days ago
5.0(1)
flashcards Flashcard (39)
studied byStudied by 3 people
726 days ago
5.0(1)
flashcards Flashcard (21)
studied byStudied by 55 people
204 days ago
5.0(1)
robot