Upload
ernie-piccio
View
221
Download
0
Embed Size (px)
Citation preview
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
1/25
Chapter 1
Introduction to Operating Systems
Prepared by: Romel L. Emperado
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
2/25
Grading System
Major Exams - 60% Participation - 10% Attendance - 10% Quizzes - 20%
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
3/25
1.1 General Definition
An OS is a program which acts as aninterface between computer system usersand the computer hardware.
It provides a user-friendly environment inwhich a user may easily develop andexecute programs.
So, it can be said that an OS hides thecomplexity of hardware from uninterestedusers.
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
4/25
1.1 General Definition
In general, a computer system has someresources :
Memory Processor(s) I/O
o A hardware interruptis an electronic alerting signalsent to the processor from an external device.
o A software interruptis caused either by anexceptional condition in the processor itself.
File System and etc.
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
5/25
1.1 General Definition
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
6/25
1.1 General Definition
The OS manages these resources and allocates them tospecific programs and users. With the management ofthe OS, a programmer is rid of difficult hardwareconsiderations.
An OS provides services for:
Processor Management
Memory Management File Management
Device Management
Concurrency Control
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
7/25
1.1 General Definition
Another aspect for the usageof OS is that; it is used as apredefined library for
hardware-software interaction.
This is why, system programsapply to the installed OS
since
they cannot reach hardware
directly.
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
8/25
1.1 General Definition
Since we have an already written library,namely the OS, to add two numbers wesimply write the following line to our program:
c = a + b ;
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
9/25
1.1 General Definition
in a system where there is no OS installed, we shouldconsider some hardware work as:
(Assuming an MC 6800 computer hardware)
LDAA $80 - Loading the number at memory location 80
LDAB $81 - Loading the number at memory location 81
ADDB - Adding these two numbers
STAA $55 - Storing the sum to memory location 55
As seen, we considered memory locations and used ourhardware knowledge of the system.
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
10/25
1.1 General Definition
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
11/25
1.1 General Definition
With the advantage of easier programmingprovided by the OS, the hardware, itsmachine language and the OS constitutes a
new combination called as a virtual(extended) machine.
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
12/25
1.1 General Definition
In a more simplistic approach, in fact, OS itself is aprogram.
But it has a priority which application programs dont
have.
OS uses the kernel modeof the microprocessor,whereas other programs use the user mode. Thedifference between two is that; all hardware instructionsare valid in kernel mode, where some of them cannotbe used in the user mode.
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
13/25
1.1 General Definition
The processor switches between the two modesdepending on what type of code is running on theprocessor.
When you start a user-mode application, it creates aprocess for the application. The process provides theapplication with a private virtual address space and aprivate handle table.
A processor running in user mode cannot access virtualaddresses that are reserved for the operating system.
All code that runs in kernel mode shares a single virtualaddress space.
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
14/25
1.1 General Definition
This diagram illustrates communication between user-mode and kernel-mode
components
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
15/25
1.2 History of Operating Systems
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
16/25
1.2 History of Operating Systems
It all started with computer hardware in about1940s.
ENIAC
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
17/25
1.2 History of Operating Systems
ENIAC (Electronic Numerical Integrator andComputer), at the U.S. Army's AberdeenProving Ground in Maryland.
o built in the 1940s,o weighed 30 tons,
o was eight feet high, three feet deep, and 100 feetlong
o contained over 18,000 vacuum tubes that werecooled by 80 air blowers.
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
18/25
1.2 History of Operating Systems
Programs were loaded into memory manuallyusing switches, punched cards, or papertapes.
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
19/25
1.2 History of Operating Systems
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
20/25
1.2 History of Operating Systems
Finally, the idea of multiprogrammingcame.
Multiprogramming means sharing of
resources between more than oneprocesses.
By multiprogramming the CPU time is notwasted, because, while one process moveson some I/O work, the OS picks anotherprocess to execute till the current oneasses to I/O o eration.
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
21/25
1.2 History of Operating Systems
With the development of interactivecomputation in 1970s, time-sharingsystemsemerged.
In these systems, multiple users haveterminals (not computers) connected to amain computer and execute the task in the
main computer.
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
22/25
1.2 History of Operating Systems
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
23/25
1.2 History of Operating Systems
Another computer system is themultiprocessor system having multipleprocessors sharing memory and peripheral
devices. With this configuration, they have greater
computing power and higher reliability.
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
24/25
1.2 History of Operating Systems
Multiprocessor systems are classified into two as tightly-coupledand loosely-coupled(distributed).
In the tightly-coupled one, each processor is assigned aspecific duty but processors work in close association,possibly sharing the same memory.
In the loosely coupled one, each processor has its ownmemory and copy of the OS.
8/13/2019 155 - Introduction to Operating System - Chapter1 (1)
25/25
1.2 History of Operating Systems
In network systems, each process runs in its ownmachine but the OS have access to other machines.By this way, file sharing, messaging, etc. becamepossible.
Distributed systemsare similar to networks. Howeverin such systems, there is no need to exchangeinformation explicitly, it is handled by the OS itselfwhenever necessary.
Most distributed processing systems containsophisticated software that detects idle CPUs on thenetwork and parcels out programs to utilize them.