CSCI 331 CH 1
Associate the distinguishing OS features with the corresponding generations. Parallel and distributed computing
5th generation Connecting multiple CPUs and memories into a supercomputer enabled high-performance computing. Connecting multiple computers into networks enabled internet commerce, information sharing, and social interactions.
The main advantage of a ________ is the intuitive visual representation of objects. A user is able to manipulate object and invoke operations using a mouse without much training and without any knowledge of the underlying commands.
GUI
The hardware/user gap is bridged by the OS or by other system software. Which of the following tasks would require OS support? Load a program into memory. Definitely Not necessarily
Definitely The OS must manage the partitioning of memory to protect concurrent users from one another and to optimize the use of memory.
The hardware/user gap is bridged by the OS or by other system software. Which of the following tasks would require OS support? Sleep for n seconds. Definitely Not necessarily
Definitely The OS must select and run another program while the requesting program is blocked to avoid wasting CPU time and other resources.
The hardware/user gap is bridged by the OS or by other system software. Which of the following tasks would require OS support? Exit current program. Definitely Not necessarily
Definitely When a program terminates, the OS must free up memory and other resources used by the program.
The hardware/user gap is bridged by the OS or by other system software. Which of the following tasks would require OS support? Input a character from the keyboard. Definitely Not necessarily
Definitely All devices require OS support to carry out the complex interactions transparently to the user.
Match the higher-level constructs to the corresponding low-level instruction sequences. Given a file block i, determine the track number t and the block number j within t that correspond to block i. Access block j on track t. a. Access disk block i b. Send file f to printer P c. C = A x B, where A, B, and C are matrices d. Enqueue x into q e. Load program p into memory and execute p
a. Access disk block i Disks are 2-dimensional rotating structures where data is stored in blocks on concentric tracks. A sequential block number must first be converted into a track number and block number within the track. The OS is effectively creating a virtual 1-dimensional disk.
All software comprising a computer system can be divided into several levels of ________.
abstraction
the act of removing unimportant details or attributes of objects in order to construct more general and less complex objects
abstraction
Kernel functions may be invoked by _____. only system call libraries only system call or general libraries any program
any program Any program is allowed to issue a supervisor call to request service directly from the kernel.
Match the higher-level constructs to the corresponding low-level instruction sequences. Copy f into a temporary file f'. Wait until printer P not busy. Reserve printer P. Send file f' to printer P. Release printer P. a. Access disk block i b. Send file f to printer P c. C = A x B, where A, B, and C are matrices d. Enqueue x into q e. Load program p into memory and execute p
b. Send file f to printer P By copying f into a temporary file and handling the allocation and release of the printer transparently, the OS effectively creates a virtual printer that is always available.
The kernel can execute _____ instructions. only privileged both privileged and non-privileged
both privileged and non-privileged The kernel always executes in kernel mode, which allows the use of privileged instructions in addition to non-privileged instructions.
A supervisor call can be executed _____. only in kernel mode by any program by only library functions
by any program Any program can make direct use of a kernel function by issuing the corresponding supervisor call.
Match the higher-level constructs to the corresponding low-level instruction sequences. for all i: for all j: for all k: Cij = Cij + Aik × Bkj a. Access disk block i b. Send file f to printer P c. C = A x B, where A, B, and C are matrices d. Enqueue x into q e. Load program p into memory and execute p
c. C = A x B, where A, B, and C are matrices The system provides a high-level matrix multiplication operation, typically in the form of a library function, which eliminates the need to write and optimize the low-level code.
Match the higher-level constructs to the corresponding low-level instruction sequences. If program p is too large to fit into memory, divide p into smaller partitions p1, p2, ... Load p1 and start execution. Whenever a different partition pi is needed, save current partition and load pi. Resume execution. a. Access disk block i b. Send file f to printer P c. C = A x B, where A, B, and C are matrices d. Enqueue x into q e. Load program p into memory and execute p
e. Load program p into memory and execute p By hiding the details of partitioning and moving programs into memory in smaller chunks, the OS creates the illusion of a large memory space, a virtual memory, which is larger than the physical memory.
An OS is an __________ machine, which provides efficient high-level functions and virtual entities that liberate the programmer and the user from having to understand details of memory, disk, I/O management, and other internal processes.
extended
The main objective of time-sharing is to improve resource utilization. True False
false Resource utilization is improved by multiprogramming, which overlaps CPU-bound and I/O-bound computations. Time-sharing only switches the CPU among different computations to create the illusion of simultaneous execution, which generally does not improve resource utilization beyond simple multiprogramming.
Multiprogramming and time-sharing are not used together. True False
false Time-sharing requires multiprogramming, since multiple computations must be active at the same time.
Changing the mode bit of the CPU _____ can only be done by a privileged instruction. from user mode to kernel mode from kernel mode to user mode in any way
from user mode to kernel mode Changing from user mode to kernel mode must be done in a controlled manner using a supervisor call instruction.
Mainframes are considered _____. supercomputers embedded computers general-purpose computers
general-purpose computers Mainframes are stand-alone systems that can be programmed to perform a wide variety of tasks.
A __________ 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.
graphical user interface (GUI)
In a hypothetical system, the average computation spends 50% of total time using the CPU and the remaining 50% waiting for I/O. The use of time-sharing will _____. speed up all computations guarantee reasonable response to each computation improve resource utilization
guarantee reasonable response to each computation No computation can monopolize the CPU indefinitely
small, portable, wireless-capable device for personal use
hand-held device
an event that diverts the current execution of a program to a predefined location in the kernel in order to respond to an event, triggered by a hardware signal sent to the CPU from an external device
interrupt
An ___________ is 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.
interrupt handler
The OS _______ is the lowest level of software and provides the basic functionalities necessary for efficiently and safely executing programs.
kernel
The ______ of an OS is the minimal set of functions necessary to manage the system resources safely and efficiently. Typically provides the most essential services for memory and device management, for creating and managing units of computation, and for communication among the different concurrent activities within the system.
kernel
An application that needs to access an I/O device could not be written without _____. kernel and library functions kernel functions
kernel functions To access an I/O device, privileged instructions are needed, which only the kernel can execute.
the CPU state where both privileged and non-privileged instructions may be used
kernel mode
The kernel is extended by ______ functions, which invoke kernel functions to offer more convenient service functions to higher-level software.
library
A system call is a _____. privileged instruction library function kernel function
library function A system call is a library function that uses supervisor calls to carry out a service function.
a large central computer used by large organizations.
mainframe
An advanced aircraft is unlikely to have on board a _____. mainframe computer real-time computer PC
mainframe computer Mainframes are too large for most aircraft to carry on board.
In a hypothetical system, the average computation spends 50% of total time using the CPU and the remaining 50% waiting for I/O. To achieve best CPU utilization, _____ computations should run simultaneously. 2 more than 2 all available
more than 2 Using more than 2 computations increases CPU utilization but at the same time uses more memory and other resources. A careful balance must be found to minimize overhead while still increasing overall performance.
a network of independent computers interconnected via a communication network.
multicomputer, distributed system
a system of multiple CPUs and memories interconnected by a fast network into a single parallel computer.
multiprocessor
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
multiprogramming
Privileged instructions may be executed by _____. only the kernel the kernel and system call libraries any program
only the kernel No program outside of the kernel is allowed to use privileged instructions.
_______ instructions, which access I/O devices and various control and status registers of the CPU, are restricted to the kernel and can only be executed in kernel mode.
privileged
A ______ ______ performs critical operations that access I/O devices and the CPU's status and control registers.
privileged instruction
A supervisor call is a _____. privileged instruction library function kernel function
privileged instruction A supervisor call is a privileged instruction that transfers control to the kernel in kernel mode.
a computer, frequently embedded in a larger electro-mechanical system, that must respond rapidly to external events.
real-time system
collection of small, spatially distributed dedicated sensors communicating by wired or wireless connections.
sensor network
a large computer that responds to requests from individual clients.
server
A _______ is the preferred interface by programmers and expert users because text-based commands are more flexible than icons by providing a wide range of parameters and control flags to modify each command.
shell
a program that implements a new operation by combining multiple commands and control statement into one named unit interpreted by the shell
shell script
a privileged instruction that automatically transfers execution control to a well-defined location within the OS kernel
supervisor call (kernel call)
a request from an application for an OS service
system call
What multiprocessors and multi-computers (distributed systems) have in common is _____. the same type of applications the same type of interconnection networks the ability to carry out operations in parallel
the ability to carry out operations in parallel Both types of computer contain multiple CPUs, interconnected and cooperating in different ways, which allow multiple computations to proceed in parallel.
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
the operating system
an extension of multiprogramming where the CPU is switched periodically among all active computations to guarantee acceptable response times to each user
time-sharing (multitasking)
A _______(also called an internal interrupt) is an interrupt triggered by the currently executing instruction.
trap
Any attempt to execute a privileged instruction in user mode automatically transfers control to the kernel
true
Applications and system software may invoke kernel functions directly or use the more convenient higher-level abstractions provided by library functions.
true
Only the OS kernel is allowed to execute privileged instructions
true
Software at all levels executes CPU instructions, which are divided into two classes: privileged and non-privileged. A mode bit in the CPU determines which instruction set may be used.
true
supervisor calls provide the interface between the OS kernel and the higher-level software
true
Multiprogramming generally improves CPU utilization and throughput. True False
true Multiprogramming overlaps phases of computation and I/O from different computations to better utilize the CPU and other resources, which improves overall performance.
the CPU state where only non-privileged instructions may be used
user mode
the act of creating the illusion of having one or more objects with more desirable characteristics than the real object
virtualization
Associate the distinguishing OS features with the corresponding generations. No OS support
1st generation Computers used vacuum tubes and magnetic drums for storage to perform computations without any software support.
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. FOR i in 0 1 2 3 4 5 6 7 8 9 DO MKDIR D$i DONE 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. The number of characters typed is _____.
20 Each directory name consists of 2 characters Di. The extension ".d" is invisible and generated automatically since the operation is to create a new directory.
The invention of transistors marks the transition to the _____ generation of computer systems. 2nd 3rd 4th
2nd Transistors replaced vacuum tubes, thus marking the transition from the 1st to the 2nd generation.
Associate the distinguishing OS features with the corresponding generations. Batch processing, multiprogramming
2nd generation Multiprogramming improved the throughput of jobs submitted in batches of punch cards.
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. If p1 and p2 use time sharing and the length of the time slice allocated to each process is negligible compared to the 10 time units of execution, then the total execution time of both processes is ____ time units. 20 30 40
30 Since execution is switched between the processes very frequently, the compute phases run concurrently at half the speed (20 time units). The I/O phases start almost simultaneously and execute in parallel for approximately 10 units.
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 multiprogramming, the total execution time of both processes is ____ time units. 20 30 40
30 The compute phase of the second process can start immediately following the compute phase of the first process and thus overlap with the I/O phase of the first process.
a personal computer
desktop, laptop
The invention of integrated circuits marks the transition to the _____ generation of computer systems. 2nd 3rd 4th
3rd Integrated circuits enabled the placement of many transistors on a single chip, thus marking the transition from the 2nd to the 3rd generation.
Associate the distinguishing OS features with the corresponding generations. Time-sharing, keyboard and display terminal support
3rd generation
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. Without multiprogramming, the total execution time of both processes is ____ time units. 20 30 40
40 The processes execute all phases sequentially: (10 + 10) + (10 + 10) = 40
The invention of microprocessors marks the transition to the _____ generation of computer systems. 2nd 3rd 4th
4th Using VLSI, an entire processor could be placed on a single chip, thus marking the transition from the 3rd to the 4th generation.
Associate the distinguishing OS features with the corresponding generations. User-friendly GUI
4th generation Microprocessors gave rise to the personal computer, which required an intuitive, easy-to-use interface even for the casual user.
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. FOR i in 0 1 2 3 4 5 6 7 8 9 DO MKDIR D$i DONE 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. The number of times Enter is pressed is _____.
10 After typing the new directory name, the name is entered by pressing Enter.
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. FOR i in 0 1 2 3 4 5 6 7 8 9 DO MKDIR D$i DONE 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. The required number of right-clicks is _____.
10 For each new directory, the user must first right-click on the current directory to open the pull-down menu.
formulated by the scientist Gordon Moore, is the observation that the number of transistors in an integrated circuit doubles about every two years. This prediction has held steady since the mid 1960's until today.
Moore's law
The hardware/user gap is bridged by the OS or by other system software. Which of the following tasks would require OS support? Call a shared library function. Most likely Not necessarily
Most likely Due to the large numbers of possible library functions, the OS may postpone the loading and linking of a function until the function is actually needed.
The hardware/user gap is bridged by the OS or by other system software. Which of the following tasks would require OS support? Allocate n bytes of memory for a new data structure. Most likely Not necessarily
Most likely The OS must manage the partitioning of memory to protect concurrent users from one another and to optimize the use of memory. Some portion of the dynamic memory could be pre-allocated but, in general, an OS intervention is required.
The hardware/user gap is bridged by the OS or by other system software. Which of the following tasks would require OS support? Call a function defined within the current program. Definitely Not necessarily
Not necessarily The compiler and the linker combine functions into a single module, where the call results in a branch instruction within the program. No OS involvement is needed.
The hardware/user gap is bridged by the OS or by other system software. Which of the following tasks would require OS support? Invoke a high-level matrix manipulation operation. Definitely Not necessarily
Not necessarily The compiler can translate high-level operations on complex data structures into the corresponding machine instructions, which then execute without any help of the OS.
The hardware/user gap is bridged by the OS or by other system software. Which of the following tasks would require OS support? Change the layout of a document. Definitely Not necessarily
Not necessarily A document is manipulated by a text editor. If the document is in memory then the change is made without requiring any OS services.
The ________ is a command interpreter that accepts and interprets textual commands issued by the user via a keyboard.
OS shell
Match the higher-level constructs to the corresponding low-level instruction sequences. Allocate new queue element e. Copy x into e .Insert e at rear of Q. a. Access disk block i b. Send file f to printer P c. C = A x B, where A, B, and C are matrices d. Enqueue x into q e. Load program p into memory and execute p
d. Enqueue x into q The implementation hides the fact that the queue Q is implemented as a linked list and transparently performs the necessary allocation and link operations.