Você está na página 1de 145

:

spzygouris@gmail.com

1.1 (Operating System)




...
Hardware Software


, ,
/.
/.

1.1 (Operating System)

( )

/


Windows

.. .

1.1 (Operating System)
1.1.1 ..
.. (Software= )

.

Media player

notepad

zip

explorer
interface
..
(- Interface) .

/.

/.

/. /
.

(RAM) (/).

RAM

1.1 (Operating System)
1.1.1 ..
..
... (CPU)
.

-(Input-Output I/O)
() .

OUTPUT
INPUT

RAM

1.1 (Operating System)
1.1.1 ..
..
.

exe exe


/ .

1.1 (Operating System)
1.1.2 /
(Environment ) ..

&

Environment ( )



-File System
Operating System
(Kernel)



Hardware

.. :
(Kernel)

(User Interfaces )

(Utilities)



1.1 (Operating System)
1.1.3 (Kernel) ..
.. (Hardware).



-File System
Operating System
(Kernel)

/ ,
(RAM)
, /.
/ ( ) .

-Kernel
RAM RAM



1.1 (Operating System)
1.1.3 (Kernel) ..
:



-File System
Operating System
(Kernel)

(Hardware) ()
(Interrupts).




.

.

C.P.U.

(Kernel)

1.1 (Operating System)
1.1.4 (User Interface)
To .. ( )
(Command Interpreter) (Shell)


-File System
Operating System
(Kernel)

.. .

.. :
MS-DOS COMMAND.COM

UNIX Sh
.. (Graphical User Interface-GUI):

Windows .

UNIX X Window System.

Linux X Window System.



1.1 (Operating System)
1.1.5 (Multiprogramming)
(Multiprogramming)
.. .

winamp

Word

Winzip

explorer

(Multi-user)
.. (user).
(Single-user)
.. (user).

1.1 (Operating System)
1.1.5 (Multiprogramming)


.
( , )



.. ..

.
(Response Time)
(=) .

1.1 (Operating System)
1.1.6 (Multitasking)
(Multitasking) ..
.
, .

:

.
.

videolearner.com
youtube.com

1.1 (Operating System)
1.1.6 (Multitasking)
:

:
spzygouris@gmail.com

:
spzygouris@gmail.com

2
2.1 (File System)
2.1.1
/ .

C:\Documents and Settings\user\ \Leitourgika.doc

..

File System
/ (secondary storage).
..


.
:

1000 (RAM)

2
2.1 (File System)
2.1.1
(files).
(data set)

video




, / = (File Name)

C:\Documents and Settings\user\ \EPAL\Bp1\Leitourgika.doc

C:\Documents and Settings\user\ \EPAL\Leitourgika.doc



2
2.1 (File System)
2.1.2 (File System)
/ .

.. .
(File System), .. /.

.
:

User 1 User 2 User 3 Administrator

( -
)

Volume

2
2.1 (File System)
2.1.3 (Directory,Catalogue Folder)
.. .



(Folder Directories).

2
2.1 (File System)
2.1.3 (Directory,Catalogue Folder)
- .
: ,

,
User 1 User 2 User 3 Administrator

, .
:

Root Directory
Sub-Directories

2
2.1 (File System)
2.1.3 (Directory,Catalogue Folder)


.

2.1 31.


(current)
(working Directory).

.

.

2
2.1 (File System)
2.1.4

.
.
DOS Windows .

2
2.1 (File System)
2.1.4

.
.
.

.. My Documents\letter.doc

(suffix extension)
Windows 255

.

2
2.1 (File System)
2.1.4



.
.
:



(password) .

2
2.1 (File System)
2.1.4

.

/.

.


.

2
2.1 (File System)
2.1.4

.


,
.



2
2.1 (File System)
2.1.4



2
2.1 (File System)
spyros.mp3
2.1.5 (File System ) spyros.mpeg
spyros.doc
/ , .
.

.
.
.

(Absolute Pathname) ..:

C:\Documents and Settings\user\ \ \pueblo.jpg

\ .
: ..
.
C:\Documents and Settings\user\ \ \pueblo.jpg

C:\Documents and Settings\user\Back Up\ \pueblo.jpg

..
C:\Documents and Settings\user\ \ \pueblo.jpg

\ . \ \pueblo.jpg

2
2.1 (File System)
2.1.6 Windows

2
2.1 (File System)
2.1.7
(Data Files)
, 0 1.
.
.
.

2
2.1 (File System)
2.1.7 ASCII
(Text Files)
ASCII UNICODE.
.

2
2.1 (File System)
2.1.7
(Program Files)
.
0 1.
/
(Executable File).

2
2.1 (File System)
2.1.7
(System Files)
..

(Device Files)
(.. CD) .. .

2
2.1 (File System)
2.1.7
(Temporary Files)
..

2
2.1 (File System)
2.1.7
(Printer ,Spooler Files)
.

2
2.1 (File System)
2.1.7
(Back up Files)
. .

(Batch Files)
..
.
.

2
2.1 (File System)
2.1.8
:
1.
.
2.
.
3.
.
4. (back up copies)
, .

2
2.1 (File System)
2.1.9
..
.. .
(Format).
(format) -Tracks.
Tracks -Sectors Blocks.
-Sectors .
-Track -Sectors
- Blocks.
-Sector bytes-.

. 1
1
2 1
. 1 2 1 1
3 2 2 1 1
3 2 1 3 2
1 1 1 1 1 1 1
1 2 1 2 2
2 2 3
2 3
3



2
2.1 (File System)
2.1.9

2
2.1 (File System)
2.1.9

2
2.1 (File System)
2.1.9
(block).
(block) ..
:
128 Bytes
256 Bytes
512 Bytes
1024 Bytes
blocksize.

blocksize

2
2.1 (File System)
2.1.9
bytes
(read)
(write)
(block) .
.
:
( , , )
(surface , track , sector)

0,3,200

2
2.1 (File System)
2.1.9 0
1
2
3

0
1
2
3 0?
(?, 4)
6,?
4
5
6
7
8
9
10
11
12
0 13
14
1 2
0 3
11 4
10 5
9 6
8 7

2
2.1 (File System)
2.1.10



,
.
( )
.. ( =)

(I/O Requests) ..

: (Read,write,)
(C:)

2
2.1 (File System)
2.1.10

(C:)

2
2.1 (File System)
2.1.10



,
.
( )
.. ( =)

(I/O Requests) ..

: (Read,write,)
(C:)
(1 ,2 , 3 )

2
2.1 (File System)
2.1.10
(1 ,2 , 3 )

0
1
2
3
4
5
6 0?
(?, 4)
6,?
7
8
9
10
11
12
0 13
14
1 2
0 3
11 4
10 5
9 6
8 7

2
2.1 (File System)
2.1.10



,
.
( )
.. ( =)

(I/O Requests) ..

: (Read,write,)
(C:)
(1 ,2 , 3 )
( ..)
(blocks) .

.. block ,
(Queues) .
(-)

2
2.1 (File System)
2.1.10
...
/.
.

.. .


(C.P.U. intensive) ,
...
:

(Wait Time).
(track) head (seek Time).


(Rotanional Delay Latency Time).

blocks (Transfer Time) .



2
2.1 (File System)
2.1.11
:
(Contiguous Allocation) Free Sectors
3
) .. . 4 2 3
5 4
1
) . 6
7 5
0
7 6
925 kbytes < 1024 kb

) .. .

) ,
.
)
(Rebuild -)

) (Fragmentation)
.

2
2.1 (File System)
2.1.11

Fragmentation

File A
File B
File C
File B
File D,

.

2
2.1 (File System)
2.1.11
(Linked Allocation)
) .. . 925 kbytes
Linked List
) , .. . 0
1
) , (Linked List). 2
3
-
)
F
2 F


(Free List).
Free List
3 1 5
4

F 4 6 7

0
) .. 8 9

9 .
F 5
F

6 8
7
F F ) ,
F .

)
.

) .. .

DOS File Allocation Table FAT.
O FAT .
FAT .

2
2.1 (File System)
2.1.11

F
F F
F F
F F
F F
F

2
2.1 (File System)
2.1.11

, , .
, .

UnDelete
Delete

F
F

F
F
F


, (Undelete Unerase).

2
2.1 (File System)
2.1.11
/ ;
(blackout , ) ,
(R.A.M.) .

.
:

.
.

.
()
.
Windows (..) .

K
.CH



2
2.1 (File System)
2.1.11
/ ;
Windows (..) ( /)
,
.
(Scandisk),
.

( .. File00.CHK) ,
.

2
2.1 (File System)
2.1.12
, () .

Save
Delete

Modify

Modify

Modify

Modify

Modify

2
2.1 (File System)
2.1.12
, ,
(head)
.




2
2.1 (File System)
2.1.12

.. (
).
.
bytes .

2
2.1 (File System)
2.1.12

( ) ..
, (blocks)
.
.

, ..

.(2.10 49)

2
2.2
2.2.1
/ ( )
.

, ,

/ .

2
2.2
2.2.1
.. :
(Integrity)

(Security)

,, .

/ .

/ :





()



(Viruses)

2
2.2
2.2.2






:

(Backup)
(UPS)


(Backup)



(read,write,execute)
(Backup)

(Viruses) (Antivirus)

:
spzygouris@gmail.com

3 -
3.1 /
3.1.1
(Input) ... .
(Output) ... .

...
C.P.U.

R.A.M.

3 -
3.1 /
3.1.1
() ,
... ( ).

mainboard

CPU RAM
BIOS

I/O

3 -
3.1 /
3.1.1
/ ... (C.P.U.)
... .
.
... ( ).

3 -
3.1 /
3.1.2
()
...



/ (I/O Devices Units)
:

.


,
:
(Read)
(Write)
.. CD-R .

,CD,DVD.
: /.
(Interface Devices) / .
.. :
.. :

3 -
3.1 /
3.1.3 ..
(Dedicated Devices)
.
..
(Shared Devices)
.
..
(Virtual Devices)
..
(physical devices) .
.. .

(Block Devices)
(blocks).
.. .
(Character Devices)
(bytes).
.. -Mouse, .

(Terminals)
(multiuser systems) .
,
( )
.. -Mouse, .

3 -
3.1 /
3.1.4 /.
(Data Packets) ... .

RAM Screen Keyboard


F
S
B
CPU FRONT SIZE BUS

Hard Printer
Disk

.
:
8 bit 8 bit/sec ( Bus )
16 bit
32 bit
. 16 bit/sec .
64 bit /sec 32 bit/sec
128 bit 64 bit/sec
128 bit /sec
.
H R ,
CPU FSB.

3 -
3.1 /
3.1.4 /.
(Data Packets) ... .

RAM Screen Keyboard


F
S
B Bridge Bridge
CPU FRONT SIZE BUS
Bridge Bridge

Hard Printer
Disk

H R ,
CPU FSB,
,

(Controller)
Unit3
(Bridge)
B
. U
S

Unit1 BUS Bridge BUS Bridge BUS Unit2



3 -
3.1 /
3.1.4 /.
(mainboard)
( controllers ) ,
.
controllers (chip set)

3 -
3.1 /
3.1.4 /.
.
, (link channel) .

NorthBridge

SouthBridge

3 -
3.1 /
3.1.4 /.
H Northbridge (controller)
CPU,
RAM
AGP-Port PCI-Express.
RAM

CPU NorthBridge

AGP

PCI-E

SouthBridge

3 -
3.1 /
3.1.4 /.
H Southbridge (controller) , :
(hard disk),
/ (I/O devices)

RAM

CPU NorthBridge

AGP

PCI-E PCI

SouthBridge

3 -
3.1 /
3.1.4 /.
/
() ... /
.

K.M.E.
C.P.U. Controllers

(Interface Units),
( ),

.

/ (Controller) . :


R.A.M.
Hard Disk

K.M.E.
C.P.U.



3 -
3.1 /
3.1.4 /.
(Device )
/ (I/O).
.. /
.

I/O Device

Driver

3 -
3.2 / Windows
Windows :


(Control Panel) (System) (Device Manager)

click

click

click

3 -
3.2 / Windows
3.2.1
:

1. .
CD CD.
CD setup.exe click
.

click
click

click
click
click
click
click

3 -
3.2 / Windows
3.2.1
:
2.
My Computer( )
Add New Hardware ( )
Windows .
( CD)

3 -
3.2 / Windows
3.2.1
:
3. (Plug and Play PnP)
.. ,
.

, Windows
.

3 -
3.3 ..
)
(-drivers).
, ..
(Input).

Input Output

Driver Driver

) , ..
. (Input).

) , ..
. (Output).

) .. ,
, .

.. .

4
4.1
... () .
... , , .
.
... .
.72 Time

C.P.U.
Word Processor

Printing

Download

4
4.1
3 / , , , .

10 min .. 10 min .. 10 min ..


15 min MS-OFFICE 15 min MS-OFFICE
5 min Eurofasma

25 min 30min 10min 65 min


/ , B65 min B B
65 . 10 min 15 min 15 min 10 min 5 min 15 min

cd
40 min
/ 10 min 15 min 15 min
.
B B
10 min 5 min 10 min


.
.

4
4.1
:
.

.
:

,
.
CD
.
, .
.
/ .. :





.. .

4
4.1
.. (Process).

:
o (activity)
o (entity)
o (abstract object)

(occupies) .

.

(Process)
(Application)

4
4.1
:

4
4.1
,
.

.


10 min 15 min 15 min

B B
10 min 5 min 10 min

.

4
4.1
.. / ,
.
..
.
, .

(running) ..

(ready,runnable)

(blocked) ,

4
4.1
4.1.1
.. (sequential
processes).

(CPU)
.
,

2*

C.P.U.

4
4.1
4.1.1
/ .

, , ,

2* 2*
i1
> <


i 10

+ +
+i

- -
ii+2

C.P.U.1 C.P.U. 2 C.P.U.3 C.P.U.4



4
4.1
4.1.1
(concurrent) .

, , ,

2* 2*
i1
> <


i 10

+ +
+i

- -
ii+2

C.P.U.1 C.P.U.2 C.P.U.3 C.P.U.4



4
4.1
4.1.1
.

, , ,

2* 2*
i1
> <


i 10

+ +
+i

- -
ii+2

C.P.U.1 C.P.U. 2 C.P.U.3 C.P.U.4



4
4.1
4.1.1

... ,
... .

4
4.1
4.1.1
, .

, , ,

2* 2*
i1
> <


i 10

+ +
+i

- -
ii+2

C.P.U.

4
4.1
4.1.1
, .

, , ,

2* 2*
i1
> <


i 10

+ +
+i

- -
ii+2

C.P.U.

4
4.1
4.1.1
, multithreading .
(process)
.
' thread .
multithreading
threads .
(-) .
, (web browser)
thread
thread server.

Multitasking Multithreading


4
4.1
4.1.2
.. .

CD ,
.. 5 /.

5 ( 5 ) .

/, CD .
CD / ,
, .

, .
,
.

4
4.1
4.1.2
(parallel processes)
.


,
.
, ,

/2 2*

+ *

C.P.U.1 C.P.U. 2


4
4.1
4.1.2
(parallel processes)
.


,
.
, , ,
, .


/2 2*
( , ).

+ *

C.P.U.1 C.P.U. 2

,
.
.

4
4.1
4.1.2
:

+ *

C.P.U.1 C.P.U. 2



, ..

4
4.1
4.1.3
(mutual exclusion)

/2 2*

+ *

C.P.U.1 C.P.U. 2

.
.
.
.

4
4.1
4.1.3
(deadlock)
(Deadlock state) ,
(event)
.

2* 2*
i1
> <


i 10

+ +
+i

- -
ii+2

. DeadLock .
,
.

4
4.1
4.1.3
(starvation)
, .

, .
. +1.

>0 +1
.

.

, .
.

4
4.1
4.1.3
(contention)
,

(overhead) .

4
4.1
4.1.3

(cooperate), ,
,
(,event).
(process synchronization ) ,
.

, ,

/2 2*

+ *

C.P.U.1 C.P.U. 2

5
5.1
(RAM) ( ) /.
/.
.. (memory manager)
.

5
5.2 (Swapping) D
O
,
A
B T

RAM.
J A
/

(RAM) .

, (RAM).

.

.
(swapping ).
.

5
5.2 (Swapping)
RAM

CPU

HD

5
5.3 (Segments)
.. / .
( Segments )
.

,
,
.

5
5.3 (Segments)
_

:,,,


,,
(,,)
:,
_
(,,) :

:,,,max

max
> max TOTE
max
_
> max TOTE
max
_
max
_
,
.

5
5.4 (Single continuous allocation)
,
.
.
.

/
MS-DOS IBM OS/360 .

5
5.5 (Partitioned allocation)

.

.
(partitions) .
, , (
) .
3072
3

2048
2

1024
1
512

0

5
5.5 (Partitioned allocation)
(Static partition specification)
(partitions) .
.

4096
3

2048
2

1024
1
512

0

.

.

5
5.5 (Partitioned allocation)
(Static partition specification)
:
:
=100
=500
=800

4096
3
2848
800

2048
2
1524
500
1024
1
612
100
512

0
,

.
.. IBM OS/360 MFT (Multiprogramming with Fixed number of Tasks).

5
5.5 (Partitioned allocation)
(Dynamic partition specification)
.
,
.

512

0

.

.

5
5.5 (Partitioned allocation)
(Dynamic partition specification)
:
RAM .
500
.

300 100

300 ,
B 500 .

A 100




( ), .
.

5
5.5 (Partitioned allocation)
(Dynamic partition specification)

.

BM OS/MVT,

, Pascal,C .

5
5.6 (Virtual memory)



.
/.


,
Dynamic Relocatability .

,

Protection .

,

Capacity () .


(modules) ,
Format Set-up .

5
5.6 (Virtual memory)
(virtual memory)
.



.

(paging)
(segmentation)
.

5
5.7 (Paging)

.
R.A.M.

5
5.7 (Paging)
( )
( ,page size)
(page offset)
( )
(pages) .

0K - 4K 0
0K - 4K 0
4K - 8K 1
4K - 8K 1
8K - 12K 2
8K - 12K 2
12K - 16K 3
12K - 16K 3
16K - 20K 4
16K - 20K 4
20K - 24K 5

(page offset)
24K - 28K 6
,

28K - 32K 7
( ,active pages)
,
( ,inactive pages) .

5
5.7 (Paging)
, .. (page table) .
, , ,

.

0K - 4K 0
0K - 4K 0
4K - 8K 1
4K - 8K 1
8K - 12K 2


8K - 12K 2
12K - 16K 3
12K - 16K 3
16K - 20K 4
16K - 20K 4
20K - 24K 5

24K - 28K 6

28K - 32K 7

5
5.7 (Paging)
, .. (page table) .
, , ,

.

5
5.7 (Paging)
/ - words.
, .
,
.

0 0

1 1


0 2 2

0
3 3

4 4

5
5.7 (Paging) / 5
(25 0-24 25).

2
0
(10 0-9 10)
1
0 2
3
4
5 0
6 1

1 7 2
0
8 3
9 4
10 5
11
6
2 12
7
1
13
8
14
9
15
16
3 17
18
19
20
21
4 22
23
24

5
5.7 (Paging)
,
6

/ 1 ,
0
0, 1.
1
0 2
. . . .
3

4 0 X
5 1 0 0
6 2 1 1

1 7 3 X 2
0
8 4 X 3
9 4
10 5
11
6
2 12
7
1
13
8
14
9
15
16
3 17
18

( ).
19

20
.
21
.
4 22
23
24

5
5.7 (Paging) .
, .
0 :
1
0 2
. . . .
3

4 0 X
5 1 0 0
6 2 1 1

1 7 3 X 2
0
8 4 X 3
9 4
10 5
11
6
2 12
7
1
13
8
14
9
15
16
3 17
18
19
20
21
.
4 22
23
24

5
5.7 (Paging)
,

, ..

, .


. . . .

0 X
0
1 0
1
2 1
5 2
3 X 0
6 3
4 X
1 7 4
8
9

,
:
:


( )

( )


1 1 1

0

5
5.7 (Paging)
,
( page table register)
, .
,

().
, .
.





. . . .


( ) ( )
0 X

0 1




5
5.7 (Paging)
, ,
.
,
.. .
, , .

0
1
0 2
. . . .
3

4 0 1
X
5 1 1
0 0
6 2
1 1

1 7 3 1
X 2
0
8 4 0
X 3
9 4
10 5
11 6
2 12
13
7 FREE
1
8
14
9

, .

5
5.7 (Paging)


,
.


0
1
0 2
. . . .
3

4 0 X
5 1 0 0
6 2 1 1

1 7 3 X 2
0
8 4 X 3
9 4
10 5
11
6
2 12
7
13
1
8
14
9




5
5.7 (Paging)
(internal fragmentation),
, .


0 .
1

00 2 , 150.
3 8 20 .
4 10 .
5
1 6 20
1 7
8
20
20

150
9
10
20
11

00 12 20
13 20
14
15
20

1 16 20
1 17
18
,
19 ( ) .

5
5.8 (Segmentation)
, (modules).
.

module



module



module



module

,
.

5
5.8 (Segmentation)
,
(modules) ,
, ...
module
module


module



module



module

, ,
.

5
5.8 (Segmentation)
( )
.
, ,
( ) .

0

1

0 515 40 2
0

1 module
14 500 3

4

2 230 100 5

6
, 7

1

8

9
(. [ ]).

5
5.8 (Segmentation)


:



0 515 40 0 600
30
1 14 500
2 230 100 >
+ = 545

30<40 , .

, .
: 0 600

, .

5
5.8 (Segmentation)
(modules)

() , , .

module 1 a
module
2a

module
1b


module

2b


module 3 c


5
5.8 (Segmentation)
(external fragmentation)
.

C
K4

B

K3

K2
A

K1

(empty)
(holes).

.

5
5.8 (Segmentation)
.

module
module
module

5
5.8 (Segmentation)
1 ,2, 3, 4 () D 650KB
.
,
.

K4
C
K4
K3
D
K2
B
K1
K3
C
K2

A
K1
B (compaction)
A
K1
(compaction) ,
.

5
5.9 (Paged Segmentation)
,
, .
, .
(H/Y) (paged segmented machines)
,
.


module 1 a
0
module 2 a
1

2
0 module 1 b
3
4

5
module 2 b
6

7

1
module 3 c 515
8
0 40
9

.

,
,
.
.
,
.

5
5.8 (Segmentation)
(modules)

() , , .

module 1 a
module
2a

module
1b


module

2b


module 3 c

(external fragmentation)
.
(empty)
(holes).

.

5
5.8 (Segmentation)
1 ,2, 3, 4 () 650KB
.
,
.

(compaction) ,
.

K4 C
K4
K3

B K2

K3
C
K2

K1 A B
A K1

Você também pode gostar