Please enable JavaScript.
Coggle requires JavaScript to display documents.
CHAPTER 1:INTRODUCING OPERATING SYSTEM, CHAPTER 2:MEMORY MANAGEMENT,…
CHAPTER 1:INTRODUCING OPERATING SYSTEM
OPERATING SYSTEM SOFTWARE
Essential subsystem managers
Device Manager
Network Manager
Memory Manager
Processor Manager
File Manager
What is an OS ?
System software that manages
Computer Hardware
Provides Common Services
Software Resources
Controls every file and device
Controls every file and device
Various Type Operating System Structure
Monolithic
This system considered as “ The big mess” because this structure is no structure actually.
The components of monolithic system are unorganized
Any module can call any other module without any reservation
Layered
This approach breaks up the operating system into different layers.
This allows implementers to change the inner workings, and increases modularity
As long as the external interface of the routines don’t change, developers have more freedom to change the inner workings of the routines.
Microkernel
Component in microkernel communicate directly with one another
Microkernel validate messages, passes them between the components and grant access to hardware
Example : C-DAC microkernel, Mach, Windows NT, Chorus
Networked and Distributed
A network operating system (NOS) is a software program that controls other software and hardware that runs on a network
A computer network can consist of a wireless network, local area network (LAN), a wide area network (WAN), or even two or three computer networks.
The heart of any of these networks, however, is the network operating system.
Architecture of Operating System
Single processor system
A single processor is one which the system has single CPU
In a single processor system only one process can run at a
time other processes must wait until the CPU becomes free
Multiprocessor system
A computer system in which two or more CPUs share full access to a common RAM
Multiprocessors divide into : Hardware, OS, Synchronization & Scheduling.
Clustered system
Allows 2 or more systems to share storage
The clustering is usually performed to provide high availability. A layer of cluster software runs on cluster nodes. Each node can monitor one or more nodes over the LAN
Concept in Operating System
Time sharing
Time sharing is the sharing of a computing resource among many users by means of multiprogramming and multitasking
Allow a large number of users to interact concurrently with a single computer
multiprogramming
The concept of loading many programs at one time to share a single CPU
A technique that allows a single processor to process several programs residing simultaneously in main memory,
Multiprogramming allows more processes to be available for execution at one time
Buffering
To adapt between devices that have different data-transfer sizes
To copes with a speed mismatch between producer and consumer of a stream data.
Caching
A cache is a temporary storage area
Caching improves access time
reduces data traffic to data sources that have limited throughput.
Spooling
Send data that is intended for printing
processing on a peripheral device to an intermediate store
simultaneous peripheral operation on line
Multitasking
Multitasking is the concurrent or inserted execution of two or more jobs by a single CPU.
Multitasking is a method where multiple tasks( knowns as processes) share common processing resources
Even a computer with more than one CPU called multiprocessor machines), multitasking allow many more task to be run there are CPUs
CHAPTER 2:MEMORY MANAGEMENT
Memory management is concerned with managing:
The computers available pool of memory
The computers available pool of memory
Function of Memory Manager
Primary function
to preserve the space in main
memory occupied by the operating system itself
Memory manager in charge of main memory
Check the validity of each request for memory space
In multiuser environment, the memory manager sets up a table to keep track of who is using which section in memory
When the time comes to reclaim the memory, Memory Manager deallocate memory
Memory Management Strategies
Placement
First fit
Allocate the first Memory block that is large enough for the new process
This a fast algorithm
We can stop searching as soon as we find a free hole that is large enough
Best fit
can keep it sorted and stop it when it has an
entry which has a size larger than the size of process
This algorithm produces the smallest left over bloc
Allocate the smallest block among those that are large
Worst fit
Allocate the largest block among those that are large
Search or sorting of the entire list is needed
This algorithm produces the largest left over block
Memory Management Strategies in Memory Allocation
Fetch
The rules used by virtual memory manager to determine when a page is copied from disk to memory
Determine when to move the next piece of a program or data to main memory from secondary storage.
Placement
The rules used by virtual memory manager to determine where the virtual pages to be loaded
Determine where in main memory the system should place incoming program or data pieces
Replacement
When memory is to full to accommodate a new program, the system must remove some (or all) of a program or data that currently resides in memory
The rules used by VM manager to determine which virtual page must be removed from memory to make room for new page.
Segmentation
Concept : based on the common practice by programmers of structuring their program in modules
Segmentation scheme : each job is divided into several segment of different sizes
Main memory is no longer divided into page frames because the size of each segment is different
Main program ,subroutine
Function
Object
Method
Local variable, global variable
Procedure
Stack, array ,symbol table
Paging
A program’s segments can vary in length
program’s pages are loaded into noncontiguous memory
Addresses consist of two parts
page number in the high-order positions and a displacement in the low-order bits
Addresses are dynamically translated as the program runs
Then the page’s base address is looked up in a program page table
Process Management
Recall that a program that is copied to main memory is called a Job
Job also called as Task
A program (or part of it) in execution is also called a process
A process require resource like CPU time, memory, files and etc
States of a Process
New
Created
OS recognizes the process but does not assign recourses to it
Ready
Assign a process to a processor
The process is ready/ waiting to be assigned to a processor
Run
Instruction execution
When a process is selected by the CPU for execution, it moves to the run state
Blocked
For an event to occur
When a process is waiting for some event to occur
Terminated
Finish execution
This is state reached when the process finishes execution
Purpose of CPU Scheduler
Long term scheduler / Job Scheduler
Which program are admitted to the system for execution and when and which one should be exited
Select process from this pool and loads them into memory for execution
The long-term, or admission, scheduler decides which jobs or processes are to be admitted to the ready queue
Medium Term Scheduler
Which determine when process are to be suspended and resumed
This is commonly referred to as ”swapping out” or ”swapping in” (also incorrectly as ”paging out” or ”paging in
The mid-term scheduler may decide to swap out a process which has not been active for some time
Short term scheduler/ CPU scheduler/ Dispatcher
Which determines which of the ready processes can have CPU resources, and for how long
Must select a new process for the CPU frequently
Select from among the processes that are ready
The short-term scheduler (also known as the dispatcher) decides which of the ready
Scheduling Creteria
CPU utilization
keep the CPU as busy as possible, we want to reduce the idle time
Throughput
– number of processes that complete their execution per time unit
Turnaround time
amount of time to execute a particular process
Waiting time
– amount of time a process has been waiting in the ready queue
Response time
amount of time it takes from when a request was submitted until the first response is produced, not output
Optimization Criteria
Max
throughput
CPU utilization
Min
waiting time
response time
turnaround time
Multilevel Queue
When there are many process with various level of processing, it needs complex scheduling
The process management has to maintain separate process queues serviced by different schedulers
the division of workload might be done as System Processes, Interactive Program and Batch jobs
Multilevel Feedback Queue
It is an enhancement of multilevel queue scheduling where process can move between the queues
In approach, the ready queue is partitioned into multiple queues of different priorities.
The system use to assign processes to queue based on their CPU burst characteristic
Thread
Thread is basic unit of execution
Thread is a single sequential flow of control within a program.
A thread is also known as light weight process
Advantages of Multithreading
Multiple thread in a process share the same memory address space
This means memory utilization would be bettered using multithreading.
Deadlock
CHAPTER 3:FILE MANAGEMENT
CONCEPT OF THE FILE
used for anything that is stored in the 2nd storage
A file can be program
this files differs in the info that hold &the way which the info is stored
text files
audio / video files etc
code / executable
image files
word documents
3.1.2 File Access Techniques
INDEXED
is logically the same as sequential organization, but index is built indicating the block containing the record with a given value for the key field
combine the advantages of a sequential file with the possibility of direct access using the primary key ( primary key is the field that is used to control the sequence of the records).
DIRECT
Method useful for disks
The file is viewed as a numbered sequence of blocks or records.
There are no restrictions on which blocks are read/written in any order
User now say “read n” rather than “read next”
SEQUENTIAL
Implemented by the file system
Data is accessed one record right after the last
Read cause pointer to be moved ahead by one.
Such a method is reasonable for tape.
To speed process some optimization features may be built into system.
4 Types of Directory Structure
Directory structure
Both the directory structure and the files reside on disk
. Backups of these two structures may be kept on tapes.
Single-level directory
In single level directory system there is only one
directory at the top
All the files are present in the root directory only and
user cannot create sub directories under the root
directory.
Storage structure
A disk can be used in its entirety for a file system
These parts are known as partitions, slices or minidisks.
Volumes can also store multiple operating system, allow a system to boot and run more than one.
This information is kept in entries in a device directory or volume table contents.
Two-level directory
help users to keep their files separately under their own directories
allow having a file with same name more than once on the disk but under different user directories
Methods of File Allocation
Linked file allocation
File use any available disk storage space
File records stored in contigous manner
Stored in other disk sections
storage level
directory levekl
Indexed file allocation
Support sequential and direct access
every file has own index block
Allows direct record access
Contiguous file allocation
Advantages
Any record found once starting address, size known
Easy direct access
Disadvantage
Difficult file expansion, fragmentation
Free Space Management
Free space list manage records all free disk blocks.
Those not allocated to some file or directory
This space then removed from free – space list.
Low overhead to perform free list maintenance operations
Files are likely to be allocated in non contiguous blocks
Increases file access time
Using Bit map
Advantage of bit map over free lists
The file system can quickly determine if contiguous blocks are available at certain locations on secondary storage
Disadvantage of bit map
The file system may need to search the entire bit map to find a free block, resulting in substantial execution overhead
Using Link List
Simple because need only starting address
Free space management system implemented
No waste space
No external fragmentation
The size of a file not need to be declared when the file is created