+ All Categories
Home > Documents > OPERATING SYSTEMS System: Features of a...

OPERATING SYSTEMS System: Features of a...

Date post: 25-Dec-2019
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
49
1 Compiled by OMAE M. OTERI ©2011 OPERATING SYSTEMS System: A combination of components put together to perform a given function. It consists of subsections which perform different functions also to achieve the main objectives of a function. Features of a system. 1. Inputs. 2. Outputs. 3. Process. 4. Feedback. 5. Environment. 6. Boundary. Input is what goes into a process for manipulation. Process involves the manipulation done on an input to obtain a particular output. Output this is what comes out of a process having undergone some changes. Feedback response of the system which can be from the output to the input or from the input to output. Output input is negative feedback. Input output is positive feedback. Environment is what the system interacts with. Boundary separates the system and environment. Examples: - Operating System
Transcript
Page 1: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

1 Compiled by OMAE M. OTERI ©2011

OPERATING SYSTEMS

System: A combination of components put together to perform a given function. It consists of

subsections which perform different functions also to achieve the main objectives of a function.

Features of a system.

1. Inputs.

2. Outputs.

3. Process.

4. Feedback.

5. Environment.

6. Boundary.

Input – is what goes into a process for manipulation.

Process – involves the manipulation done on an input to obtain a particular output.

Output – this is what comes out of a process having undergone some changes.

Feedback – response of the system which can be from the output to the input or from the input to

output.

Output – input is negative feedback.

Input – output is positive feedback.

Environment –is what the system interacts with.

Boundary – separates the system and environment.

Examples:

- Operating System

Page 2: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

2 Compiled by OMAE M. OTERI ©2011

- Organization

- Computer.

- Processor.

- Communication systems.

Operating System:

A software that acts as an interface between the hardware and the application software.

Software:

- System software

- Application software

Application software acts as an interface between the system software and the users.

Operating system – manages the computer resources.

Resources:

- Memory.

- Input/ output devices.

- CPU.

- Files.

Operating system can act as an abstraction – hides the hardware from the upper layers; it makes

the hardware look the same.

Historical perspective:

The evolution of operating systems has in such a way that it goes hand-in-hand with the computer

hardware.

Page 3: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

3 Compiled by OMAE M. OTERI ©2011

Hardware:

1945 – vacuum tubes.

1950 – PN junction transistor.

1960 – Integrated circuits.

1971 – Intel 4004

1972 – Intel 8008

- Intel 8080/86

- Intel 8088

- Intel 80286

- Intel 80386

- Intel 80486

- Intel Pentium I

- Intel Pentium II

- Intel Pentium III

- Intel Pentium IV

- Core i2

- Core i3

- Core i5

2010 – Core i7: 810 million – 2.6 billion transistors

Features:

1. Size is getting smaller.

2. Power dissipation is increasing.

3. Power consumption is decreasing.

4. Number of transistors is increasing,

5. Size of the instructions – 4 bit, 8 bit, 16 bit, 32 bit, 64 bit.

Integration evolution:

1. Small scale integration.

2. Medium scale integration.

3. Large scale integration.

4. Very large scale integration.

Page 4: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

4 Compiled by OMAE M. OTERI ©2011

5. Ultra large scale integration.

Software Operating Systems:

1. LINUX.

2. Windows.

3. DOS.

4. Android.

5. Palm.

6. Symbian 6

7. MC.

8. Novell

Features:

1. Increasing speed.

2. Increasing space occupied.

3. Better compatibility.

4. Increasing number of instructions.

First Generation:

1974 – 1955: Vacuum tubes and switches/ plug boards.

- Computer constructed using vacuum tubes.

Page 5: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

5 Compiled by OMAE M. OTERI ©2011

- Occupied very large space.

- Very expensive.

- Very slow.

- Programming done using switches, plugging and unplugging cables.

- High power consumed.

- High power dissipation.

Second generation:

- 1955 – 1965: Transistors and batch systems

- Computer constructed using transistors.

- Occupied smaller space compared to 1st generation.

- Expensive.

- Consumed less power.

- Faster than 1st generation.

- Programming was done using machine languages.

- Disparity (speed) between the processor and input/ output devices.

Third Generation:

- 1965 – 1980: ICs and multiprogramming.

- Computer constructed using ICs.

- Occupied smaller space than 2nd generation.

- Cheaper.

- Faster in executing instructions.

- Programming done using high level language.

- Multi-programming was used; several programs run at the same time.

- Very small slots of time given to each program to work like they are running at the same

time.

- Disparity between processor and input / output devices reduced by use of spooling.

Fourth Generation:

- 1980 +: VLSI and personal computers.

- Computer constructed using VLSI to ULSI.

- Occupy even smaller space.

- Cheaper than 3rd generation.

- Much faster in instruction execution.

Page 6: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

6 Compiled by OMAE M. OTERI ©2011

- Programming done by use of powerful languages like C, C++, Java to come up with OSs.

- Multi-tasking, multi-programming and multi-processing were better.

- Parallel programming.

- Less power consumed.

- Disparity between the processor and I/O devices highly reduced.

- Introduction of networking.

- Embedded systems: Win CE, Palm, Mobile phones, microcontrollers and robots.

Applications of Operating Systems:

- Communication and entertainment.

- Industry.

- Medicine.

- Biometrics.

- Instrumentation.

- Astronomy.

- Military.

- Communication: phones and computers.

- Medicine – robot for surgery.

- Astronomy – study space.

- Industry - automation.

- Instrumentation-pianos, electronic guitars.

- Biometrics – eyes, fingers, palm, face, smile, walking style.

- Military – robot soldiers.

Types of Operating Systems:

- Real time.

- Multi-user versus single user.

- Multi-tasking versus single tasking.

- Distributed.

- Embedded operating systems.

Page 7: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

7 Compiled by OMAE M. OTERI ©2011

Real-time:

- A type of OS that gives feedback with no or minimal time difference.

- Minimal or zero delays in the operations.

- Used in transport industry, medicine etc.

- Example – Windows.

Multi-user versus single user:

- Multi-user is an OS that allows many users at the same time.

- Many users can be logged in and using one computer.

- Single user is an OS that allows only one user at a time.

- Multi-user examples are LINUX, Windows.

Multi-tasking versus single tasking:

- Multi-tasking is an OS which can allow several tasks to be performed at the same time.

- Several of these will support multi-processing.

- Single task OS allows only one task at a time.

Distributed:

- They facilitate several computers to work together in performing a given function.

- Several computers in a network can be managed by use of distributed systems.

- Versions like servers.

Embedded:

- OS which have minimum requirements for installation.

- They are compact.

- Usually installed in robots and phones.

- Examples – Windows CE, Palm, Android.

Page 8: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

8 Compiled by OMAE M. OTERI ©2011

Features of an Operating System:

1. Compatibility: Operating Systems should be compatible with the platforms to be installed

on and with most applications.

2. Easy to use and learn: An OS should be easy to use. For instance, Windows is easier to use

and learn compared to LINUX.

3. Robust – Strength, as an OS should be strong – can operate with errors. It doesn’t

completely fail when a fault occurs (fault tolerant).

4. Flexibility: can be used for several functions – digital systems which are not computers,

running a computer and running mobile phones.

Operating System Structure:

- This is how an OS is constructed.

- The components it has and how they relate to each other.

- Almost all OS are divided into two modes: User mode and Kernel mode.

User mode:

- Acts as an interface between user and Kernel of the OS.

- It is a less privileged mode – this is because it cannot access the hardware directly.

Kernel mode:

- Acts as an interface between the user mode and the hardware.

- It hides the hardware to look the same as the upper sections-abstraction.

- It is a highly privileged mode since it can access hardware directly.

These are different types of structures for Operating Systems namely:

1. Monolithic also known as “bigmess”.

- Mono – one; lithos – stone.

- This kind of operating structure does not have a specific structure.

- This structure usually has problems since there is no organized way of accessing the

hardware.

- They are prone to errors and faults.

- Examples of OS using the structure are like: MS DOS, Earlier versions of UNIX.

- Advantage of this structure is it was easier to come up with – not complex.

Page 9: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

9 Compiled by OMAE M. OTERI ©2011

2. Layered:

- This had layers or sections building on each other.

Operator

Uses Programs

I/O Management

Operator – Process Communication

Memory and drum management

- For instance, an OS could have the topmost layer being the operator, user manager,

input/output management, inter-process communication, memory management and

process management.

Advantages:

- It facilitates the hardware management.

- Reliable.

- Faults are minimized; if one application fails, the OS will continue operating.

Disadvantage:

- Complexity is high due to the different layers and developing them takes time.

- They are not easy to learn.

- Not easy to understand.

- Are robust.

3. Virtual machine:

- Is a structure where the OS emulates the hardware.

- The virtual machine is in such a way that it takes the functions of the different hardware.

- For each hardware, there is a section in the OS that behaves like that particular

hardware.

Advantage:

- It also minimizes faults.

Disadvantage:

- It is complex since one has to develop a virtual hardware.

Page 10: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

10 Compiled by OMAE M. OTERI ©2011

- Hardware specific.

4. Client Server:

- Is a structure where the client requests for the services from the server.

- This is done through the kernel.

- The response will also go through the kernel.

Advantage:

- Information stored in a location and can be shared by other clients.

- Minimal errors.

- There are more than one server and therefore reliable.

Functions/ Component s of an OS:

1. Process Management.

2. Memory management.

3. Input / output devices management.

4. File management.

5. Secondary storage management.

6. Networking.

7. Command interpreter.

8. Provision of a virtual machine.

Process Management:

- Takes care of the processes to communicate.

- Job scheduling.

- Protecting other processes.

- Creation, management, termination of processes.

Memory Management:

- Allocating memory spaces to processes and protecting the memory spaces.

- Giving out that memory space when a process is through with it.

Page 11: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

11 Compiled by OMAE M. OTERI ©2011

Input/ Output device management:

- Allocating time to different processes to use the input/ output devices.

File Management:

- Create, manage, delete, files and folders.

- Secondary storage management:

- Managing the hard disks, flash disks.

- Managing use of space in the devices.

Networking:

- Internal management of the intercommunication inside a computer.

- External – management of the different hosts connected to a network.

Command interpreter:

- To change commands to a language that a computer can understand.

- Provision of virtual machine:

- Hardware abstraction where the varying characteristics of hardware are hidden.

Process Management:

Process –a program in execution.

Running program.

Program code:

- Sequence of instructions written for a digital system.

- Where the code is running (active) is called a process.

- The sequence of the instructions should be encoded so that the digital system can

understand the operation.

Page 12: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

12 Compiled by OMAE M. OTERI ©2011

Example of a program:

- Writing a code to arithmetic operations.

- Requirements:

o Registers.

o Accumulators.

o Data registers.

o Program counter.

o Stack pointer.

o ALU.

o Shifter.

o Decoder.

Add A to B register transfer language.

A <= A + B register.

Accumulator register.

Some processes require a sequence of instructions to perform an operation.

The sequence is usually encoded and stored in memory locations.

For instance, one can run a process going through the following sequence.

Memory locations – storing instructions

Page 13: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

13 Compiled by OMAE M. OTERI ©2011

Accumulators.

- Those accumulates the results from operations.

A <= A + B.

Data Registers:

- They store the data required from a given operation -B.

Program Counter:

- Holds the address of the next instruction.

Stack pointer.

- Contains information about a subroutine.

- For a process to run, it requires the above among other requirements.

Process Operations:

- A process operation can be called created or terminated.

- Process operation:

- This takes place when there is a requirement for a new process to be created.

- Reasons for process creation are:

o User log on.

o User opens a program.

o When an operating system needs a new process.

o A process creates another process called child process to complete an operation.

Process Termination:

- Where a process stops or halts.

- Reasons for process termination:

o Normal exit (completion of operation).

o Occurrence of an error e.g. divide by zero overflow, trying to open a non-existent

file.

Page 14: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

14 Compiled by OMAE M. OTERI ©2011

o User log offs.

o A parent process stops; all the child processes will also stop.

o Blackout.

o Memory is full – no space.

Process States:

State – this contains information about a process, maybe where it stopped and where it will start

from if need be.

There are several modes that try to explain the state concept:

- Two state models.

- Three state models.

- Five state models.

Two state model:

There are only two states given as running and not running.

There are two transitions under this model i.e. running – not running and not running – running.

The first transition can occur when a running process requires an input from some other process.

The second transition can occur when the process gets the input from the other process.

Page 15: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

15 Compiled by OMAE M. OTERI ©2011

Three state model:

Ready – process is waiting to use the CPU.

Running – the process is being executed using the CPU.

Blocked – the process is waiting for an event to occur before it starts operating.

The transitions are:

1. Ready to running – the process was waiting to use the CPU and if the CPU is free, then the

process moves from ready to running.

2. Running to ready – the process stops running because the time allocation is exhausted.

3. Running to blocked – the process needs an external event to occur before it can continue.

It requires the CPU and goes into blocked mode.

4. Blocked to ready – the process has gotten what it was waiting for and therefore needs to

go to the ready mode.

Five state model:

Page 16: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

16 Compiled by OMAE M. OTERI ©2011

The transitions are:

New – where a new process is created.

New – ready; after a new process is created it goes into ready mode indicating that it will be ready

to run any time.

Terminated – where the process has stopped the operation.

Running – terminated, the process stopped indicating that it will not use the CPU.

Process Control Block:

- It contains all the information necessary for a process to resume operation after it stopped

at the same state.

The information include;

- Process ID.

- Source Code.

- The state at which it stopped.

- Program counter.

- Stack pointer.

- Other accounting information.

- Program open (files).

- Operating system resources.

Threads:

- These are small processes that need to operate separately to achieve a common goal of a

main process.

- Called light processes.

- A process is divided into smaller processes.

Components of a thread:

- It has its own program counter.

- It has its own stack pointer.

Page 17: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

17 Compiled by OMAE M. OTERI ©2011

- It has its own identity.

- Threads share the following:

o Program code.

o Data registers.

o OS resources.

- Threads are not independent like process.

Types of threads:

- User mode.

- Kernel mode.

User mode:

- Are created and managed in the user mode section.

- All of them look the same to the kernel.

Advantages:

- Easy to create.

- Do not require many resources.

- Fast and efficient.

Disadvantages:

- Sometimes they block and they can make the whole process to block.

Kernel mode:

- Usually managed in the kernel.

- All of them are different in the kernel.

Advantages:

- If one of the threads fails, then the others will continue operating.

Page 18: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

18 Compiled by OMAE M. OTERI ©2011

Disadvantages:

- Not easy to create.

- Requires many resources.

- Not easy to manage.

- It is slow and inefficient.

Similarities between threads and processes:

1. They use the processor. (processor time).

2. Go through a sequence when in execution.

3. They use the program code, data registers and OS resources.

4. They can create child threads and processes.

Differences:

1. Processes are independent while threads are not.

2. Processes require unique resources like program counter, stack counter, special registers,

code, OS resources.

3. Threads are faster and more efficient.

4. Threads require fewer resources and easier to create.

Advantages of threads over processes:

1. Easier to create.

2. They don’t require inter-process communication.

3. Faster and efficient.

4. Able to use multiple processors (cores) better than processes.

5. They use context switching better than processes. Context switching is where the CPU

moves from one thread to the other and back.

6. There are fewer resources stored to enable a blocked thread to resume use of the CPU.

Page 19: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

19 Compiled by OMAE M. OTERI ©2011

Stack pointer:

Disadvantages:

1. Insecurity:

This happens because threads share data registers.

If one thread is using a data register, another thread can also start using that register

interfering with its contents.

This will interfere with operation of the first thread.

2. Sometimes it is difficult to manage since there is no inter-process communication between

the threads.

Process Scheduling:

This is the process of giving different processes that access the CPU share in terms of time.

Goals of CPU scheduling:

1. Fairness.

2. Policy enforcement.

3. Efficiency.

4. Response time.

5. Turnaround time.

6. Throughput.

Page 20: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

20 Compiled by OMAE M. OTERI ©2011

Fairness:

- To enable each process have access to the CPU.

Policy Enforcement:

- Some processes require priority over others and therefore should be taken into

consideration first.

Efficiency:

- To ensure that the CPU gives maximum output.

Response time:

- To reduce the time it takes a process to give feedback.

Turnaround time:

- This is to reduce the waiting time that a blocked or ready process should wait.

Throughput:

- Increase number of processes executed per given time.

Scheduling algorithms:

This is a sequence that is executed / used to perform CPU scheduling.

Some algorithms contradict the scheduling goals.

Some of the algorithms are given as:

a) First come first served (FCFS).

b) Round robin (RR).

c) Shortest job first. (SJF).

d) Shortest remaining time (SRT).

Page 21: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

21 Compiled by OMAE M. OTERI ©2011

e) Priority scheduling.

f) Multilevel queue scheduling.

First Come First Served:

- Can also be referred to as FIFO.

- This is where the first process in the queue takes over the process until it is done and then

hands over the process to the next process in the queue.

- This is fair if the process does not take a lot of time with the CPU.

- In the case where the waiting processes require a short time with the processor then it can

be unfair if one takes a lot of time with it.

- The turnaround time could be increased if there are processes requiring a lot of time with

the processor while others require a short time.

Round Robin:

- It is equivalent to FCFS; the only difference being that processes are given a slice of time

referred to as quantum.

- If a process was running and it has exhausted its quantum time, then another process is

given the processor while this first process is blocked.

- After all the other processes are through with their quantum time then that process can

resume.

- This is a pre-emptive kind of scheduling algorithm.

- Pre-emptive; the processor can be taken from one process and given to another.

- All information about the blocked process is stored in the process control block (PCB).

- Non pre-emptive scheduling; if a process is using the CPU, it will continue using it until

it’s done.

Shortest job first:

- The processes which require the shortest time with the processor are given priority.

- This is a pre-emptive scheduling.

- It is unfair to processes that require longer time with the CPU.

- The turnaround time for shorter jobs will be smaller.

Page 22: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

22 Compiled by OMAE M. OTERI ©2011

Example:

A B C D

20 10 12 4 mins

20 30 42 46 = 138

Average waiting time = 138/4 = 34.5 mins

D C B A

20 30 10 30

Average waiting time = 90/4 = 22.5 mins.

Shortest Remaining Time:

- Those jobs that have the shortest remaining time to use the CPU are given priority.

- If the job currently using the CPU will take a lot of time then another process with a shorter

time will take the CPU.

- In this case, the scheduling is pre-emptive.

- This scheduling can lead to starvation – a situation where a process with longer remaining

time will continue wasting.

- Unfair to these processes (with longer remaining time).

Priority Scheduling:

- This is where processes are assigned priority levels.

- Processes with highest priority level will be allowed to use processor first.

- These types of priorities are: pre-emptive or non pre-emptive.

Pre-emptive:

- In this case the process already using the processor will be taken away.

- If another process of higher priority comes into the queue then the processor will be

taken and given to that process of higher priority.

- Can lead to starvation.

Page 23: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

23 Compiled by OMAE M. OTERI ©2011

Non pre-emptive:

The process using the CPU will continue using it till it is through and then the process next

will be given its time to use the CPU.

Multi-level Queue Scheduling:

A situation where there are several queues assigned priorities.

Each group of processes with same priority put together in same queue.

There are two forms of multi-level queue scheduling given by pre-emptive and non pre-emptive.

Pre-emptive:

The first queue use given CPU time, when it is up, the other queue takes up the processor.

Non pre-emptive:

All the processes in the highest priority queue are executed till completion after which the

next queue will be given its time.

Its disadvantage is that it can lead to starvation where the other processes will be kept

waiting.

Inter process communication:

This is the process where different threads/ processes pass information to each other on how and

when to access a given shared resource.

Page 24: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

24 Compiled by OMAE M. OTERI ©2011

Mostly, this is important when dealing with shared resources like memory, CPU and data registers.

When dealing with these shared resources, there is a situation that can arise called race condition.

Race Condition:

This arises when one process accesses a shared resource and tries to change the contents which if

another process accesses the resources; it will not be able to continue because contents have been

changed.

This can be avoided by ensuring that only one process accesses the resources per given time.

This is referred to as mutual exclusion.

Conditions of mutual exclusion:

1. No two processes are allowed to access the resources at a given time.

The shared resource is referred to as critical section.

2. No assumptions are made in terms of the CPU speed.

3. No blocked process can keep another process waiting.

4. No process should be kept waiting indefinitely.

Algorithms used to achieve mutual exclusion:

1. To disable interrupts:

- Interrupt – this occur when a process is stopped from continuing with exclusion or using

the CPU.

- Can be done by another process that wants to use the CPU.

- Can either be hardware or software.

Hardware:

- This occurs when a hardware interrupts the execution of a process.

- An example is when a key is pressed.

Software:

This occurs internally when there is a system call may be by the operating system.

There are two types of triggering the interrupts:

Page 25: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

25 Compiled by OMAE M. OTERI ©2011

- Level triggered.

- Edge triggered.

Level triggered:

This is sent in form of a signal and when it is (1) high that triggers the interrupt.

Also triggering can take place when the signal is low.

Edge triggered:

This occurs when the signal is either moving from low to high (leading edge trigger) or when

moving from high to low (trailing edge trigger).

The disable interrupts will take place when a process enters its critical section.

It will disable all interrupts when it enters the critical section and enables the interrupts just

before it comes out of the critical section.

It is not one of the best when user processes are given power to disable interrupts but then it

can work for kernel processes.

2. Lock variables:

- Variables are registers that can be in either state 1 or 0.

- Processes set the register to 1 when they enter the critical section and set it to 0 when they

leave the critical section.

- Register A can be the variable that can be set or reset.

- It contains a 0 or a 1.

- When a process enters the critical section it changes the value of A to 1 which will indicate

that the process is in the critical section.

Page 26: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

26 Compiled by OMAE M. OTERI ©2011

- When it comes out, it changes the value of A to 0.

- When another process checks and finds A to be 1, it will continue waiting till A is 0.

- This can also cause race conditions where two processes will be in the critical section at

the same time.

- This can happen if a process runs and before it sets A to 1 another process also runs setting

A to 1.

- The first process also sets A to 1 and both processes will be in the critical section.

Strict alternation:

- Processes are given turns to enter the critical section.

- This is controlled such that a process can go into critical section if the turn is 0 or 1.

- If the process A checks and finds that it is 0, it will go into critical section and if it is 1, it

will wait for process B.

- When turn is 1, it goes into the critical section and if 0, it waits.

- When process A comes out of critical section, it changes turn to 1 indicating that process

B can go into critical section.

- This also has a problem where if process A comes out and sets turn, if process B is not

ready to go into critical state, it will wait until its turn comes up.

- Two processes will be waiting.

Test and set lock:

This involves a situation where two processes are accessing a buffer. If one process is already

using or accessing the memory then the other process cannot access that memory since the bus

used to access is disabled.

Sleep and wake up system calls:

In this case if the critical section is busy then the process that needs access will go to sleep until

the other process is through and wakes it up.

Can be used to solve problems like producer – consumer problems.

Page 27: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

27 Compiled by OMAE M. OTERI ©2011

Producer and consumer problem:

- In a case where there is shared buffer with empty slots shared by a producer and a

consumer.

- The producer produces items and places them in empty slots while the consumer takes the

item from the slots.

- A problem occurs when the producer produces items till all the slots are full.

- In this case the producer will be forced to sleep.

- The other problem will occur when the consumer has consumed all the items and the slots

are empty.

- The consumer will also be forced to go to sleep.

- For both cases the producer is expected to wake up the consumer before it goes to sleep,

the same case applies to the consumer.

- A problem can occur when a wake-up call is lost.

- Both processes will sleep indefinitely.

- If the consumer takes all the items and the buffer is empty, it is expected to go to sleep but

before it does that, the scheduler stops running it.

- The producer will continue producing items making the buffer full.

- It sends a signal to wake up the consumer, but because the consumer is not sleeping, the

wake-up call will be lost.

- The consumer starts running and goes to sleep and since the producer is also sleeping both

processes will be in sleep state.

Semaphore:

- It is a protected variable. If it is being accessed by one process, no other process can use it.

- For producer – consumer problem, one can define empty slots, full slots and actual

exclusion as the semaphores.

- Empty slots can be taken to be N.

- Full slots can be taken to be 0.

- Mutual exclusion can be taken to be 1.

The corresponding semaphores can be given as:

Empty = N.

Full = 0.

Muex = 1.

- When one process is accessing the semaphore, the other process will not be able to access

them.

Page 28: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

28 Compiled by OMAE M. OTERI ©2011

- For instance, the producer when using the semaphore the consumer will not be able to

access them.

- In this case, there is mutual exclusion.

Monitors:

Monitors are programs written to facilitate mutual exclusion where if a process is accessing this

program, no other process can be allowed to access the program at the same time.

These monitors act as subroutines.

Dead lock:

Is a situation where processes are not able to continue with execution.

Since they are waiting for another resource being held by another process.

For instance process A requires resources C and process B has resource D.

Process A requires resource D to continue operating also process B requires resource C to continue

operating and if the processes are not in a position to release the resources then they will be in

starvation – a deadlock has occurred.

Conditions necessary for a deadlock to occur:

1. Hold and wait.

2. Mutual exclusion.

3. Non pre-emption.

4. Circular wait.

Hold and wait:

This occurs when a process holds onto a resource waiting for another resource so that it can

complete execution.

Another process could be also holding and waiting and since they are not ready to release the

resources a deadlock can occur.

Page 29: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

29 Compiled by OMAE M. OTERI ©2011

Mutual exclusion:

A resource is supposed to be accessed by one process at a time.

One process will take too long with the resource.

Non pre-emption:

In this case, a process will continue using a resource till it completes execution and then release it.

Circular wait:

- One process waiting for a resource being used by a process next to it.

- Approach to solving deadlocks:

There are 4 methods used to solve deadlocks:

Ostrich approach.

Deadlock detection.

Deadlock prevention.

Deadlock avoidance.

1. Ostrich approach:

This involves continuing with operation without solving the deadlock problem.

2. Deadlock prevention:

This involves eliminating the causes of a deadlock.

This can be done by looking into the causes or the conditions which are necessary for deadlock.

These conditions are:

- Hold and wait.

- Circular wait.

- Non pre-emption.

- Mutual exclusion.

Page 30: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

30 Compiled by OMAE M. OTERI ©2011

Hold and wait:

This condition can be avoided by requiring that a process requests for all the resources that will

enable its execution to completion at the same time.

For instance if a process requires 5 registers, it will request them at the same time even if it will be

using them at different times.

This will waste time for other processes. Since some of those resources will be idle when other

processes could be using them.

Circular wait:

To prevent this, one should break the circular wait by making sure that processes wait for resources

in a sequence from either increasing or decreasing.

Non pre-emption:

This can be achieved by being able to get resources from a process even before it is complete with

its execution.

It should be noted that the process stopped so that it can pick from that particular point to complete

execution later.

Mutual exclusion:

Several processes can be allowed to access a resource at the same time. This can work with

resources that have not been changed or don’t require to be changed.

3. Deadlock detection:

This involves a situation where a deadlock has already occurred and something needs to be done

to recover from it after detection.

This can be done by going through several iterations to check whether there is a deadlock.

If there is a deadlock, several propositions are made on how to recover from the deadlock.

a) The processes involved are not assigned any other resource.

Page 31: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

31 Compiled by OMAE M. OTERI ©2011

b) Kill one of the processes involved.

c) Also one can block the process.

4. Avoidance of deadlock:

This is done by assigning resources to processes in a way that a deadlock will not occur.

The deadlock conditions remain.

Memory management:

This is one of the functions of an operating system where it allocates and de-allocates memory

spaces in a digital system.

Memory – these are spaces in digital systems in terms of register or other forms use to store

information buffers.

Features of memory:

1. Capacity.

2. Speed.

3. Cost.

4. Volatile or not.

The different kind of memory found in a digital system are given below with some features:

- Registers.

- Cache

- Main memory.

- Magnetic disks.

- Magnetic tape.

- Optical

Kind of memory Capacity Speed

Registers Bytes Close to CPU speed

Cache Kb ns

Main Mb-Gb 𝜇𝑠

Magnetic disk Gb ms

Magnetic tape No limit offline

Optical

Page 32: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

32 Compiled by OMAE M. OTERI ©2011

Functions of OS in relation to memory management:

1. Allocation:

Gives memory spaces to processes.

2. Protection:

Involves protection from other processes.

3. Isolation:

Exclusive use of a space by a process.

4. Modular programming support:

Support modules which can be stored.

5. Long term storage:

Information which can be stored for use for a long time.

Basic memory management:

This can be divided into two sections i.e. memory management without swapping and paging and

one that uses the two.

Taking an example of a computer memory can be organized as follows:

CPU registers – cache RAM.

Main RAM – virtual memory.

Mono-programming without swapping:

This involves execution of a process to completion before another process can start execution.

The running process will occupy space in memory together with the OS.

Process

OS

When the first process completes execution, a second process would be brought in to overwrite

the first one to start execution.

Page 33: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

33 Compiled by OMAE M. OTERI ©2011

Multi-programming with fixed partitions:

- This is where several processes can occupy memory at the same time in partitions that are

fixed.

- A process that fits into a given space is allotted that space.

- This can be done by using one queue or several queues.

- For one queue, the OS looks for a partition large enough to take the process and allocate it.

It sometimes has a disadvantage in that a process might take space which it does not perfectly fit.

The extra space will be wasted.

For multi-queue.

This uses processes with different space requirements where smaller processes have their own

queue as well as large processes.

The smaller processes will be given smaller spaces while the larger processes will be given larger

spaces.

For both cases, memory is divided into fixed partitions.

Page 34: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

34 Compiled by OMAE M. OTERI ©2011

Relocation and protection:

Relocation:

This will occur when an OS needs to place contents in given memory locations.

It depends on the different addressing modes for instance direct addressing mode; the contents will

be stored in memory locations starting from a given address.

For instance, if the starting memory address is 200 and the contents will take 100 spaces then the

contents will be starting from the 200 memory spaces.

If it is 100, then the contents will be stored from 100 – 200.

Protection:

- This is very important in multi-programming where several processes are expected to use

a given memory location.

- The OS is supposed to ensure that one process accesses the memory at any given time.

- This can be done by using 2 types of registers, namely status and limit registers.

- The status register is to indicate whether a given memory location is in use or not.

- If it is being used by another process, then other processes need to wait till it is free.

- The limit register is to indicate the size that is supposed to occupied by the process.

- Processes are not supposed to go beyond what they are supposed to use.

Swapping:

This is done such that if a process is using a memory location, it can be moved out and another

process comes in.

The process will have completed execution or it will be pre-empted.

Commonly used with multi-programming.

Page 35: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

35 Compiled by OMAE M. OTERI ©2011

Where A, B, C, D are processes and spaces are memory locations. `

Process swapped out of memory their information can be taken to virtual memory in the hard disk

or brought in late if need be.

If processes are removed from memory spaces, are left empty and the OS can do memory

compaction where the spaces occupied by other processes already in memory but piled together

with no spaces between them.

This process takes a lot of CPU time.

Memory management with bit maps:

- This involves partitioning the memory and assigning each partition a binary number.

- If a space is assigned 0, then it is empty and 1, it is occupied by a process.

- This information is stored in a bit map.

- The ones given as 0 represent a hole while the ones given 1 are occupied by a process and

indicated P.

Bit map.

111000111

Memory management with linked lists:

- This has a list indicating how the memory spaces are linked to each other.

- For the above example, the first process will be linked to the hole which is linked to the

second process.

- The list indicates the starting point of a process or hole and the length each occupies in

terms of partitions.

- This is indicated by the use of an arrow.

P1 => H => P21

Page 36: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

36 Compiled by OMAE M. OTERI ©2011

Incoming process use different algorithms to be able to occupy a given hole in the linked list.

The algorithms are given as;

- First fit.

- Next fit.

- Best fit.

- Worst fit.

First fit:

The operating system searches through the linked list and the first space that is enough for the

process.

The process will be given that space.

This algorithm wastes space since the process can occupy a space and whatever is left will be a

waste.

Next fit:

The OS will start looking for another hole from where it stopped the last time it got an empty

space-hole.

This means that the second process will occupy a hole after the hole occupied by the first process

big enough to support it.

Best fit:

This involves looking for a hole which is exactly the same as what the process requires or some

hole that is almost the same size to minimize space wastage.

Worst fit:

This is where a process is put into a memory space large enough to be broken to give a hole also

large enough to take another process.

Page 37: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

37 Compiled by OMAE M. OTERI ©2011

Example:

P1 = 100K

Holes: H1 = 300K H2 = 120K H3 = 200K H4 = 110K

Virtual memory:

This is space in a hard disk that can be used as suitable memory since the main memory is not

enough for processes to execute to completion.

This is important since processes that require a lot of memory space can be able to continue

executing with some information in main memory and other information in the virtual memory.

In most cases, the information which is not very urgent is kept in the hard disk’s virtual memory.

Virtual memory is allocated automatically by the OS when loading but one can also specify from

the control panel.

It is organized in page form occupying spaces from a given point to a given location.

Paging:

Process of specifying memory locations in the hard disk virtual memory.

The location can be in terms of 4K, 8K….

If a process requires main memory and virtual memory, then memory mappings should be done.

Main memory partitions are usually called frames and the ones in virtual memory can be called

pages.

For instance if a process required 64K and main memory is 32K then 32K contents will go into

main memory and remainder goes into virtual memory.

The main memory also need to be in partitions of 4K.

The first contents can be swapped out as the other contents are brought in from the virtual memory

but not at the same time.

These are algorithms used to map contents into memory given by:

- Optimal replacement.

- Not recently used,

Page 38: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

38 Compiled by OMAE M. OTERI ©2011

- First in first out.

- Second chance.

- Least recently used.

Optimal replacement:

This is where the OS swaps out a process that will not be referenced in a given time.

For instance if there are two processes in memory P1 and P2.

P1 will be referenced in the OS and P2 in the next 0.5s.

P1 will be swapped out since the time for it to be accessed is longer than that of P2.

The disadvantage to this method is that the OS needs to know in advance the time the processes

will be referenced.

This is mostly theoretical.

Not recently used:

This looks at whether the process has been referenced or modified in a given time.

The OS divides the process as follows.

0- Not referenced not modified

1- Not referenced modified

2- Referenced not modified.

3- Referenced and modified.

Using the above classifications then the process not referenced and not modified (0) will be

swapped out of memory since it is not in high demand as compared to others.

First in first out:

This involves a situation where processes are swapped according to whether it is the first one that

came in or not when comparing with others.

Page 39: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

39 Compiled by OMAE M. OTERI ©2011

Advantage:

This is the simplest in terms of implementation.

Disadvantage:

A process that came in earlier than all the rest may be heavily referenced memory that it will come

back almost immediately.

Second chance:

This tries to solve the problem of FIFO.

This process instead of being swapped out will be put to the queue as a new process and its

reference bit (R) is reset indicating that when a process comes to be swapped since the R bit is 0 it

will be swapped out this time.

Least recently used (LRU):

- This looks at the frequency of use of a given process in the recent time duration.

- If a process is referenced not many times as compared to the rest, it will be swapped out.

- This requires that information of process referencing per given time is stored in some

database.

Input – Output management:

- This involves the management of information devices.

- Input devices examples are: mouse, keyboard, scanner, camera etc.

- The input devices will communicate using the operating system through interrupts.

Input – Output hardware:

This includes the several devices mentioned above.

Page 40: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

40 Compiled by OMAE M. OTERI ©2011

They communicate by sending or receiving information in different ways.

Examples:

- Block or characters.

- Sequential or random.

- Synchronous or asynchronous.

- Dedicated or shared.

Block of characters:

For block, it means that information is entered or received in block form.

The blocks could be divided into bytes which are received at the same time.

For character, information is sent or received in character form where each character is taken and

stored or passed to a given device.

Sequential or random:

Sequential information is sent or received in a given sequence may be starting from the first to the

last.

Random – information sent or received where the sequence is not important.

Synchronous or asynchronous:

Synchronous – this requires the sending or receiving to be timed and therefore synchronized.

Asynchronous – there is no clock control in the receiving or sending of information by the devices.

Dedicated or shared:

Dedicated – this is where a device serves only one process at a time.

Shared – this is where several processes could share the device.

Page 41: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

41 Compiled by OMAE M. OTERI ©2011

Device controller:

This is the electronics involved in controlling a given device.

The device itself is mechanical which has to be inserted in a slot on the main board.

But electronic components that form the device is called device controller.

It consists of registers which receive control information from the OS.

For instance, a floppy controller can receive several instructions like read, write, format, seek etc.

Polling:

If a given device is in use, then another process that needs to use it has to wait.

The device could have a status register that indicates the status of the device.

If it is busy, then the status register could be 1 and if not it could be 0.

If a process finds the device, then status register 1 then indicates that the device is busy and

therefore should continue waiting till register is 0.

The process of waiting is called polling.

Direct Memory Access:

Processes are able to access memory without going through the CPU.

This gives the CPU more time to perform other functions.

CPU can initiate the process of accessing memory but then it leaves the processes on their own to

read or write from memory.

As the processes are accessing memory, the CPU performs other functions and it could come to

process after an interrupt is received from that process.

Input – output software:

- This is the software involved in managing input – output devices.

- Has different sections that include:

o User level software.

Page 42: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

42 Compiled by OMAE M. OTERI ©2011

o Hardware independent software.

o Device drivers.

o Interrupt.

o Hardware.

User level software:

- This deals with I/O calls and spooling.

- Spooling is where information is stored to be operated on, it is utilized in printer access by

processes.

- Hardware independent software:

- Deals with allocation, naming, storing (buffering), protection and blocking of I/O devices.

Device drivers:

These are used to communicate with OS i.e. act as infrastructure between OS and hardware.

For I/O devices, the drivers will be checking whether the registers are free so that they can be used.

(Check status).

Interrupt:

This wakes up a process that was blocked.

It is under software interrupts.

Hardware:

Performs I/O operations.

File management system:

This is the process which involves operation, naming, storage, access, protection and

implementation of files in a computer.

File – a collection of information defined by a user.

Page 43: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

43 Compiled by OMAE M. OTERI ©2011

File naming:

- Is the process of giving unique identifiers to a files.

- Files can have names with characters of up to 255.

- DOS allows 8 characters with an extension of 3 characters.

- Most files can be identified by the kind of process creating that file.

- This is given as an extension after period.

For instance:

doc => word

xls => Excel

ppt => power point.

html => internet files

sav => SPSS

File structure:

This gives information about how a file is formed.

There are 3 types:

- No specific structure.

- Structure with fixed blocks.

- A tree structure.

No specific structure:

This has a file in terms of bits which are not structured.

The OS receives the bits without the use of a format.

Structure with fixed blocks:

This is where a file is in terms of bits which are divided into blocks.

These bits are received in block form.

Page 44: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

44 Compiled by OMAE M. OTERI ©2011

A tree structure:

The files are in terms of keys.

When the file is being searched for the key is used to identify that file.

File types:

- Files can be in character or in block form.

- For character files; will be given in terms of single characters.

- For block files; will be given as blocks of characters.

- There are also those that come in ASCII format.

- ASCII – American Standard Code for Information Interchange.

- A character given in terms of a string of bits (7 bits) 0001011.

File Access:

Files can be accessed either sequentially or randomly:

1. Sequential:

Files are accessed one section at a time following each other mostly applied in magnetic tapes.

2. Random:

Files are accessed from any section of the storage medium.

For instance hard disk; sectors are accessed by the cylinder head at a different locations that don’t

follow each other.

File Attributes:

These are features of a file.

When a file is retrieved, it comes with its attributes.

Some of these include:

- Name.

- Creator.

- Size.

Page 45: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

45 Compiled by OMAE M. OTERI ©2011

- Maximum size.

- Location.

- Date (created, last modified).

- Protection (password or not).

- Read only, archive, hidden.

File operations:

- Write.

- Read.

- Create.

- Delete.

- Open.

- Close.

- Append (add to the end of the file).

- Seek.

- Get attributes.

- Change attributes.

- Rename.

File implementation:

This indicates the way files are stored in memory.

1. Contiguous allocation:

Files are allocated memory locations that follow each other.

For instance, a file is allocated memory locations 0, 1, 2, 3, 4.

This is an advantage in sequential access.

Disadvantage:

One needs to know the file size in advance.

Page 46: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

46 Compiled by OMAE M. OTERI ©2011

2. Linked list allocation:

This involves memory blocks allocated to a file in linked form.

The first block is used to link to the next block.

The link occupies the first section of the block.

Since the memory will be as a power of two, it will be difficult for the OS to assign to files.

3. Linked list allocation with index:

The link words are stored in one location and not in each block – index.

When a file is accessed the link information is stored in memory.

This is a disadvantage for very large files since the index should be in memory.

4. Index – node:

This has all the attributes for a given file stored in the same location as that file.

These attributes are indexed.

For small files, the attributes will be stored in the address spaces and given memory blocks.

Page 47: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

47 Compiled by OMAE M. OTERI ©2011

According to the size of the file, the larger it is the more space it will require.

One moves single indirect blocks to triple blocks.

Unix uses this format.

File systems:

FAT – File Allocation Table- Win 95, 98, ME.

NTFS – New Technology File System- Win NT, 200, XP.

HPFS – High Performance File System.

Directories:

These are used to keep the structure of a file system.

Files of the same kind can be stored in the same directory.

It starts from root directory to others created by user.

Root directory => C, D, E………..

Page 48: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

48 Compiled by OMAE M. OTERI ©2011

In indicating the files and directories, one could use absolute or relative directories.

Absolute – PDE/ PDE 1/ LCCDE up to root directory.

Relative – PDE 1/ LCCDE working directory.

Directory operations:

- Read.

- Create.

- Delete.

- Open directory.

- Close directory.

- Rename.

Page 49: OPERATING SYSTEMS System: Features of a system.oomaelecturer.com/wp-content/uploads/edd/Operating... · 2018-01-01 · OPERATING SYSTEMS System: A combination of components put together

49 Compiled by OMAE M. OTERI ©2011

Directory implementation:

MS DOS:

This uses 32 bits.

Name Attributes Extension Reserved Date

Unix:

Uses index nodes – 16 bits.

2 (Index info) 14 (name)


Recommended