Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

i have added an attachment

1 answer below »
iProject2
Operating    Systems    
CMPT    424        ●        Fall    2022
OS    iProject 2 © XXXXXXXXXXAlan G. Labouseur, All Rights Reserved Page of 1 3
Goals To    build    on    the    functionality    from    iProject    One    (all    of    which    is    required)    by    adding    the    ability    
to    load    and    execute    one    user    program    in    256    bytes    of    memory    as    speciGied    by    the    6502a    op    
codes    documented    on    our    class    web    site.
Func*onal
Requirements
Modify    the    load    command    to    copy    the    6502a    machine    language    op    codes    
into    main    memory.    
• Put    the    code    at    location    $0000    in    memory    
• assign    a    Process    ID    (PID)    
• create    a    Process    Control    Block    (PCB)    
• return    the    PID    to    the    console    and    display    it.    
Add    a    shell    command,    run ,    to    run    a    program    already    in    memory.    
Note:    the    user    should    be    able    to    execute    many    load
un    cycles    in    sequence.    
Execute    the    running    program    (including    displaying    memory,    CPU,    and    PCB    
status    as    well    as    any    output).    Be    sure    to    synchronize    the    CPU    execution    
cycles    with    clock    ticks.    
As    the    programs    executes,    update    and    display    the    memory,    PCB,    and    CPU    
status    (program    counter,    instruction    reg,    accumulator,    X    reg,    Y    reg,    Z    Glag)    
in    real    time.    
Implement    line-wrap    in    the    CLI.    (This    is    not    longer    optional.)    
[challenge]    Provide    the    ability    to    single-step    execution    (via    GUI    buttons).    
[challenge]    Allow    the    user    to    
eak    the    cu
ent    program    with    Ctrl-C.
[10    points]    
[3    points]    
[30    points]    
[5    points]    
[2    points]    
[+8    points]    
[+4    points]
Implementa*on
Requirements
Develop    a    PCB    prototype    and    implement    it    in    the    client    OS.    
Develop    a    memory    manager    and    implement    it    in    the    client    OS.    
Develop    a    core    memory    prototype    and    implement    it    in    the    host    OS.    
Develop    a    memory    accessor    prototype    and    implement    it    in    the    host    OS.    
Develop    a    CPU    prototype    and    implement    it    in    the    host    OS.    
Your    code    must    separate    structure    from    presentation,    be    professionally    
formatted,    use    and    demonstrate    best    practices,    and    generally    make    me    
proud    to    be    your    teacher.    
Continue    to    preserve    GLaDOS.    There    is    still    a    neurotoxin    canister    next    to    
what    looks    like    an    incinerated    morality    core.    (Is    that    important?)    
[5    points]    
[10    points]    
[10    points]    
[10    points]    
[15    points]    
[−∞    if    not]
General
Hints
Consider    refactoring    the    host    OS    code    into    at    a    few    parts:    events,    inte
upts,    and    services.    
Implement    the    host    core    memory    and    CPU    as    a    separate    objects    and    separate    source    code    
Giles    within    the    host    directory.    
Run    all    accesses    to    memory    through    your    host    memory    accessor    so    it    can    do    address    
translations    on    the    next    project.    
Read    chapter    4    up    to    “Paging”    in    our    text.        It    presents    a    nice    look    at    main    memory    that    you    
might    Gind    helpful.    
Remember    the    utility    of    comments    and    how    much    their    presence    and    quality    affect    my    
opinion    of    your    work.    Seriously.    Bad    code    style    will    cost    you    a    ton    of    points.
iProject Two - 100 points
Operating    Systems    
CMPT    424        ●        Fall    2022
OS    iProject 2 © XXXXXXXXXXAlan G. Labouseur, All Rights Reserved Page of 2 3
Specific
Hints
• Continue    to    keep    .js    and    .ts    Giles    in    separate    directories.    
• The    shutdown    functionality    must    operate    properly    even    when    a    program    is    running.    
• The    memory    and    CPU    displays    must    update    in    real    time.    The    PCB    needs    to    update    only    
on    scheduling    events,    which    in    this    project    are    only    when    execution    begins    and    ends.    
• Remember    that    you    must    continue    to    process    inte
upts    while    the    CPU    is    executing.    
• Always    separate    logic    and    structure    from    presentation.    Do    not    put    GUI    logic    in    your    
CPU    or    memory    routines.    Keep    the    GUI    stuff    in    control.ts    or    something    similar.    
• As    I    warned    you    in    class,    it’s    easy    to    mix    up    base    10    and    base    16.    Double    check    all    of    that.    
• You    are    almost    guaranteed    to    make    an    off-by-one    e
or    implementing    or    executing    the    
BNE    operation.    Em
ace    it.    Then    Gix    it.    
• Never    use    magic    numbers.    Use    constants    for    everything    other    than    0,    1,    and    ∞.
Very Specific
Hints
Follow    the    CPU    example    when    implementing    memory.    
    In    the    main    directory:    
Declare    globally...    
    Hardware    (host)    
var    _CPU:    TSOS.CPU;    
var    _Memory:    TSOS.Memory;    
var    _MemoryAccessor:    TSOS.MemoryAccessor;    
    Software    (OS)    
var    _MemoryManager:    any    =    null;    
        
In    the    host/    directory,    put:    
cpu.ts    
memory.ts    
memoryAccessor.ts    
        
In    the    hardware    control    code    :        
_CPU    =    new    Cpu();        
_CPU.init();    
_Memory    =    new    Memory();    
_Memory.init();    
_MemoryAccessor    =    new    MemoryAccessor();    
        
In    the    OS/    directory,    put    :    
memoryManager.ts    
        
In    the    kernel    bootstrap    code:    
_MemoryManager    =    new    MemoryManager();
SubmiFng
Your Work
Update    GitHub    with    your    cu
ent    code    and    let    me    know    that    it’s    ready    for    me    to    grade    (and    
which    
anch    to    grade).
Operating    Systems    
CMPT    424        ●        Fall    2022
OS    iProject 2 © XXXXXXXXXXAlan G. Labouseur, All Rights Reserved Page of 3 3
Answered 6 days After Sep 26, 2022

Solution

Jahir Abbas answered on Oct 03 2022
68 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here