COMPSCI 340 Operating Systems

Introduction
COMPSCI 340
Operating Systems
Assignment 2 - User space file system
Worth 10%
Due date: 09:30pm 22nd Sept 2023
Total - 30 marks
In week 6, we introduced the FUSE (file system in user space) library. This assignment requires you to first
work with an existing user space file system, and then subsequently create your own.
Setup

  1. Environment:
    Do the assignment either on Ubuntu in the labs or on your own machine (using virtual machines,
    macOS, or Windows Subsystem for Linux version 2) or use FlexIT (flexit.auckland.ac.nz). Search for
    the “Ubuntu Linux 20.04” desktop icon after sign-in.
    Note: The markers will grade using FlexIT Ubuntu image.
  2. Files:
    Download fuse.py, passthrough.py, memory.py, and a2fuse1.py from Canvas -> Assignment 2
    page.
    These files have originally come from -
    • fuse.py It offers Python bindings for the FUSE filesystem, enabling developers to create
    custom filesystems in Python without altering kernel code.
    • memory.py It is a simple in-memory filesystem that carries out various filesystem
    operations without persisting any data to the actual disk.
    • passthrough.py A passthrough filesystem would allow you to mount a directory to
    another location in your file system and all operations you perform in the mounted
    location get transparently passed through to the original directory.
    Part 1: Familiarization with Existing User Space File System
  3. Create two directories: source and mount. Place files one, two, three and four (from
    Canvas) in the source directory.
  4. You will need two terminal windows open. Terminal One (to run the user space file system)
    and Terminal Two (for file operations).
  5. In Terminal One, run: python3 a2fuse1.py source mount
  6. In Terminal Two, do:
    ls -l source
    ls -l mount
    Question 1: [2 marks]
    Explain the Terminal Two output. What did you see and why was it like that?
    Question 2: [4 marks]
    In Terminal Two (within the ‘mount’ directory - perform “cd mount” first), execute:
    cat > compsci340.txt
    my compsci340 2023 assignment
    ^D (this is control-D)
    COPY the output generated by the user space file system in Terminal One and EXPLAIN each
    method called. You can get some information from the Python documentation and using man

在这里插入图片描述
在这里插入图片描述

  • 8
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值