Professional Documents
Culture Documents
When interacting with a device controller, the CPU can wait for a response by
polling describe it?
Problem with polling: The CPU is busy waiting for some event to happen. CPU utilization
will be low.
Solution: Interrupts.
Device controller informs CPU that it has finished its operation by causing an interrupt
Explain Non-Uniform Memory Access (NUMA) System and list the Pros and
Cons ?
CPUs are connected by a shared system interconnect, so that all CPUs share one physical
address space.
The advantage: Fast access of a CPU to its local memory with no contention over the
system interconnect. So, NUMA systems can scale more effectively as more processors are
added.
The drawback: Increased latency when a CPU accesses remote memory across the
system interconnect (slowing down performance).
What is the functional difference between mobile devices and a “traditional” laptop?
1. Today, mobile systems are used not only for e-mail and web browsing. Extra feature –
more OS features (GPS, accelerometers, and gyroscopes) allow new types of apps like
augmented reality.
2. The memory capacity and processing speed of mobile devices are more limited than
those of PCs.
3. Mobile devices use IEEE 802.11 wireless, or cellular data networks for connectivity.
List and explain Operating System Services provides functions that are helpful
to the user?
1. User interface - Almost all operating systems have a user interface (UI)
2. Program execution - The system must be able to load a program into memory and to run
that program, end execution, either normally or abnormally
3. I/O operations - A running program may require I/O, which may involve a file or an I/O
device.
4. File-system manipulation - The file system is of particular interest.
5. Communications – Processes may exchange information
6. Error detection – OS needs to be detecting and correcting errors constantly. OS needs to
be constantly aware of possible errors
Some computer systems use a multistage boot process list and explain this steps?
• When the computer is first powered on, a small boot loader located in nonvolatile
firmware known as BIOS is run
• This initial boot loader usually does nothing more than load a second boot loader, which
is located at a fixed disk location called the boot block
• The program stored in the boot block may be sophisticated enough to load the entire
operating system into memory and begin its execution.
Define PCB?
• Each process is represented in the OS by a process control block (PCB) (also called a task
control block). In brief, the PCB simply serves as the repository for all the data needed to
start, or restart, a process, along with some accounting data.
There are Two common types of pipes used on both UNIX and Windows
systems?
1. Ordinary pipes – can not be accessed from outside the process that created it. Typically,
a parent process creates a pipe and uses it to communicate with a child process that it
created.
2. Named pipes – can be accessed without a parent-child relationship.
Define Round Robin (RR) Scheduling and list it’s pros and cons?
The round-robin (RR) scheduling algorithm is similar to FCFS scheduling, but preemption
is added to enable the system to switch between processes. The RR scheduling algorithm is
thus preemptive.
Advantages:
• better response. Fair allocation of CPU across processes.
• No starvation.
• The RR is designed especially for timesharing systems.
Disadvantages:
• The average waiting time under the RR policy is often long.
• Typically, higher average turnaround than SJF.
………………………………..Controls the hardware and coordinates its use among the various
application programs for the various users.
Hardware
Operating system
Application programs
Users
…………………: Word processors, compilers, web browsers, database systems, video games,
Hardware
Operating system
Application programs
Users
The one program running at all times on the computer” called the…………………, part of the
operating system.
Kernel
Operating system
System program
Application program
…………………..ships with the operating system, but not part of the kernel
Kernel
Operating system
System program
Application program
The …………………… moves the data between its controlled device(s) and its buffer.
device controller
device driver
…………………..transfers blocks of data from buffer storage directly to main memory without
CPU intervention.
device controller
device driver
Each device controller type has an operating system ………………..to manage it.
device controller
device driver
……………………. are part of the operating system, but not necessarily part of the OS kernel.
device controller
device driver
The ……………………………… manages I/O and provides uniform interface between the device
controller and kernel.
device controller
device driver
A table of pointers to interrupt routines can be used instead to provide the necessary
speed.
Interrupts
interrupt handler
Interrupt Vector Table
………………..hold the addresses of the interrupt service routines for the various devices.
Interrupts
interrupt handler
Interrupt Vector Table
…………………… They are slow enough and large enough that they are used only for special
purposes.
Primary storage
Secondary storage
Tertiary storage
The …………….is the component that executes instructions and registers for storing data
locally.
Core
arithmetic-logic unit (ALU)
cluster
An ……………………..is the part of a computer processor (CPU) that carries out arithmetic and
logic operations.
Core
arithmetic-logic unit (ALU)
cluster
………………each processor performs all tasks (including OS functions and user processes).
Asymmetric Multiprocessing
Symmetric Multiprocessing (SMP)
Asymmetric Clustering
Symmetric Clustering
………………….Two or more hosts (nodes) are running applications and are monitoring each
other.
Asymmetric Multiprocessing
Symmetric Multiprocessing (SMP)
Asymmetric Clustering
Symmetric Clustering
………………………….Starts system daemons which run the entire time the kernel is running
Bootstrap program
Kernel
Interrupt
Once the ………………………is loaded and executing, it can start providing services to the
system and its users.
Bootstrap program
Kernel
Interrupt
…………………..A logical extension of Batch systems – the CPU switches jobs so frequently that
users can interact with each job while it is running, creating interactive computing.
Multiprogramming
job scheduling
Multitasking (Timesharing)
……………………Having several processes in memory at the same time requires some form of
memory management.
Multiprogramming
job scheduling
Multitasking (Timesharing)
……………………: Multiple I/O requests may arrive by different processes and only one I/O
request can be served at a time by the disk controller.
Disk scheduling
Mounting
Caching
…………………a file system (e.g. NTFS or FAT) is making the file system available for use by the
system and its users.
Disk scheduling
Mounting
Caching
With My Best Wishes Eng Ihap EL-Galaly 01062665758 Page 27
………………… is an important principle, performed at many levels in a computer (in
hardware, operating system, software).
Disk scheduling
Mounting
Caching
………………… (a buffer that holds output for a device, such as a printer, that cannot accept
interleaved data streams)
buffering
caching
spooling
……………………If a computer system has multiple users and allows the concurrent execution
of multiple processes, then access to data must be regulated.
Protection
Security
………………………..A system can have adequate protection but still be prone to failure and
allow inappropriate access.
Protection
Security
………………………………then associated with all files, processes, and threads of that user to
determine access control.
User ID
Group identifier (group ID)
Privilege escalation
…………………..allows set of users to be defined and controls managed, then also associated
with each file, process, and thread.
User ID
Group identifier (group ID)
Privilege escalation
……………….. created a new virtualization technology in the form of an application that ran
on Windows.
Virtualization
VMware
virtual machine manager (VMM).
Windows was the host operating system, and the VMware application was the………………….
Virtualization
VMware
virtual machine manager (VMM).
The ……………………………… runs the guest operating systems, manages their resource use,
and protects each guest from the others.
Virtualization
VMware
virtual machine manager (VMM).
A …………………is an operating system that provides features (such as file sharing) across the
network, along with a communication scheme that allows different processes on different
computers to exchange messages.
network operating system
distributed operating system
Most users once had a single computer with a slow modem connection to the office, the
Internet, or both…………………
Traditional
Mobile
Client Server
Peer-to-Peer
With …………………….Remote access was difficult, and portability was achieved by use of
laptop computers.
Traditional
Mobile
Client Server
Peer-to-Peer
………………………..does not distinguish clients and servers: Instead all nodes are considered
the same.
Traditional
Mobile
Client Server
Peer-to-Peer
Examples of peer-to-peer computing include Napster and Gnutella, Voice over IP (VoIP)
such as Skype…………………
Traditional
Mobile
Client Server
Peer-to-Peer
…………………is a type of computing that delivers computing, storage, and even applications
as a service across a network.
Cloud Computing
Real-Time Embedded Systems
Mobile
Client Server
……………………..These devices are found everywhere, from car engines and manufacturing
robots to optical drives and microwave ovens.
Cloud Computing
Real-Time Embedded Systems
Mobile
Client Server
……………………….. Processing must be done within the defined constraints, or the system will
fail.
Cloud Computing
Real-Time Embedded Systems
Mobile
Client Server
………………………. functions correctly only if it returns the correct result within its time
constraints.
Cloud Computing
Real-Time Embedded Systems
Mobile
Client Server
Systems that control scientific experiments, medical imaging systems, industrial control
systems, and certain display systems………………….
Cloud Computing
Real-Time Embedded Systems
Mobile
Client Server
Three most common APIs are ………………for Windows systems, …………………for systems
(including virtually all versions of UNIX, Linux, and Mac OS X
Windows API, POSIX API
POSIX API ,Windows API
Windows API, Windows API
POSIX API, POSIX API
Source code compiled into object files designed to be loaded into any physical memory
location – a format known as……………………..
relocatable object file
Linker
Loader
dynamically linked libraries
The …………………. then loads the specified program into memory using the address space of
the newly created process.
relocatable object file
Linker
Loader
dynamically linked libraries
…………………. are loaded as needed, shared by all that use the same version of that same
library
relocatable object file
Linker
Loader
dynamically linked libraries
………………….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
The Linux kernel is ………………….. in that it runs entirely in kernel mode in a single address
space
Monolithic Structure
Layered Approach
Microkernels
Modules
……………….. is often known as a tightly coupled system because changes to one part of the
system can have wide-ranging effects on other parts.
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
……………………….The approach is also similar to the microkernel approach in that the primary
module has only core functions and knowledge of how to load and communicate with other
modules
Monolithic Structure
Layered Approach
Microkernels
Modules
Linux uses loadable kernel modules, primarily for supporting device drivers and file
systems………………………
Monolithic Structure
Layered Approach
Microkernels
Modules
……………….it is more efficient, because modules do not need to invoke message passing in
order to communicate.
Monolithic Structure
Layered Approach
Microkernels
Modules
…………… section containing memory dynamically allocated during program run time.
Text
Data
Heap
Stack
…………….The process is waiting for some event to occur (such as an I/O completion or
reception of a signal).
New
Running
Waiting:
Ready
Terminated
An …………….is one that spends more of its time doing I/O than it spends doing
computations.
I/O-bound process
A CPU-bound process
All of the above
Non of the above
…………………, in contrast, generates I/O requests infrequently, using more of its time doing
computations.
I/O-bound process
A CPU-bound process
All of the above
Non of the above
With My Best Wishes Eng Ihap EL-Galaly 01062665758 Page 41
…………may execute for only a few milliseconds before waiting for an I/O request.
I/O-bound process
A CPU-bound process
All of the above
Non of the above
……………..– set of all processes residing in main memory, ready and waiting to execute. This
queue is generally stored as a linked list.
Ready queue
Wait queues
All of the above
Non of the above
The process could be removed forcibly from the core, as a result of an interrupt or having
its time slice expire, and be put back in the …………………….
Ready queue
Wait queues
All of the above
Non of the above
The process could issue an I/O request and then be placed in an I/O ……………………………
Ready queue
Wait queues
All of the above
Non of the above
With My Best Wishes Eng Ihap EL-Galaly 01062665758 Page 42
The process could create a new child process and then be placed in a …………………… while it
awaits the child’s termination.
Ready queue
Wait queues
All of the above
Non of the above
…………………….amount of CPU used, clock time elapsed since start, time limits, account
numbers, job or process numbers.
Memory-management information
Accounting information
I/O status information
…………………..of control allows the process to perform only one task at a time.
single thread
multiple threads
Most modern operating systems have extended the process concept to allow a process to
have …………………of execution and thus to perform more than one task at a time.
single thread
multiple threads
…………………….is especially beneficial on multicore systems, where multiple threads can run
in parallel.
single thread
multiple threads
If a process has ……………………… of control, it can perform more than one task at a time.
single thread
multiple threads
……………………..It shares with other threads belonging to the same process its code section,
data section
single thread
multiple threads
When CPU switches to another process, the system must do the following via a …………………
context switch
Context
Dispatch latency
……………………..time it takes for the dispatcher to stop one process and start another
running.
context switch
Context
Dispatch latency
……………………system call used after a fork() to replace the process ’ memory space with a
new program.
fork()
exec()
wait()
exit()
Process executes last statement and then asks the operating system to delete it using the
…………….system call.
fork()
exec()
wait()
exit()
Parent may terminate the execution of children processes using the ……………..system call.
abort()
fork()
exec()
wait()
A new process is created when Chrome is started. Only one …………………. is created.
Browser process
Renderer process
Plug-in process
Under…………….., each process that wants to communicate must explicitly name the
recipient or sender of the communication.
direct communication
indirect communication
Blocking communication
Non-blocking communication
…………………A Link is established automatically between every pair of processes that want
to communicate. The processes need to know only each other’s identity to communicate.
direct communication
indirect communication
Blocking communication
Non-blocking communication
………………-- the sender process is blocked until the message is received by the receiving
process or by the mailbox.
Blocking send
Blocking receive
non-blocking send
Non-blocking receive
……………..-- the sender process sends the message and continue (i.e. resumes operation).
Blocking send
Blocking receive
non-blocking send
Non-blocking receive
when the ……………….invokes the blocking receive() call, it blocks until a message is available.
Producer
Consumer
All of the above
Non of the above
……………..: no messages are queued on a link. Sender must wait for receiver
Zero capacity
Bounded capacity
Unbounded capacity
All of the above
…………………: The queue has finite length of n messages, at most n messages can reside in it.
Sender must wait if link is full.
Zero capacity
Bounded capacity
Unbounded capacity
All of the above
It can be faster than message passing, since message-passing systems are typically
implemented using system calls and thus require the more time-consuming task of kernel
intervention.
Shared memory
Message passing
All of the above
Non of the above
item next_produced;
while (true) {
/* produce an item in next produced */
while (((in + 1) % BUFFER_SIZE) == out)
; /* do nothing */
buffer[in] = next_produced;
in = (in + 1) % BUFFER_SIZE;
}
Producer process in shared Memory
Consumer process in shared Memory
Producer process in Message Passing
Consumer process in Message Passing
item next_consumed;
while (true) {
while (in == out)
; /* do nothing */
next_consumed = buffer[out];
out = (out + 1) % BUFFER_SIZE;
/* consume the item in next consumed */
}
Producer process in shared Memory
Consumer process in shared Memory
Producer process in Message Passing
Consumer process in Message Passing
message next_produced;
while (true) {
/* produce an item in next_produced */
send(next_produced);
}
Producer process in shared Memory
Consumer process in shared Memory
Producer process in Message Passing
Consumer process in Message Passing
…………………….is bidirectional.
Ordinary pipes
Named pipes
Both UNIX and Windows systems support …………………….., although the details of
implementation differ greatly.
Ordinary pipes
Named pipes
Assuming the above process being scheduled with the SJF scheduling algorithm.
a) The waiting time for process P1 is 3ms
b) The waiting time for process P1 is 0ms
c) The waiting time for process P1 is 16ms
d) The waiting time for process P1 is 9ms
Assuming the above process being scheduled with the SJF scheduling algorithm. The
average waiting time is
a) 6ms
b) 6.5ms
c) 7ms
d) 7.5ms
Assuming the above process being scheduled with the SJF scheduling algorithm. The
average turnaround time is
a) 13 ms
b) 13.5ms
c) 14 ms
d) 14.5ms
A process is in the “running” state, then an interrupt occurs then the process moves to the
following state:
New
Waiting
Ready
Terminated
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.
With My Best Wishes Eng Ihap EL-Galaly 01062665758 Page 52
In a system employing message passing, when a message is sent to a shared temporary
data structure, this general approach is known as:
a. Indirect communication.
b. Direct communication.
c. Blocking.
d. None of the above.
The interval from the time of submission of a process to the time of completion is
the…………………..
Turnaround time
Waiting time
Response time
……………..is the sum of the periods spent waiting in the ready queue, executing on the CPU,
and doing I/O.
Turnaround time
Waiting time
Response time
………………….– the amount of time a process has been waiting in the ready queue.
Turnaround time
Waiting time
Response time
…………………..– the amount of time it takes from when a request was submitted until the
first response is produced.
Turnaround time
Waiting time
Response time
……………….it gives the minimum average waiting time for a given set of processes.
First come first service
Shortest job first
Round Robin
Priority scheduling
scheduling algorithm is similar to FCFS scheduling, but preemption is added to enable the
system to switch between processes.
First come first service
Shortest job first
Round Robin
Priority scheduling
………………… A small unit of time, called a time quantum or time slice, is defined.
First come first service
Shortest job first
Round Robin
Priority scheduling
……………………algorithm will allow the currently running process to finish its CPU burst.
A preemptive SJF
A non-preemptive SJF
All of the above
Non of the above