Monday, October 31, 2011

Second theoretical presentation.

There is the presentation of the theoretical part


This is for the File System part..


All we know how the file systems works like a tree.

In this moment all know about NTFSext3 and ext4 so i just add a little description. (if you want the there are links to wikipedia for read more about FS, etc) 

NTFS supersedes the FAT file system as the preferred file system for Microsoft’s Windows operating systems. NTFS has several improvements over FAT and HPFS  such as improved support for metadata and the use of advanced data structures to improve performance, reliability, and disk space utilization, plus additional extensions such as security access control lists (ACL) and file system journaling.


The ext3 is a journaled file system that is commonly used by the Linux kernel. It is the default file system for many popular Linux distributions, including DebianStephen Tweedie first revealed that he was working on extending ext2
 ext4 developed as the successor to ext3Was included in version 2.6.19 of the Linux kernel.


To edit files in code we need to implement
open(Open the file)
read(Read the file)
write(Write file)
close(Close file)
delete(Delete file)
append(add )
seek(Search)
rename(Change name)

So we make a code to compare the size of all the files in some directory's


#!/usr/bin/python
f = open(archivoEntrada, "r")
lineas = f.readlines()
numeros = []
bytes = []
kbytes = []
mbytes = []
for linea in lineas:
    num = linea.strip()
    if len(num) > 0:
        if len(num) > 1:
            id = num[-1]
            restante = num[:-1]
            if restante.isdigit():
                if id == 'K':
                    kbytes.append(num)
                elif id == 'M':
                    mbytes.append(num)
                else:
                    bytes.append(num)
            #print linea[:-2]
           
nbytes = 0
nMbytes = 0
nKbytes = 0

for byte in bytes:
    nbytes += 1
    numero = int(round(float(byte[:-1])))
    numeros.append(numero)
for kbyte in kbytes:
    nKbytes += 1
    numero = int(round(float(kbyte[1:-1])))*1024
    numeros.append(numero)
    
for mbyte in mbytes:
    nMbytes += 1
    numero = int(round(float(mbyte[1:-1])))*1024*1024
    numeros.append(numero)


distintos = {}
for num in numeros:
    if num not in distintos:
        distintos[num] = 1
    else:
        distintos[num] +=1
        

resultados = distintos.items()

for res in resultados:
    print "%d\t %d"%(res[0], res[1])


We select home, usr, sbin and lib.
Red point = each file
y = frequencies of files with the same size
x = Files size on kbytes

../home


../usr

../sbin

../lib


Saludos..
Jorge - Jose - Richi

6 comments:

  1. con 30 page frames solo se causan los Page Faults necesarios para cargar en memoria todas las paginas?
    me imagino que es porque son mas los Frames que los procesos, seria bueno poner esos datos para que sea visible el porque no aparecen tantos page faults al utilizar esa cantidad de frames.

    ReplyDelete
  2. Al parecer les falto lo de file system :(, bueno aqui les dejo una liga que lo explica muy bien desde el principio: http://exa.unne.edu.ar/depar/areas/informatica/SistemasOperativos/SO4.htm
    a mi me sirvio espero que ustedes tambien, y pues para lo del codigo les recomiendo que lean los comentarios que pone nachOS en sus archivos de Filesys, ayudan mucho para entender un poco mas :).

    ReplyDelete
  3. Estas en lo cierto en lo de los 30 page frames Everardo Medina, el máximo de procesos distintos fueron 30 por lo que una vez todos cargados no tenemos mas page faults, en realidad deberian de aparecer como unos 20 o 10 page faults, pero acabo de detectar una falla en el codigo que provoca que parece que con 30 page frame solo en las primeras iteraciones hay page faults

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Gracias por el link Obed, no mostramos file system por que dejamos todo para el final =), pero estoy checando la información del link y se ve muy completa

    ReplyDelete
  6. Estudios sobre el desempeño de memoria virtual +2
    Explicación en pseudocódigo sobre el funcionamiento de VM +2
    Estudios sobre el desempeño de sistemas de archivos +1
    Explicación en pseudocódigo sobre el funcionamiento de FS +2

    En gnuplot, use "set pointsize 2" o algo para puntos más grandes ;)

    +1 por diapositivas en inglés, +1 por presentación casi en inglés, +1 por extra contenido en la entrada.

    7+2 NT2

    ReplyDelete