Operating System Flashcards
What is an operating system? What is software? types of software, explain it? What type is OS?
OS is an interface between hardware and software.
Software is tested programs + documentation.
User - > Application software -> System software -> hardware.
OS is system software.
What are the functions of OS? Explain them. The goal of OS?
- Resource management
a. CPU: process management (scheduling)
b. Memory management (RAM).
c. Storage Management (Hard Disk): File System.
d I/O devices. - Security and protection.
Goal: Efficiency and Convenience.
Types of Interfaces?
GUI : Graphical: System call.
CUI: Character: System command.
Types of OS and explain them
- Batch process: Non interactive systme, operator needed.
during loading unloading I/O CPU is idle. - Multi programming OS. [non premptive]
- Multitasking OS or timesharing or Multi prog w round robin or fair share.
based on time quantum. Each task gets an equal opportunity. - Multiprocessing OS. [ more than one 1 CPU]
- Real time. [ soft or hard]
Response time of a job:
It is the length of time from the release time of a job to the instant when it finishes.
Absolute and relative deadline?
The maximum allowable response time of a job is called its relative deadline.
The absolute deadline of a job is equal to its relative deadline plus its release time.
Active and passive resources?
Identical and heterogeneous resources?
Processors are also known as active resources. They are essential for the execution of a job. A job must have one or more processors in order to execute and proceed towards completion. Example: computer, transmission links.
Resources are also known as passive resources. A job may or may not require a resource during its execution. Example: memory, mutex
Two resources are identical if they can be used interchangeably else they are heterogeneous.
Reference model of the real-time system:
Our reference model is characterized by three elements:
A workload model: It specifies the application supported by the system.
A resource model: It specifies the resources available to the application.
Algorithms: It specifies how the application system will use resources.
Types of tasks in a Real-Time System?
The system is subjected to real-time, i.e. response should be guaranteed within a specified timing constraint or system should meet the specified deadline.
1. Periodic tasks.
Denoted by 4 tuple: Ti = < Φi, Pi, ei, Di > These tasks repeat itself after fixed time interval.
Φi – (phase). Phase is the release time of the first job in the task. Default: zero.
Pi – (Period) The time interval between the release times of two consecutive jobs.
ei – Execution time of the task.
Di – Relative deadline of the task.
- Dynamic tasks:
It is a sequential program that is invoked by the occurrence of an event. These are classified further.
Hyper Period of a set of periodic tasks?
LCM of periods of all the tasks in that set. For example, two tasks T1 and T2 having period 4 and 5 respectively will have a hyper period, H = lcm(p1, p2) = lcm(4, 5) = 20.
The hyper period is the time after which pattern of job release times starts to repeat.
Dynamic Tasks?
Hint: Classification
In both, jobs are released at arbitrary time intervals, i.e randomly.
Aperiodic:
Soft deadline or no deadlines.
Sporadic: Hard deadline.
A sporadic task is denoted by three tuples: Ti =(ei, gi, Di)
Where
ei – the execution time of the task.
gi – the minimum separation between the occurrence of two consecutive instances of the task.
Di – the relative deadline of the task.
Jitter:
Sometimes actual release time of a job is not known. Only know that ri is in a range [ ri-, ri+ ]. This range is known as release time jitter. Here ri– is how early a job can be released and ri+ is how late a job can be released. Only the range [ ei-, ei+ ] of the execution time of a job is known. Here ei– is the minimum amount of time required by a job to complete its execution and ei+ is the maximum amount of time required by a job to complete its execution.
Antisymmetric relation: (Discrete Math)
If aRb and bRa then a=b.
PoSET:
Hint: it consists of? formalizes what? represented how?
Reflexive, Transitive, Antisymmetric. Defines notion of comparison.
It consists of a set with a binary relation indicating that for certain elements, one preceds the another in ordering.
Represented using Hasse diagrams.
Precedence Constraint of Jobs:
How to represent these constraints?
Precedence constraints are there when jobs are to be executed in a specific order.
Represented using partially order relation. A job Ji is a predecessor of job Jj if Ji < Jj i.e. Jj cannot begin its execution until Ji completes.
An efficient way to represent precedence constraints is by using a directed graph G = (J,
Multithreading:
Thread is a basic unit of CPU utilization.
Multithreading is an execution model that allows a single process to have multiple code segments (i.e., threads) running concurrently within the “context” of that process.
e.g. VLC media player, where one thread is used for opening the VLC media player, one thread for playing a particular song and another thread for adding new songs to the playlist.
Another advantage of multi-threading is that it is less costly. Creating brand new processes and allocating resources is a time-consuming task, but since threads share resources of the parent process, creating threads and switching between them is comparatively easy.
types of RAM:
8
DRAM: Dynamic. TIny capacitors, who lose energy so need refreshing. Inexpensive. Slower. Used for Main Memory. Can store any bits per chip. SRAM: Static. D flip flop. Expensive, faster. Used for the cache. Consumes more power and heats up also. Can't store many bits per chip.
Types of ROM:
PROM: programable Read-only memory. Once the user programs it, data can’t be changed again.
EPROM: erasable PROM. UV light can erase data.
EEPROM: Electrically EPROM. exposing to an electric field can erase parts of a chip.
Difference between 32-bit and 64-bit operating systems:
In computing, there are two types of processors existing, i.e., 32-bit and 64-bit processors. These types of processors tell us how much memory a processor can access from a CPU register.
A 32-bit system can access 2^32 different memory addresses, i.e 4 GB of RAM or physical memory ideally, it can access more than 4 GB of RAM also.
A 64-bit system can access 2^64 different memory addresses, i.e actually 18-Quintillion bytes of RAM. In short, any amount of memory greater than 4 GB can be easily handled by it.
What is a process? process Vs program?
A process is a program in execution. The process is an active entity and the program is a passive entity.