MC504 Sistemas Operacionais
Prof. Dr. Eng. Isaías Bittencourt Felzmann
isaias@ic.unicamp.br
Campinas, 2º ano/2026
Armazenamento e Arquivos
1/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Copyright Note
The following set of slides are copyright Silberschatz, Galvin and Gagne, 2018. Modifications were made for their use in conjunction with MC504. The original material is available at os-book.com .
Os direitos autorais do conjunto de slides a seguir pertencem a Silberschatz, Galvin and Gagne, 2018. Foram feitas modificações para seu uso em MC504. O material original está disponível em os-book.com .
Este material foi elaborado com apoio de ferramentas de IA generativa como recurso auxiliar. O conteúdo foi revisado, validado e é de responsabilidade do docente.
2/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Sistemas de Armazenamento
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
3/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Objetivos
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
4/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Visão geral da estrutura de armazenamento em massa
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
5/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Mecanismo de disco com cabeça móvel
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
6/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
A primeira unidade de disco comercial
1956
O computador IBM RAMDAC incluía o sistema de armazenamento em disco IBM Model 350
5M caracteres (7 bits)
50 pratos de 24”
Tempo de acesso < 1 segundo
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
7/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Dispositivos de Memória Não Volátil
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
8/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Dispositivos de Memória Não Volátil
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
9/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Memória Volátil
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
10/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Mapeamento de Endereços
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
11/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Escalonamento de HDD
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
12/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Escalonamento de disco (cont.)
� 98, 183, 37, 122, 14, 124, 65, 67
Posição inicial da cabeça: 53
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
13/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
FCFS
A ilustração mostra um movimento total da cabeça de 640 cilindros
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
14/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
SCAN
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
15/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
SCAN (cont.)
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
16/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
C-SCAN
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
17/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
C-SCAN (cont.)
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
18/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Escalonamento NVM
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
19/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Gerenciamento de Dispositivos de Armazenamento
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
20/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Estrutura RAID
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
21/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
RAID (cont.)
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
22/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Níveis RAID
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
23/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Conceito de Arquivo
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
24/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Atributos do Arquivo
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
25/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Estrutura do Diretório
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
26/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Operações de Arquivo
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
27/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Arquivos Abertos
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
28/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Estrutura do Arquivo
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
29/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Acesso Sequencial
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
30/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Acesso Direto
n = número relativo de blocos
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
31/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Uma organização típica de sistema de arquivos
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
32/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Operações realizadas no diretório
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
33/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Diretório de Nível Único
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
34/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Diretório de Dois Níveis
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
35/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Diretórios Estruturados em Árvore
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
36/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Diretórios em Grafo Acíclico
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
37/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Diretórios em Grafo Acíclico (cont.)
Soluções:
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
38/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Diretório em Grafo Geral
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
39/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Proteção
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
40/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Permissões Unix
41/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Estrutura do Sistema de Arquivos
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
42/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Sistema de Arquivos em Camadas
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
43/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Camadas do Sistema de Arquivos
Dados comandos como
Unidade de leitura 1, cilindro 72, faixa 2, setor 10, para a localização de memória 1060
Envia comandos específicos de hardware de baixo nível para o controlador de hardware
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
44/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Camadas do Sistema de Arquivos
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
45/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Camadas do Sistema de Arquivos
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
46/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Bloco de Controle de Arquivo (FCB)
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
47/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Estruturas do Sistema de Arquivos em Memória
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
48/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Método de Alocação Contígua
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
49/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Alocação Contígua (cont.)
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
50/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Alocação Encadeada
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
51/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Exemplo de Alocação Encadeada
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
52/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Método de Alocação FAT
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
53/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Exemplo de FAT
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
54/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Método de Alocação Indexada
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
55/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Exemplo de Alocação Indexada
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
56/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Alocação Indexada – Esquema de Dois Níveis
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
57/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Esquema Combinado: UNIX
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
58/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Desempenho
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
59/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Gerenciamento de Espaço Livre
tamanho do bloco = 4KB = 212 bytes
tamanho do disco = 240 bytes (1 terabyte)
n = 240/212 = 228 bits (ou 32MB)
se clusters de 4 blocos -> 8MB de memória
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
60/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Lista Encadeada de Espaço Livre
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
61/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
TRIM de Blocos Não Utilizados
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
62/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Recuperação
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
63/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Sistemas de Arquivos com Log
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
64/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais
Bibliografia
Capítulo 4.
Capítulos 11, 13 e 14.
65/65
2s/2026
IC/UNICAMP – MC504 Sistemas Operacionais