Midterm Flashcards
What does the operating system do?
The OS abstracts the internal computer architecture and the OS manages and transparently handles all of the HW resources.
‘Top Down’ view is associated with?
Abstraction (provides a clean and abstract set of resources
‘Bottom-up’ view is associated with?
Management (Mangages HW resources)
What does the Disk Driver do?
Deals with the hardware and provides an interface to read and write disk blocks
The OS interacts with the device via
Device Driver
What is multiplexing
Sharing resources in two different ways: in time and in space
What was Generation 0 called
Mechanical Era
What’s Generation 1
(1945-55) which consisted of the Electromechanical Relays & Vacuum Tubes Era
What’s Generation 2
(1955-65) which consisted of the Transistors & Batch Systems Era
What’s Generation 3
(1965-1980s) which brought solid-state IC revolution and Multiprogramming
What’s Generation 4
(1980-1990) which brought “Personal” Computers.
What’s Generation 5
(1990-Present) which brought Mobile Computers
Which generation was the ENIAC created
Generation 1
Where was the transistor invented?
AT&T’s Bell Labs.(Generation 2)
Leading to the first class of general-purpose computers known as
Mainframe
Mainframe?
Is a computer system that is primarily used by large organizations or institutions for bulk data processing and large-scale transactions
What was the batch system analogous to
Pipelining
Job input (Generation 2)
Each user’s “job” was specified by a set of input punch cards
What did the punch cards represent
The cards represented the user’s ‘program’
With the 360 what did it bring fourth
Multiprogramming,Dynamic Address Translation (DAT),Out-of-Order Instruction Execution
Time-sharing
allows the mainframe to be ‘multiplexed’ so that multiple users could issue commands interactively while the system mostly sat idle
The principal components of any computer system consist of
CPU, cache memories + MMU, Memory Subsystem (aka primary storage, I/O Devices, long term secondary storage, bus structure
I/O is composed of?
a physical device and a device controller
bus structure is?
connect all the computer’s subsystems.
What’s the brain of the Comptuer
CPU
What does the CPU do
F-D-X Fetch Decode Xecute in cycles
Two predominant types of instruction encoding and sets?
RISC & CISC
The Program Counter (PC) is?
A register, which points to the next instruction to be fetched
Stack Pointer (SP) ?
points to the top-of-stack
Frame Pointer (FP)
An additional register dedicated for accessing elements within the current frame. Works with Stack pointer
Register file (RF)
A set of temporary working (main) registers
RF + SP + PC = ??
Execution Context
Program Status Word (PSW)
This register contains the condition code bits, which are set by comparison instructions
Execution Context
the internal data by which the OS is able to supervise and control the process
Spooling?
Whenever a running job finished, the operating system could load a new job from the disk into the now-empty partition and run it is called what?
Has unrestricted access to all computing resources
Kernal Mode
Has very restricted access to computing resources
User Mode
SMT(Simultaneous Multithreating/Hyperthreading does parrelism
No actually it just looks like it
TRAP instructions are
The operating system calls functions
Voluntary switches between User and Kernal modes occur…
often occur as a result of executing a special instruction called a ‘TRAP’ instruction.
Involuntary changes in operating mode occur as a result of either
synchronous (aka exceptions) or asynchronous (aka Interrupts) events,
What type event is the I/0 interupt
Async
the time it takes the ‘head’ to slide towards the track containing the data
Seek Time
The time for the ‘head’ to find its way to the beginning of the desired sector
Latency
The amount of digital data that’s moved from one place to another in a given time
Transfer Rate
This counts the time from when the data is requested until its fully ‘retrieved’
Access Time
this is much FASTER overall access times and more energy-efficient than a HDD
Solid State Drive
This is component that the CPU actually interacts with
Device Controller
How does the Device controller interact with the CPU
As interface between the computer system (operating system) and I/O devices
Like a ‘communication system’ that transfers data between system components and subsystems inside a computer
Bus
address bus + data bus + control bus = ??
computer system
is a program in execution?
Process
Allows processes to communicate or ‘sync up’
Interprocess Communication (IPC)
this determines the method of how files can be structured, represented, stored and retrieved UI
File System
Makes up Terminal
I/O + Shell
How applications ask the OS to do things in its behalf
A ‘system-call’ Interface (I/F)
ALL memory segments/chunks/regions which the process ‘owns’ and that it can read/write from/to
Address space
(interrupts and halts) the current proces
Preempts
A finite amount of time in which it is allowed to run
time quantum
The part of the OS responsible for making these decisions
OS scheduler
The OS maintains a list of all ‘ready processes’ in a special data structure
Process Table
INIT and has a PID of
1
Is the ‘view’ that each process has about its address space
Virtual memory
an abstraction of data and/or devices, as well as its representation and device-dependent details
File
UID
User ID
UID is
a person who has access to a system
GID stands for
Group ID
GID is
A collection of files that are associated with each other
PPID stands for
Parent Process ID
What does a process always have
PPID and PID
PID is
Process ID
$ cat < myfile.txt | sort > myfile_sortex.txt is an example of
command pipeline
consists of a series of ‘wrapper functions’ (written in C) that contain architecture-dependent assembly
System-call interface (SCI).
This kernel runs the entire OS as a single program in kernel mode in a singe address space
monolithic kernel.
this kernel attempts to place as little as possible in the kernel
microkernel
The microkernel
pushes as much as it can out into ‘userland’.
The layer kernel
breaks up the operating system into different layers and retains much more control on the system
This model distinguishes between two types of process client processes and server processes.
Client-server Model
This kernel allocates direct H/W resources to programs. Manages allocated resources to prevent conflicts
Exokernel
What does fork() do
Create a new process
When a child process terminates normally it becomes a
Zombie
single sequential flow of activities being executed in a processis called?
Thread
switching from one program to another
Context Switch
What is N:1 Implementation
Single kernel thread is available to work on behalf of each user process
What is 1:1 Implementation
One user-space thread assigned Kernel resource
What is N:M Implementation
Each kernel resource can be associated with multiple user-level threads
Scheduler Activations is an example of
is an example of “many-to-many” N:M (Hybrid) kernel-mapping implementation.
Scheduler Activation is
provide kernel-level thread functionality with user-level thread flexibility and performance
The signal that is given to the thread library From kernel-space to user-space
Upcall
The arrival of a message causes the system to create a new thread to handle the message is called
Pop Up Thread
create_global()
Creates a global variable that will be stored by way of a ‘pointer’ in the heap
set_global()
To set its value.
thread-local globals
‘global’ variables whose ‘scope’ is limited to the thread.
read_global()
To obtain the pointer of the global var
multiple invocations of the procedure can safely be carried out is this type of function
Reentrant
when only ONE line of execution can be within the procedure is this type of function
Non-reentrant
A situation that can occur when a low-priority task is holding a resource such as a semaphore for which a higher-priority task is waiting
priority inversion problem
‘integer variable’ to count the number of pending ‘wake-ups’ for future use
semaphore
a synchronization mechanism that has two states ‘locked’ (1) or ‘unlocked’ (0)
mutex
This method of interprocess communication uses two primitives, send and receive
Message Passing
A block at the end of a phase to make all processes wait until all processes are done
Barrier
This type of resource can be ‘forcibly’ taken away from the process with no ill effects
Preemptible
This type of resource CANNOT be taken away safely w/o causing some potential failure.
Non-preemptible
This is when no process can can operate due to a shared resource not being available
Deadlock
Conditions for Resource Deadlock
- Mutal Exclusion
- Hold-and-Wait
- No-preemption
- Circular Wait Condition
Do all four conditions for deadlock need to be present for a deadlock to occur
If one item is absent, NO resource deadlock is possible.
What algorithm just tells you to ignore the problem
The Ostrich Algorithm
What ways can the OS recover after the detection of a deadlock
- Preemption
- Recovery by voluntarily being ‘nice’
- Recovery through ‘Rollback’
- Process Killing
What is ‘Rollback’
‘checkpoint’ mechanism for processes which writes information about a process on a file so that it can
be restarted again
When to Look for Deadlocks?
Keep an ‘eye’ on CPU utilization and check when it falls below a certain threshold.