Giter Club home page Giter Club logo

os-assignment's Introduction

OS-assignment

How to run

1.1. Make sched

To use make sched, we redirect to file os-cfg.h and comment out 2 lines:

  • #define MM_PAGING 1
  • #define MM_FIXED_MEMSZ 1

Syntax: make sched and ./sched <name of input>

1.1.1. With 3rd parameter (live priority)

Uncomment #define MLQ_SCHED 1 (we need it)

Sample input:


4 2 3

0 p1s 2

3 p2s 3

1 p3s 1


1.1.2. Without 3rd paramter (default priority):

Comment #define MLQ_SCHED 1 (we don't need it)

Sample input:


2 1 2

0 s0

4 s1


1.2. Make mem

NOTE: In this mode, we will use paging.c for compiling. In paging.c:

  • Reading configure size: In case we ourselves want to adjust MEMRAM size and MEMSWP size, we configure the input mem_size path

    • Example: We want MEMRAM size to have a maximum resource of x pages (256 x xB), and first MEMSWP has y pages (256 x yB)

    • UPDATE: You can choose input file and configuration for memory size you want as arguments

  • Syntax: make mem and ./mem <name of process in folder proc (related to memory)> <config>

    • Example: ./mem paging1 config1
1.2.1. Fixed memory size:

With fixed mem size, uncomment the #define MM_FIXED_MEMSZ 1

Sample input:


1 12

alloc 200 1

alloc 200 2

alloc 200 3

alloc 200 4

free 3

alloc 100 5

free 4

alloc 100 6

free 1

free 2

free 5

free 6


1.2.2. Non-fixed memory size:

Comment the #define MM_FIXED_MEMSZ 1

Sample input (same with fixed one):


1 12

alloc 200 1

alloc 200 2

alloc 200 3

alloc 200 4

free 3

alloc 100 5

free 4

alloc 100 6

free 1

free 2

free 5

free 6


1.3. Make all

  • Uncomment all mode above
  • Syntax: make all and ./os <name of file in input>

os-assignment's People

Contributors

minhnp0925 avatar nhatkhangcs avatar oscarluong2401 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.