Navid Malekghaini's Personal Blog

My personal weblog for sharing and storing some of my activities related to computer science over the internet

Navid Malekghaini's Personal Blog

My personal weblog for sharing and storing some of my activities related to computer science over the internet

Navid Malekghaini's Personal Blog

Navid Malekghaini

Software Engineer @ Intelligent Cloud Infrastructure Laboratory
Prev. ML Researcher @ University of Waterloo x Orange Telecom

University of Waterloo
Department of computer science
200 University Ave W, Waterloo, ON N2L 3G1, Canada
cs.uwaterloo.ca

contact me
navidmalekedu (AT) gmail (DOT) com [ Primary Email ]
nmalekgh (AT) uwaterloo (DOT) ca

۵ مطلب با کلمه‌ی کلیدی «operating system» ثبت شده است

NetBill Protocol in Theory

What is NetBill? [From Original Paper]

NetBill is a system for micropayments for information goods (digital commodities) on the Internet. A customer, represented by a client computer, wishes to buy information from a merchant’s server. An account server (the NetBill server), maintains accounts for both customers and merchants, linked to conventional financial institutions.

The NetBill Transaction Model [From Original Paper]

The NetBill transaction model involves three parties: the customer, the merchant and the NetBill transaction server. A transaction involves three phases: price negotiation, goods delivery, and payment.

NetBill Transaction Model

Download Implementation From Github With Detailed Explanations

Implementation Of NetBill Protocol

In this project me (Navid Malek) and my fellow friend Reza Rahimi implemented most of NetBill transaction protocol, including:

  • Transaction Protocol

Paper Sections

3.2. The Price Request Phase

3.3. The Goods Delivery Phase

3.4. The Payment Phase

  • Error recovery (Not enough balance, Courruption, No access, etc.)
  • Pseudonyms Protocol

Paper Sections

4.2. Pseudonyms

  • Access Control Mechanism

Mini Access contol app not According to paper

Approach

Our main focus was to implement the protocol, so the approach we take was to use intermediary files that act as Sockets; hence, for various steps of protocol istead of writing data into socket and read from it, we have used files. In the next section, I have provided more details about the files and codes presented.

How To Run

  1. run the following command in terminal: git clone https://github.com/navidpadid/NetBill_Transaction_Protocol/

  2. run the codes

Here are various scenarios which I've ran the code from a fresh clone of repository.

Some scenarios include: with/without pseudonyms, with/without access to buy, with/wihtout NetBill account, with/wihtout enough credits to buy a commodity.

Download Implementation From Github With Detailed Explanations

موافقین ۱ مخالفین ۰ 03 October 19 ، 08:45

The main project that me and my colleague designed for Operating Systems course ( Spring 2018 ) - TA of OS

Project Description ( summary ):

The goal of this project is to gather information about incoming and outgoing packets in system. ( some kind of packet capturing )

The desired informations are :

  • Lenght of packet
  • Protocols of packet ( in all available layers of network except application layer, for example Ethernet,IP,TCP )
  • Hash value of packet
  • Total Processing time of packet


Phase one :

  1. implement a systemcall with a single integer input indicating what information you desire from packets and single output buffer to copy the data from kernel space to user space.
  2. an interactive user space program that talks to the user and systemcall call above ( clean input and output for user ).

    Phase two :
    1. implement a kernel module with a single proc entry file for input indicating what information you desire from packets and single proc entry file for output and to copy the data from kernel space to user space.
    2. an interactive user space program that talks to the user and kernel module and proc entry files above ( clean input and output for user ).

    Phase three :

    Performance comparsion of kernel module and system call ( the first two phases ).


    DOWNLOAD PROJECT DESCRIPTIONS IN DETAIL

    Approach Taken for answer:

    All of the desired informations are in sk_buff data structure.
    my approach was to clone sk_buff from driver, right before the driver ( here : e1000 ) wants to pass the packet to the next network layer handler ( application or the NIC ). with this approach i will have a clone for each packet.
    now that i have the information the rest is easy, just copy the desired information from the sk_buff to the output buffer and copy from there to user space.




    note: for the LKM you should use extern and export symbol.



    the idea for this approach was from here



    DOWNLOAD THE IMPLEMENTATION OF THIS APPROACH WITH DOCUMENTATION IN PERSIAN FROM STUDENTS ( WITH MY HELP )


    Second approach:

    second approach i believe is based on this idea from IBM.

    Download the Implementation of Second Approach From a Student With Document

موافقین ۰ مخالفین ۰ 27 January 19 ، 02:14

This is a very straight forward guide for someone who wants to get started with linux in a matter of hours.

the Guide consists of three main steps:

  • gathering some basic knowledge
  • gathering some system knowledge
  • gathering some command-line knowledge

------------------------------

Download the Guide here


Download Sample Answer From Students ( there are some mistakes )

موافقین ۰ مخالفین ۰ 26 January 19 ، 22:48

Part 1.2

finding the important functions which gather information about some hardware's

DOWNLOAD FULL TUTORIAL WITH IMAGES FROM HERE

 

list of hardwares:

  • CPU

  • Memory

  • network interface

  • sound card

  • power supplier

inorder to implement our information on system we should find :

  1. what are the type of variables we want?

  2. What is implementing them?

  3. Where are they defined?

  4. How to implement from number 2, to number 1?

so in this part we have to answer these 4 questions.

 

DOWNLOAD FULL TUTORIAL WITH IMAGES FROM HERE

 
موافقین ۰ مخالفین ۰ 14 July 17 ، 03:12




in these series of tutorials i want to play with Linux kernel and Loadable Kernel Modules (LKM) along with getting basic information about kernel architecture and system calls (part 1) , proc file system and processes information's (part 2), these tutorials are adopted from my operating system's class project.

there are two major parts as i mentioned before:

 
  1. Linux kernel (focusing on system calls)
  • Building kernel from source with adding a simple system call
  • Finding specified devices information and necessary functions to implement them
  • How to implement the system call and user space program to get info on specified drivers from kernel

     2. Loadable Kernel Modules (focusing on Proc File system)

  • Implementation of simple “hello world” module and run
  • Finding specified information and necessary functions to implement desired module
  • Implementation of desired kernel module and user program

requirements:

  • Ubuntu version: 16.04.2 (recommended not required)

  • Linux kernel : 4.x.x

  • Internet connection

  • about 30 or 40 gigabytes of space (first part)

  • lots of time for compile ! (first part)



i will start from the simple system call in the next post.

navidx
موافقین ۰ مخالفین ۰ 11 July 17 ، 06:12