Text Practice Mode
Operating system
created Jan 26th 2020, 01:06 by MuathNasr
0
1668 words
6 completed
3.5
Rating visible after 3 or more votes
00:00
Topic One :
Operating system overview :
- What makes a computer > user >> Application >> Operating system >> Hardware .
- Definition : A program that controls the execution of application programs >> An interface between applications and hardware .
>> The Objective of an os.
1- Convenience : Make the commuter more convenient to be used .
2- Efficiency : Allows computer system resources to be used in an efficient manner .
3- Ability to Evolve : Permit effective development testing and introduction of new system functions with our interfering with service .
What makes computers more convenience ? The os acts as a mediator > it's on the 3rd layer masks the details of hardware form the user with a convenient interface for using the system.
Application Program > Any program written to perform specific day to day function to the user (office apps, calculator, web)
Utilities >> A set of system programs in assisting program creation , management of files and controlling I/O.
In the computer , os provide service in the following area >>
1- Program Development >> editors and debuggers to assist program development .
2- Program Execution >> Number of tasks need to be performed in executing a program .
3- Access to I/O Devices >> Provide a uniform interface that hides the details so programmer can access devices using simple read and writes.
4- Controlled Access to Files >> Protection mechanism .
5- System Access >> In shared or public system os control access to the system.
6- Error Detection and Response >> Error occurs while the computer is running : internal and external hardware errors/software errors (denies request of application ).
Os provide response to error condition with least impact to running applications >> Ending program that cause error >> Retrying the operation >> Reporting error to application.
7- Accounting >> Collect statistics monitor performance anticipate future enhancements .
>>OS evolve <<<
1- Serial Processing >>
1- Improper synchronisation >> a program must wait until the data are available a buffer > improper design of the singling mechanism can resulting loss or duplication
2- Failed mutual exclusion >> more than one user of program attempts to make use of shared resource at the same time > only one routine at at time allowed to perform and update against the file
3- Nondeterminate program operation ? Program execution is interleaved by the processor when memory is shared > the order in which programs are scheduled may affect their outcome
4- Deadlocks >> it is possible for two or more programs to be hung up waiting for each other > may depend on the chance timing of resource allocation and release .
# Components of a process >>
>> A process contains three components > 1. Executable program 2. Associated data need by the program ( variables , for space, buffers) 3. execution context( or process sate) of the program it is essential > internal data used by the os >> priority of the process >> is the process waiting for a particular I/O event .
#> Memory Management :
The os has five principal storage management :
1- Process Isolation : The os must prevent independent processes form interfering with each other's memory ,both date and instructions.
2- Automatic allocation and management : Programs should be dynamically allocated across the memory hierarchy as required. Allocation should be straightforward to the programmer .
3- Support of modular programming : Programmers should be able to define program modules, and to create, destroy and alter the size of modules dynamically .
4- Protection and access control : The os must provide different ways to access memory by various users .
5- Long-term storage : Many applications programs require means for storing information for extended periods of time, after the computer has been powered down
> The nature of the threat that concerns an organisation will very greatly depending on the cirumstances .
The nature of the threat the concerns an organisation will vary greatly depending on the circumstances .
the problem involves controlling access to computer systems and the information stored in them .
.Information Protection & Security >>
1- Availability >> Protecting the system against interruption .
2- Confidentiality >> Access for authorise users .
3- Date Integrity >> Protection of data from unauthorised modification .
4- Authenticity >> Proper verification of the identity of users and the validity of messages or date .
#> different architectural approaches:
- microkernel architecture >> Multithreading >> symmetric multiprocessing >> distributed operating systems >
Kernel is the small process all the essential services required by other parts of the operating system and application .
The kernel code is usually loaded into a protected area of the main memory to prevent it form overwriting by programs or there parts of the operating system
#> Typically , the kernel is responsible for :
1. Memory management >> 2. Process and task management >> 3. Disk management .
The kernel connects the system hardware to the application software
Kerenl code to do memory management process / task management disk management
>> Topic Twon>>>
Once the os decides to create a new process it >
- Assigns a unique process identifier to the new process .
- allocates space for the process .
- initialises the process control block .
- sets the appropriate linkages .
- creates or expands other date structures.
>>> Topic Three <<< Mutual exclusion >>
Concurrency>> a property of a system in which several process are executing simultaneously , and potentially interacting with each other.
>> Key terms :
1. Atomic Operation : a function /action implemented as a sequence of one or more instructions that appears to be indivisible ( no other process can see an intermediate state or interrupt the operation ) The sequence is guaranteed to execute as a group or not execute at all.
Atomicity guarantees isolation from concurrent process Atomic operations assist in implementing mutual exclusion
2. Critical Section :
A section of code within a process that requires access to shared resources >> Must no be executed while another process is in a corresponding section of code >> each process have their own critical section .
3. Dead lock >> situation in which two or. More process are unable to proceed because each is waiting for one of the others to do something, thus neither ever does .
4. Mutual Exclusion >> refers to the requirement of ensuring that no two concurrent processes are in their critical section at the same time .
It is a requirement that prevents simulates access to a shared resource used in concurrency control and to prevent race conditions.
5. Race Conditions >> A situation in which multiple threads or processes read and write a shared date item and the final result depends on the relative timing of their execution. It becomes a bug when events do not happen in the oreder the programmer intended. The term originates with the idea of two signals racing each other to influence the output first
6. Starvation >> a situation in which a runnable program is overlooked indefinitely by the scheduler; although it is able to proceed, it is never chosen.
Process interaction >>
4 Conditions for Deadlock >>
1. Mutual Exclusion >> only one process may use a resource at a time .
2. Hold-and-wait >> a process may hold allocated resources while a waiting assignment of others .
3. No pre-emption >> no resource can be forcibly removed from a process holding it
4. Circular Wait >> a closed chain of processes lists, such that each process holds at least one resource needed by the next process in the chain .
Dealing a deadlock :
1) Prevent Deadlock >> adopt a policy that eliminates one of the conditions .
2) Avoid Deadlock >> make the appropriate dynamic choices based on the current state of resource allocation .
3) Detect Deadlock >> attempt to detect the presence of deadlock and take action to recover .
To prevent deadlock there are two ways : indirect >> prevent the occurrence of one of the three necessary conditions .
Direct Prevent the occurrence of a circular wait ( the fourth condition)
Banker's Algorithm >> Concept L ensure that the system of processes and resources is always in a safe state >> MechanismL when a process makes a request for a set of resources >> Assume that the request is granted >> Update the system state accordingly >> Determine uf the result is a safe state if so, grant the request; if not, block the process until it is safe to grant the request
4 Deadlock avoidance restrictions >>
1) Maximum Resource requirement for each process myst be stated in advance .
2) process under consideration must be independent and with no synchronisation requirements .
3) There must be fixed number of resources to allocate .
4) No process Amy exit while holding resources
Topic 5 >> sustem (performance) objetives:
1) Low response time ( fast response) time elapse from the for the submission of a request to the beginning of the response
2) High Throughput > number of processes completed per unit time try getting as much process.jobs done at a time
3) Processor efficiency >> High processor utilisation ( may processor idle time ) processor is always doing task
The key to multiprogramming is :
Four types os scheduling typically involves >> long term >> medium term >> short term >> I/O :
The scheduling criteria :
1)cpu utilisation > keep cpu as busy as possible.
2) Throughput > number of processes that complete their execution per time unit .
3) turnaround time > amount of time to execute a particular process.
4) waiting time > amount of time a process has been waiting in the ready queue .
5) Response time > amount of time it takes from when a request was submitted until the first response is produced not output for time-sharing environment)
Operating system overview :
- What makes a computer > user >> Application >> Operating system >> Hardware .
- Definition : A program that controls the execution of application programs >> An interface between applications and hardware .
>> The Objective of an os.
1- Convenience : Make the commuter more convenient to be used .
2- Efficiency : Allows computer system resources to be used in an efficient manner .
3- Ability to Evolve : Permit effective development testing and introduction of new system functions with our interfering with service .
What makes computers more convenience ? The os acts as a mediator > it's on the 3rd layer masks the details of hardware form the user with a convenient interface for using the system.
Application Program > Any program written to perform specific day to day function to the user (office apps, calculator, web)
Utilities >> A set of system programs in assisting program creation , management of files and controlling I/O.
In the computer , os provide service in the following area >>
1- Program Development >> editors and debuggers to assist program development .
2- Program Execution >> Number of tasks need to be performed in executing a program .
3- Access to I/O Devices >> Provide a uniform interface that hides the details so programmer can access devices using simple read and writes.
4- Controlled Access to Files >> Protection mechanism .
5- System Access >> In shared or public system os control access to the system.
6- Error Detection and Response >> Error occurs while the computer is running : internal and external hardware errors/software errors (denies request of application ).
Os provide response to error condition with least impact to running applications >> Ending program that cause error >> Retrying the operation >> Reporting error to application.
7- Accounting >> Collect statistics monitor performance anticipate future enhancements .
>>OS evolve <<<
1- Serial Processing >>
1- Improper synchronisation >> a program must wait until the data are available a buffer > improper design of the singling mechanism can resulting loss or duplication
2- Failed mutual exclusion >> more than one user of program attempts to make use of shared resource at the same time > only one routine at at time allowed to perform and update against the file
3- Nondeterminate program operation ? Program execution is interleaved by the processor when memory is shared > the order in which programs are scheduled may affect their outcome
4- Deadlocks >> it is possible for two or more programs to be hung up waiting for each other > may depend on the chance timing of resource allocation and release .
# Components of a process >>
>> A process contains three components > 1. Executable program 2. Associated data need by the program ( variables , for space, buffers) 3. execution context( or process sate) of the program it is essential > internal data used by the os >> priority of the process >> is the process waiting for a particular I/O event .
#> Memory Management :
The os has five principal storage management :
1- Process Isolation : The os must prevent independent processes form interfering with each other's memory ,both date and instructions.
2- Automatic allocation and management : Programs should be dynamically allocated across the memory hierarchy as required. Allocation should be straightforward to the programmer .
3- Support of modular programming : Programmers should be able to define program modules, and to create, destroy and alter the size of modules dynamically .
4- Protection and access control : The os must provide different ways to access memory by various users .
5- Long-term storage : Many applications programs require means for storing information for extended periods of time, after the computer has been powered down
> The nature of the threat that concerns an organisation will very greatly depending on the cirumstances .
The nature of the threat the concerns an organisation will vary greatly depending on the circumstances .
the problem involves controlling access to computer systems and the information stored in them .
.Information Protection & Security >>
1- Availability >> Protecting the system against interruption .
2- Confidentiality >> Access for authorise users .
3- Date Integrity >> Protection of data from unauthorised modification .
4- Authenticity >> Proper verification of the identity of users and the validity of messages or date .
#> different architectural approaches:
- microkernel architecture >> Multithreading >> symmetric multiprocessing >> distributed operating systems >
Kernel is the small process all the essential services required by other parts of the operating system and application .
The kernel code is usually loaded into a protected area of the main memory to prevent it form overwriting by programs or there parts of the operating system
#> Typically , the kernel is responsible for :
1. Memory management >> 2. Process and task management >> 3. Disk management .
The kernel connects the system hardware to the application software
Kerenl code to do memory management process / task management disk management
>> Topic Twon>>>
Once the os decides to create a new process it >
- Assigns a unique process identifier to the new process .
- allocates space for the process .
- initialises the process control block .
- sets the appropriate linkages .
- creates or expands other date structures.
>>> Topic Three <<< Mutual exclusion >>
Concurrency>> a property of a system in which several process are executing simultaneously , and potentially interacting with each other.
>> Key terms :
1. Atomic Operation : a function /action implemented as a sequence of one or more instructions that appears to be indivisible ( no other process can see an intermediate state or interrupt the operation ) The sequence is guaranteed to execute as a group or not execute at all.
Atomicity guarantees isolation from concurrent process Atomic operations assist in implementing mutual exclusion
2. Critical Section :
A section of code within a process that requires access to shared resources >> Must no be executed while another process is in a corresponding section of code >> each process have their own critical section .
3. Dead lock >> situation in which two or. More process are unable to proceed because each is waiting for one of the others to do something, thus neither ever does .
4. Mutual Exclusion >> refers to the requirement of ensuring that no two concurrent processes are in their critical section at the same time .
It is a requirement that prevents simulates access to a shared resource used in concurrency control and to prevent race conditions.
5. Race Conditions >> A situation in which multiple threads or processes read and write a shared date item and the final result depends on the relative timing of their execution. It becomes a bug when events do not happen in the oreder the programmer intended. The term originates with the idea of two signals racing each other to influence the output first
6. Starvation >> a situation in which a runnable program is overlooked indefinitely by the scheduler; although it is able to proceed, it is never chosen.
Process interaction >>
4 Conditions for Deadlock >>
1. Mutual Exclusion >> only one process may use a resource at a time .
2. Hold-and-wait >> a process may hold allocated resources while a waiting assignment of others .
3. No pre-emption >> no resource can be forcibly removed from a process holding it
4. Circular Wait >> a closed chain of processes lists, such that each process holds at least one resource needed by the next process in the chain .
Dealing a deadlock :
1) Prevent Deadlock >> adopt a policy that eliminates one of the conditions .
2) Avoid Deadlock >> make the appropriate dynamic choices based on the current state of resource allocation .
3) Detect Deadlock >> attempt to detect the presence of deadlock and take action to recover .
To prevent deadlock there are two ways : indirect >> prevent the occurrence of one of the three necessary conditions .
Direct Prevent the occurrence of a circular wait ( the fourth condition)
Banker's Algorithm >> Concept L ensure that the system of processes and resources is always in a safe state >> MechanismL when a process makes a request for a set of resources >> Assume that the request is granted >> Update the system state accordingly >> Determine uf the result is a safe state if so, grant the request; if not, block the process until it is safe to grant the request
4 Deadlock avoidance restrictions >>
1) Maximum Resource requirement for each process myst be stated in advance .
2) process under consideration must be independent and with no synchronisation requirements .
3) There must be fixed number of resources to allocate .
4) No process Amy exit while holding resources
Topic 5 >> sustem (performance) objetives:
1) Low response time ( fast response) time elapse from the for the submission of a request to the beginning of the response
2) High Throughput > number of processes completed per unit time try getting as much process.jobs done at a time
3) Processor efficiency >> High processor utilisation ( may processor idle time ) processor is always doing task
The key to multiprogramming is :
Four types os scheduling typically involves >> long term >> medium term >> short term >> I/O :
The scheduling criteria :
1)cpu utilisation > keep cpu as busy as possible.
2) Throughput > number of processes that complete their execution per time unit .
3) turnaround time > amount of time to execute a particular process.
4) waiting time > amount of time a process has been waiting in the ready queue .
5) Response time > amount of time it takes from when a request was submitted until the first response is produced not output for time-sharing environment)
saving score / loading statistics ...