Midterm Revision

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

Midterm Operating System Revision by Eng Ihap EL-Galaly

One of the user interface (UI) is:__________.


a. Command-line interface (CLI)
b. Graphical user interface (GUI)
c. a and b
d. None of above

One of the OS services to the user is ______________.


a. I/O operations
b. Program execution
c. File-system manipulation
d. All the previous terms.

In OS, _________ means one process may needs to exchange information with
another process.
a. Communications
b. Transfer
c. Data transmission
d. Radio wave

Communications in OS implemented via: shared memory, and _______.


a. Call
b. Single memory
c. Message passing
d. None of above

____________: is the allocation of resources to the users.


a. Task Manager
b. Data allocation
c. Memory and CPU
d. Resource allocation

___________ OS service involves ensuring that all access to system resources is


controlled.
a. OS restarter
b. Protection and security
c. Controller
d. Firewall
________ employs a mouse-based window and menu system characterized by a
desktop metaphor.
a. Command-line interface (CLI)
b. Graphical user interface (GUI)
c. a and b
d. None of above

‫رمضان كريم‬ with my Best wishes 01062665758 1


___________ provide an interface to the services made available by an operating
system.
a. User mode
b. System mode
c. System program
d. System calls

Writing a program to read data from one file and copy them to another file requires
many_________.
a. Programs system calls
b. user system calls
c. I/O system calls
d. Files system calls

A program in execution/An instance of a program running on a computer.


a. Program
b. Process
c. System call
d. None of the above terms.

An OS has main responsibilities:


a. Perform basic tasks such as recognizing input from the keyboard.
b. Ensure that different programs and users running at the same time do not interfere with
each
other.
c. Provide a software platform on top of which other programs can run.
d. All of the above terms.

Which of the following is not an operating system?


a. Windows
b. Linux
c. Oracle
d. DOS

The programs and data are not resided in main memory permanently because:
a. Main memory is usually too small to store all needed programs and. Data permanently.
b. Main memory is a volatile device that loses its contents when power is turned off.
c. (a) and (b).
d. None of the above is correct.

‫رمضان كريم‬ with my Best wishes 01062665758 2


…………………..is responsible for moving the data between the peripheral devices
that it controls and its local buffer storage.
a. The device controller.
b. RAM
c. Cache
d. None of the above terms

The advantages of multiprocessors system are


a. Increase throughput
b. Increase reliability
c. Economy of scale
d. All the above are advantages.

Which of the following method is used to improve the main memory utilization?
a. Swapping.
b. Operating system.
c. Interrupt
d. None of the above

Which of the following is not the function of Operating System?


a. Process Management
b. Memory Management
c. Device Management
d. Clock Management

Dual mode of operating system has


a) 1 mode
b) 2 modes
c) 3 modes
d) 4 modes

Virtual memory is
a) an extremely large main memory
b) an extremely large secondary memory
c) an illusion of an extremely large memory
d) a type of memory used in super computers

Process is
a) program in High level language kept on disk
b) contents of main memory
c) a program in execution
d) a job in secondary memory

‫رمضان كريم‬ with my Best wishes 01062665758 3


What is operating system?
e) collection of programs that manages hardware resources
f) system service provider to the application programs
g) link to interface the hardware and application programs
h) all of the mentioned

In an interrupt driven input/output __________


a) the CPU uses polling to watch the control bit constantly, looping to see if a
device is ready
b) the CPU writes one data byte to the data register and sets a bit in control register
to show that a byte is available
c) the CPU receives an interrupt when the device is ready for the next byte
d) the CPU runs a user written code and does accordingly\

Which of the following is slower than the hard-disk?


Main memory
Nonvolatile memory
Optical disk
Cache

Which of the following storage systems is faster than the main memory:
Hard-Disk
Optical-Disk
Cache
Magnetic-Tape

Which of the following storage systems is non-volatile:


Cache
Main memory
Hard-Disk
Registers

Small, fast memory located between the processor and main memory is called:
a. WORM memory
b. Cache memory.
c. None of the above
d. CD-RW memory

The main goals of Operating System Design.


a. All of the above.
b. To be easy to learn, reliable, safe, and fast.
c. To be reliable.
d. To be convenient to use.

‫رمضان كريم‬ with my Best wishes 01062665758 4


The processor execution mode that user programs typically execute in is referred to as:
a. System mode.
b. None of the above.
c. Kernel mode.
d. User mode.

A program that acts as an intermediary between a user of a computer and the


computer hardware
Software
Hardware
Operating System

…………… is interface between user and computer


Device driver
Operating System
Application software

Computer system consist of ………. Component


1
2
3
4

The OS is also responsible for……………, ensuring that unauthorized users do not


access the system.
Security
Execute program
Take input
All of the above

From …………… want convenience, ease of use and good performance. Don’t care
about resource utilization!
User view
System view
All of the above

From …………… OS is a resource allocator that’s Manages all resources


User view
System view
All of the above

From …………… OS is a control program


User view
System view
All of the above

‫رمضان كريم‬ with my Best wishes 01062665758 5


………………, which include all user programs.
system programs
application programs
All of the above

Bootstrap program is an initial program typically stored in the ……….


(ROM)
RAM
Memory
CPU

An ………….is a signal sent to the operating system


Interrupt
Kernel
Input
Output

…………….interrupt by one of the devices


Hardware
Software
Trap or exception
All of the above

…………..interrupt generated by user request


Hardware
Software
Trap or exception
All of the above

…………………generated by an error
Hardware
Software
Trap or exception
All of the above

Main memory is a ………….storage device that loses its contents when power is
turned off or otherwise lost.
Volatile
non volatile
permanent

…………….. it is used, it is copied into a faster storage system on a temporary basis.


Memory
Caching
Hard desk
‫رمضان كريم‬ with my Best wishes 01062665758 6
data transfer from cache to CPU and registers is usually a……………..
hardware function
operating system.
All of the above

transfer of data from disk to memory is usually controlled by the ……………


hardware function
operating system.
All of the above

…………….is responsible for moving the data between the peripheral devices that it
controls and its local buffer.
Operating System
The device controller
System program
CPU

……….-processor system: there is one CPU for executing instructions


Single
Multiprocessor
All of the above

…………….system (also known as parallel systems or multicore systems):


Single
Multiprocessor
All of the above

………….a technique that allows the execution of a process that is not completely in
memory.
Virtual memory
Main Memory
Hard desk

Which of the following is system software?


a. Operating system
b. Compiler
c. Utilities
d. All of the above

Communications in OS implemented via: shared memory, and _________.


a. Call
b. Single memory
c. Message passing
d. None of above

‫رمضان كريم‬ with my Best wishes 01062665758 7


________ employs a mouse-based window and menu system characterized by a
desktop metaphor.
a. Command-line interface (CLI)
b. Graphical user interface (GUI)
c. a and b
d. None of above

A program in execution/An instance of a program running on a computer.


a. Program
b. Process
c. System call
d. None of the above terms.

……………is a passive entity


a. Program
b. Process
c. System call
d. None of the above terms.

………..is an active entity.


a. Program
b. Process
c. System call
d. None of the above terms.

OS is responsible for the following I/O Device Management Functions: Keep


track of the I/O devices. This module is typically called …………..
I/O traffic controller.
Memory management
Device Management

Abstracts physical properties to logical storage unit: …………


File
Folder
Directories
All of the above

………..which uses text commands and a method for entering them


(Keyboard).
Command-line interface (CLI),
batch interface
Graphical user interface (GUI)

‫رمضان كريم‬ with my Best wishes 01062665758 8


Another is ……………, in which commands and directives to control those
commands are entered into files
Command-line interface (CLI),
batch interface
Graphical user interface (GUI)

……………….., this interface is a window system with a pointing device to


direct I/O, menus
Command-line interface (CLI),
batch interface
Graphical user interface (GUI)

…………. We want to keep track of which users use how much and what kinds
of computer resources
Accounting
Protection and security
Security
____________: is the allocation of resources to the users.
a. Task Manager
b. Data allocation
c. Memory and CPU
d. Resource allocation

What is interprocess communication?


a) communication within the process
b) communication between two process
c) communication between two threads of same process
d) b and c

………………..– provides basic computing resources: Central Processing Unit (CPU),


memory, Input/Output (I/O) devices.
Hardware
Operating system
Application programs
Users

………………: Controls and coordinates use of hardware among various applications and
users.
Hardware
Operating system
Application programs
Users

‫رمضان كريم‬ with my Best wishes 01062665758 9


…………………define the ways in which the system resources are used to solve the
computing problems of the users:
Hardware
Operating system
Application programs
Users

……………….: People, machines, other computers.


Hardware
Operating system
Application programs
Users

The …………….is the component that executes instructions and registers for
storing data locally.
Core
ALU
Register

…………………..is the part of a computer processor (CPU) that carries out arithmetic and
logic operations.
Core
ALU
Register
………………: By increasing the number of processors, we expect to get more work done
in less time.
Increased throughput
Economy of scale
Increased reliability

………………..: Multiprocessor systems can cost less than equivalent multiple single-
processor systems, because they can share peripherals, mass storage, and power supplies.
Increased throughput
Economy of scale
Increased reliability

…………………..: graceful degradation or fault tolerance


Increased throughput
Economy of scale
Increased reliability

………………Multiprocessing: each processor is assigned a specific task.


Asymmetric
Symmetric
Clustered Systems
A cluster
‫رمضان كريم‬ with my Best wishes 01062665758 10
…………………..Multiprocessing (SMP): each processor performs all tasks (including
OS functions and user processes).
Asymmetric
Symmetric
Clustered Systems
A cluster

………………….. Like multiprocessor systems, but multiple systems working together.

Asymmetric
Symmetric
Clustered Systems
A cluster

………………..consists of several computer systems (nodes) connected via a network;


each node is typically a multicore system.
Asymmetric
Symmetric
Clustered Systems
A cluster

Bootstrap program is an initial program typically stored in the ……….


(ROM)
RAM
Memory
CPU

For a computer to start running-for instance, when it is powered up or rebooted, it


needs to have the…………….
Bootstrap program
Operating System
Kernel

If several jobs ready to run at the same time…………


CPU scheduling.
Swapping
Virtual memory
Timer

•If processes don’t fit in memory, …………..moves them in and out to run.
CPU scheduling.
Swapping
Virtual memory
‫رمضان كريم‬ with my Best wishes 01062665758 11
Timer

………………………We must ensure that the operating system maintains control


over the CPU.
CPU scheduling.
Swapping
Virtual memory
Timer

……………..is set to interrupt the computer after some time period.


CPU scheduling.
Swapping
Virtual memory
Timer

………….Creating and deleting both user and system processes.


Process Management
Memory Management Activities
File-system Management
Mass-Storage Management

……………………Keeping track of which parts of memory are currently being


used and which process is using them.
Process Management
Memory Management Activities
File-system Management
Mass-Storage Management

……………………Access control on most systems to determine who can access


what
Process Management
Memory Management Activities
File-system Management
Mass-Storage Management

…………………Usually disks used to store data that does not fit in main memory
or data that must be kept for a “long” period of time.
Process Management
Memory Management Activities
File-system Management
Mass-Storage Management

‫رمضان كريم‬ with my Best wishes 01062665758 12


Which of the following instructions should be privileged?
Set value of timer
Clear memory.
Turn off interrupts.
Modify entries in device-status table.
Access I/O device.
All of above

…………After I/O starts, control returns to user program only upon I/O completion.
Synchronous:
Asynchronous
All of the above
Non of the above

………………:After I/O starts, control returns to user program without waiting for
I/O completion:
Synchronous:
Asynchronous
All of the above
Non of the above

…………..connects computers within a room, a building, or a campus.


Local Area Network (LAN)
Wide Area Network (WAN)
Metropolitan Area Network (MAN)
Personal Area Network (PAN)

……………………. usually links buildings, cities, or countries.


Local Area Network (LAN)
Wide Area Network (WAN)
Metropolitan Area Network (MAN)
Personal Area Network (PAN)

…………………..could link buildings within a city.


Local Area Network (LAN)
Wide Area Network (WAN)
Metropolitan Area Network (MAN)
Personal Area Network (PAN)

……………………..between a smartphone and a desktop computer


Local Area Network (LAN)
Wide Area Network (WAN)
Metropolitan Area Network (MAN)
Personal Area Network (PAN)

‫رمضان كريم‬ with my Best wishes 01062665758 13


……………………this environment consisted of PCs connected to a network, with
servers providing file and print services.
Traditional
Network computers
Mobile devices
Client Server

…………………Remote access was difficult, and portability was achieved by use


of laptop computers.
Traditional
Network computers
Mobile devices
Client Server

…………………which are essentially terminals are used in place of traditional


workstations where more security or easier maintenance is desired.
Traditional
Network computers
Mobile devices
Client Server

…………………can also connect to wireless networks and cellular data networks


to use the company’s web portal.
Traditional
Network computers
Mobile devices
Client Server

…………………..These devices share the distinguishing physical features of being


portable and lightweight.
Traditional
Network computers
Mobile devices
Client Server

Contemporary network architecture features arrangements in which server


systems satisfy requests generated by client systems
Traditional
Network computers
Mobile devices
Client Server

………….– available via Internet to anyone willing to pay for the services.
Public cloud
Private cloud
Hybrid cloud
‫رمضان كريم‬ with my Best wishes 01062665758 14
All of the above

………………. – run by a company for the company’s own use.


Public cloud
Private cloud
Hybrid cloud
All of the above

………………….– includes both public and private cloud components.


Public cloud
Private cloud
Hybrid cloud
All of the above

……………..– one or more applications available via the Internet (e.g. word
processor or spreadsheets).
Software as a Service (SaaS)
Platform as a Service (PaaS)
Infrastructure as a Service (IaaS)
All of the above

………………………– a software stack ready for application use via the Internet
(e.g. a database server).
Software as a Service (SaaS)
Platform as a Service (PaaS)
Infrastructure as a Service (IaaS)
All of the above

…………………………….– servers or storage available over Internet (e.g. storage


available for backup use).
Software as a Service (SaaS)
Platform as a Service (PaaS)
Infrastructure as a Service (IaaS)
All of the above

………………………..the user uses a keyboard for typing in text commands in a specific


format with specific options.
Command-Line (CLI):
Graphics User Interface (GUI)
Touch-screen interface

………………………: the most commonly used.


Command-Line (CLI):
Graphics User Interface (GUI)
Touch-screen interface

‫رمضان كريم‬ with my Best wishes 01062665758 15


………………………..: provided by mobile systems such as phones and tablets.
Command-Line (CLI):
Graphics User Interface (GUI)
Touch-screen interface

……………….- The system must be able to load a program into memory and to run that
program, end execution, either normally or abnormally
Program execution
I/O operations
File-system manipulation
Resource allocation
………………….. - A running program may require I/O, which may involve a file or an
I/O device.
Program execution
I/O operations
File-system manipulation
Resource allocation

……………………….. - The file system is of particular interest.


Program execution
I/O operations
File-system manipulation
Resource allocation

……………………..- When multiple users or multiple jobs (processes)


running concurrently (at the same time), resources must be allocated to each of them.
Program execution
I/O operations
File-system manipulation
Resource allocation

………………provide a programming interface to the services provided by the OS.


System calls
Application Programming Interface (API)
All of the above

A programmer accesses an …………….via a library of code provided by the operating


system.
System calls
Application Programming Interface (API)
All of the above

………….Get time or date, set time or date


File management:
Device management:
‫رمضان كريم‬ with my Best wishes 01062665758 16
Information maintenance:
Communications:

………………. Get device attributes, set device attributes


File management:
Device management:
Information maintenance:
Communications:

………………. •Get and set permissions, Allow and deny user access
File management:
Device management:
Information maintenance:
Protection

Source code compiled into object files designed to be loaded into any physical
memory location – a format known as…………….
relocatable object file
Linker
Loader

……………… combines these relocatable object files into single binary


executable file.
relocatable object file
Linker
loader

Must be brought into memory by …………….to be executed:


relocatable object file
Linker
loader

…………….– operating system should be convenient to use, easy to learn,


reliable, safe, and fast
User goals
System goals
All of the above

……………. – operating system should be easy to design, implement, and


maintain, as well as flexible, reliable, error-free, and efficient.
User goals
System goals
All of the above

‫رمضان كريم‬ with my Best wishes 01062665758 17


…………………….The simplest structure for organizing an OS is no structure at
all.
Monolithic Structure
Layered Approach
Microkernels
Modules

………………….Place all of the functionality of the kernel into a single, static


binary file that runs in a single address space.
Monolithic Structure
Layered Approach
Microkernels
Modules

This system is divided into separate, smaller components that have specific and limited
functionality.
Monolithic Structure
Layered Approach
Microkernels
Modules

It’s known as a loosely coupled system


Monolithic Structure
Layered Approach
Microkernels
Modules

……………………..The OS is divided into a number of layers (levels), each built


on top of lower layers. The bottom layer (layer 0), is the hardware; the highest
(layer N) is the user interface.
Monolithic Structure
Layered Approach
Microkernels
Modules

This method structures the OS by removing all nonessential components from the
kernel and implementing them as user-level programs that reside in separate
address spaces.
Monolithic Structure
Layered Approach
Microkernels
Modules

‫رمضان كريم‬ with my Best wishes 01062665758 18


………………….Perhaps the best current methodology for operating-system
design involves using loadable kernel modules (LKMs).
Monolithic Structure
Layered Approach
Microkernels
Modules
True and False
These operating system services are provided for the convenience of the programmer, to
make the programming task easier. T
One of the User interface (UI) is Command-line interface (CLI). T
Graphical user interface (GUI) uses only text commands entering them from keyboard. F
Many operating systems provide only one file system. F
Error detection is one of the main services of the OS. T
Accounting: is to keep track of which users use how much and what kinds of resources. T
Windows and UNIX, treat the command interpreter as a special program that is running
when a job is initiated. T
API to refer to the set of functions available in a platform for application development. T
A Process is a passive entity, such as a file stored on disk F
Mainframe operating systems are designed primarily to optimize utilization of hardware. T
A computer system can be divided into four components: the hardware, the operating
system, the application programs, and the users. T
From the computer’s point of view, an operating system is a resource allocator. T
EEPROM is static type of memory and it cannot be changed. T
Main memory can be viewed as a fast cache for secondary storage. T
At system boot time, the hardware starts in user mode. F
The non-volatile memory is slower than the main memory. T
Process termination requires reclaim of any reusable resources. F
Multiprocessor systems can cost less than equivalent multiple single-processor systems. T
A trap is a software-generated interrupt caused either by: An error, or a system call
request. T
A real-time system does not have fixed time constraints. F
A Mode bit added to computer hardware to indicate if the current process has been
interrupted. F
The main goal that the operating system should satisfy is to be convenient to use, easy to
learn, reliable, safe, and fast. T
Virtual machine enable users to run different version n of OS on the same machine. T

The “read the clock instruction” is not a privileged instruction. T


The “clear memory instruction” is not a privileged instruction. F
The main function of the operating system is to provide an interface between T
hardware and application programs used by users. (T)
The bootstrap program needed for computer start up is stored in RAM. F
The processor contains a set of registers which are used to temporarily store data. T
One of the advantage of cache memory is to reduce the average time to access T
main memory.
‫رمضان كريم‬ with my Best wishes 01062665758 19
An interrupt is a mechanism used by system modules to signal the processor that T
normal processing should be temporarily suspended.
Creation and deletion of user and system processes are not considered as a F
function of operating system.
An operating system is known to be interrupt driven. T
No universally accepted definition of what is part of the operating system. T
Each device controller is not in charge of a particular device type. F
“The one program running at all times on the computer” is the kernel T
Each device controller has a local buffer and a set of special-purpose registers. T
The CPU moves the data between its controlled device(s) and its buffer. F
controller moves data from/to main memory to/from local buffer F
Device controller transfers blocks of data from buffer storage directly to main T
memory without CPU intervention.
Only one interrupt is generated per block, rather than the one interrupt per byte. T
the special-purpose processor run a limited instruction set and also run processes. F
symmetric Multiprocessing use A master–slave relationship F
•A master processor controls the system: schedules and allocates work to the slave T
processors.
Symmetric Multiprocessing (SMP) All processors are peers; master–slave F
relationship exists between processors.
A multicore processor with N cores appears to the operating system as N standard T
CPUs.
-core design with four cores on the same processor chip F
•Each core has its own register set, as well as its own local cache, often known as T
a level 1, or L1, cache.
symmetric clustering: One machine is in hot-standby mode while the other is F
running the applications.
Asymmetric clustering: Two or more hosts (nodes) are running applications and F
are monitoring each other.
programs must be in main memory (also called random-access memory, or RAM) T
to be executed.
Read-only memory, ROM, can be changed F
Caches have unlimited size F
Most systems have one or more high-speed data caches in the memory hierarchy. T
Multiprogramming decreases CPU utilization by organizing jobs so that the CPU F
always has one to execute.
One of The disadvantages of multiprocessors is increase throughput F
Memory Management Functions means Management of primary storage T
The OS keeps several processes in memory simultaneously. T
When a user code is running mode bit = 0 is “user”. F
When a kernel code is executing mode bit = 1 is “kernel”. F
When a process executes, it typically executes for only a long time before F
it either finishes or needs to perform I/O.
Having several processes in memory at the same time don’t requires F
‫رمضان كريم‬ with my Best wishes 01062665758 20
some form of memory management.
Process termination requires reclaim of any reusable resources. T
Multi-threaded process has one program counter specifying location of F
next instruction to execute.
single-threaded process has one program counter per thread. F
Protection and security require the system to be able to distinguish among T
all its users, to determine who can do what
Security – any mechanism for controlling access of processes or users to F
resources defined by the OS.
Protection– defense of the system against internal and external attacks F
Virtualization – OS natively compiled for CPU, running guest OSes also T
natively compiled.
Servers responding to requests generated by clients. T
Peer-to-Peer: does not distinguish clients and servers T
Real-Time Embedded Systems They tend to have very specific tasks T
A real-time system has well-defined, fixed time constraints. T
A real-time system they have little or no user interface. T
A command-line interface or a mouse-and-keyboard system is practical F
for most mobile systems, smartphones and handheld tablet
systems can’t include both CLI and GUI interfaces F
Debugger is a system program for determining errors or bugs, single step T
execution.
An Arduino is considered a mult-tasking system, as only one sketch can F
be present in memory at a time
the Arduino provides no user interface beyond hardware input sensors. T
To start a new process, the shell executes a fork() system call T
Main method of windows body in assembly language. F
Early OSes in C F
Advantages of use higher-level language are reduced speed and F
increased storage requirements.
The Linux kernel is monolithic in that it runs entirely in kernel mode in a T
single address space
disAdvantages of Monolithic are speed and efficiency kernels do have a F
distinct
advantages of Monolithic are They are difficult to implement and extend F
The monolithic approach is often known as a tightly coupled system T
Mach OS is an example of microkernel T
Hybrid system combines multiple approaches (structures) to address T
performance, security, usability needs.
OS failure can generate crash dump file containing kernel memory. T
Tracing tools collect data for a specific event, such as steps involved in a T
system call invocation.

‫رمضان كريم‬ with my Best wishes 01062665758 21

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy