Operating System
215 flashcards · Other · by Minh Đức
To which computer sciences branches does OS belong to ?
practical CS
Is kernel implemented as system processes?
no
Are there OS and programming languages in the 1st generation of CS? So how were they be implemented?
1.No 2.via circuits in patch bays
what is batch processing ? what are the objectives of batch processing?
acceleration through automation maximize CPU utilization
why batch processing cause an acceleration effect
because of the automation, no time is wasted
What is the condition of batch processing before a task can be executed?
Each program needs to be provided with all input data before the execution begin
Which tasks are well suited for batch processing ?
routine tasks
batch processing is interactive or non-interactive
non - interactive
Application of batch processing which is popular today?
batch files, shell scripts
What is spooling?
removes I/O workload from CPU by adding more hardwares
what is the objective of time sharing
fair distribution of computing time among users
describe how time sharing distributes computing time among processes
using time slices
the name of quasi-parallel program or process execution is multitasking
Multiple users can work interactively and simultaneously with a computer via terminals
Describe multi-user operation
Describe what scheduling is
Automatic creation of an execution plan (schedule), which is used to allocate limited time and resources to users or their processes
Describe what swapping is.
Process of storing and removing data to/from main memory from/into background memory (HDDs/SSDs).
describe how memory protection works
the memory is split and running programs are separated from each other
purpose of memory protection?
crash and bug of one program will not affect other programs and the system
what is single tasking
at any given moment, only one program is executed
what is multitasking
many programs can be executed at the same time
objective of multitasking?
minimizing response time
drawbacks of multitasking
overhead
what is half multi-user OS
different users can work with the computer one after the other, but the data and processes of different users are protected from each other
What is the difference between 8 bit, 16 bit, 32 bit and 64 bit operating systems?
the number of bits indicate the memory address length that the OS works with internally
what are essential criteria of real time operating system
response time meet deadlines
2 types of OS
hard real time OS soft real time OS
what is kernel
is the interface to the hardware
what does kernel contain
essential functions of the OS
what is kernel mode
functions inside the kernel, have full access to the hardware
what is user mode in kernel
functions outside the kernel, can only access their virtual memory
structure of monolithic kernel
monolithic kernel contains memory management hardware management process management file systems interprocess communication
advantages of monolithic kernel
few context switching => better performance grown stability
disadvantages of monolithic kernel
crashed kernel component can't be restarted separately => entire system crash kernel extensions are high development effort
structure of micro kernel
the kernel only contain essential functions for memory management and process management functions for process synchronization and interprocess communication essential drivers Device drivers, file systems, and services (servers) are located outside the kernel and run equal to the user applications in user mode.
structure of a hybrid kernel
is tradeoff between monolithic kernels and microkernels. they contain for performance reasons component, which are never inside the microkernel
advantage of microkernel
best stability and security components can be exchanged easily
disadvantages of microkernel
slower development of new microkernel is complex task
Describe the structure of a thin kernel
the kernel runs as a process with lowest priority, the real-time kernel does the scheduling, and real-time processes have the highest priority => minimum reaction time(latency)
Describe the structure of a nano kernel.
same with real-time kernel, but any number of other OS's kernels may be executed
advantages and disadvantages of hybrid kernel
advantages: better performance as with microkernel (fewer context switching) better stability as with monolithic kernel disadvantages: development of new hybrid kernel is very complex
which kernel does GNU HURD implement
microkernel
which kernel does Linux implements
monolithic kernel
MAC OSX, Window NT4,...... implements
hybrid kernel
What means Single System Image?
Users and their applications do not know that the services they use run on multiple computers
what are the special things about von neumann computer?
programs and data are binary coded they are both stored in the memory
According to the Von Neumann Architecture, the memory is located outside the CPU
inside or outside
Three components of the CPU?
arithmetic logic unit, control unit, memory,
Which three digital bus systems contains each computer system according to the Von Neumann architecture?
Control bus, address bus, data bus
what does the control bus do
Transmits commands (e.g. read and write requests) from the CPU and returns status signals from the I/O devices
what does the address bus do
Transmits memory addresses.
what does the data bus do
Transmits data between CPU, main memory and I/O devices.
What is the Front Side Bus (FSB)?
It is the bus between CPU and chipset. It contains the address bus, data bus and control bus.
What are the two components of the chipset?
north bridge and south bridge
functionality of 2 components of the chipset?
The Northbridge is used for the connection of main memory and graphics card(s) with the CPU. It is located close to the CPU for rapid data transfer. The Southbridge is used for „slow“ connections like Ethernet, SATA and USB.
some other bus systems
parallel bus and serial bus
Which two groups of Input/Output devices for computer systems are distinguished according to their minimum transfer unit?
Character devices and block devices
explain about Character devices
on arrival/request of each single character, communication with the CPU always takes place.
explain about block devices
Data transfer takes place only when an entire block exists.
example for Character devices
Mouse, keyboard, printer, terminal, magnetic tape. .
example for block devices
HDD, SSD, CD/DVD drive, floppy drive. .
Name three possible ways for processes to read data from Input/Output devices.
Busy waiting Interrupt-driven Direct Memory Access (DMA)
benefit and a drawback of busy waiting
Benefits: No additional hardware required Drawbacks: Causes CPU workload, slows down simultaneous processing of multiple processes
benefit and a drawback of interrupt-driven
Benefits: The CPU is not blocked, allows the simultaneous execution of multiple processes – Drawbacks: Additional hardware (interrupt controller) is required
benefit and a drawback of DMA
Benefits: Reading data causes no CPU workload, simultaneous execution of multiple processes is not slowed down Drawbacks: Additional hardware (DMA controller) is required
Name 3 mechanic digital data storages
Punched tape, Punch card, CDs/DVDs (pressing)
Name two rotating magnetic digital data storages.
Hard Disk Drive, Drum memory, Floppy Disk,....
Name two non-rotating magnetic digital data storages.
Magnetic-core memory, Magnetic tape, Magnetic stripe card,...
Name four benefits of data storage without moving parts compared with data storage with moving parts.
Lower power consumption, lesser waste heat, mechanical robustness, no noise generation.
What is random access?
The media does not need to be searched sequentially from the start – such as with magnetic tapes – to locate a specific location (file)
Name one non-persistent data storage.
Main-memory (DRAM)
Which category of computer storages can the CPU access directly?
primary storage
Which category of computer storages can the CPU only access via a controller ?
secondary and tertiary storage
example for each category of computer storages primary storage secondary storage tertiary storage
primary storage : register, cache, main memory secondary storage: HDD, SSD tertiary storage: CD/DVD drive, magnetic tape
Name the two categories of tertiary storage.
Near-line storage and off-line storage
describe 2 categories of tertiary storage
Near-line storage: automatically and without human intervention connected to the system (e.g. tape library). Off-line storage: Media are stored in cabinets or storage rooms and must be connected manually to the system.
Name the two basic cache write policies.
Write-Through and Write-Back.
With which cache write policy may inconsistencies occur?
write-back
With which cache write policy may performance slower?
write-through
With which cache write policy that the dirty bits is used?
write back
For what reason are dirty bits used?
For each page inside the cache, a dirty bit specifies whether the page was modified.
What are tracks in HDD
The disc surfaces are magnetized in circular tracks by the heads.
What are sectors (= blocks) in HDDs?
Sectors are the smallest addressable units of HDDs, tracks are divided into logical units (segments of a circle),
What are cylinders in HDDs
All tracks on all disks at a specific arm position are part of a cylinder
What are clusters in HDDs
Clusters are groups of sectors with a fixed size, In modern operating systems, clusters are the smallest addressable unit of HDDs.
Why is it impossible to improve the performance (especially the latency) of HDDs infinitely?
HDDs contain moving parts => physical limitations
Which factors influence the access time of HDDs and describe it?
Average seek time : time for the arm to get to the desired track Average rotational latency time: time for the disk to rotate so that the desired sector is under the head
size of a sector in HDD
512 bit
why do erase and write operations on SSDs do more damage than the read operation?
SSD write data to entire pages and erase data on entire blocks
What is the objective of wear leveling algorithms?
Wear leveling algorithms evenly distribute write operations
Name an advantage and a drawback of NOR memory
benefits: random access for read and write operations drawbacks: more complex, more power consumption
Name an advantage and a drawback of NAND memory
Benefit: –Lesser data lines – Lower manufacturing costs compared with NOR flash memory drawbacks: no random access, read and write are carried out on entire pages, blocks
Which RAID levels improve the data transfer rate for write?
Raid 0
Which RAID levels improve the reliability
Raid 1
How many drives are allowed to fail in a RAID 0 array without data loss?
none
How many drives are allowed to fail in a RAID 1 array without data loss?
1
How many drives are allowed to fail in a RAID 5 array without data loss?
1
Can RAID array be used to replace the regular backup of important data
no! because raid is not backup replacement, it is just used for data redundancy
Why is it not useful to store all parity information on a single drive, but to distribute the parity information on all drives?
Each write operation on the RAID causes write operations on the dedicated parity drive ⇒ bottleneck.
What is the net capacity of a RAID 0 array?
The net capacity is n, if n is the number of drives.
What is the net capacity of a RAID 1 array?
The net capacity is the capacity of the smallest drive.