Syspro Slips PDF
Syspro Slips PDF
1. Implement a menu driven simulator for hypothetical Simple Instruction Computer that provides
the following functionalities:
a. Load – Loading of the program from file into memory
b. Print – Printing the program loaded in memory.
c. Run – Executing the loaded program
The machine has the basic instruction set comprising of following:
Opcode Mnemonic Instruction
00 STOP Stop or half execution
01 ADD Add memory operand to register contents
02 SUB Subtract memory operand from register contents
03 MULT Multiply memory operand to register contents
04 MOVER Move memory operand contents to register contents
05 MOVEM Move register contents to memory operand
06 COMP Compare register and memory operands to set condition code
appropriately
07 BC Branch to second operand depending on condition code specified
as first operand
08 DIV Divide register contents by memory operand
09 READ Read into memory operand
10 PRINT Print contents of memory Operand
Create a file containing the machine language code to find maximum of two numbers by using
above instruction opcode set. [35]
2. Write a simulation program to implement demand paging using LFU page replacement
algorithm. Assume the memory of “n” frames. Show the contents of page after every page
replacement in a frame and it at end we told number of page faults accordingly. Input the
following page reference string.
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration : 3 Hours Maximum Marks : 80
1. Implement a menu driven simulator for hypothetical Simple Instruction Computer that provides
the following functionalities:
a. Load – Loading of the program from file into memory
b. Print – Printing the program loaded in memory.
c. Run – Executing the loaded program
The machine has the basic instruction set comprising of following:
Opcode Mnemonic Instruction
00 STOP Stop or half execution
01 ADD Add memory operand to register
02 DIV Divide register contents by memory operand
03 SUB Subtract memory operand from register
04 MULT Multiply memory operand to register
05 READ Read into memory operand
06 COMP Compare register and memory operands to set condition code
appropriately
07 MOVEM Move memory operand contents to register
08 BC Branch to second operand depending on condition code specified
as first operand
09 MOVER Move register contents to Memory operand
10 PRINT Print contents of memory Operand
Create a file containing the machine language code to find minimum of two numbers by using
above instruction opcode set. [35]
2. Write a simulation program to implement Round Robin CPU scheduling algorithm for the given
time quantum as input. Also accept the number of processes and arrival time and CPU burst time
for each process as input. The output should give the Gant Chart, turnaround time and waiting
time for each process. Also display the average turnaround time and average waiting time. [35]
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & operating system
Duration : 3 Hours Maximum Marks : 80
1. Implement a menu driven simulator for hypothetical Simple Instruction Computer that provides
the following functionalities:
a. Load – Loading of the program from file into memory
b. Print – Printing the program loaded in memory.
c. Run – Executing the loaded program
The machine has the basic instruction set comprising of following:
Opcode Mnemonic Instruction
00 STOP Stop or half execution
01 READ Read into memory operand
02 PRINT Print contents of memory Operand
03 ADD Add memory operand to register contents
04 SUB Subtract memory operand from register contents
05 MOVER Move Memory operand contents to register contents
06 MOVEM Move register contents to memory
07 MULT Multiply memory operand to register contents
08 DIV Divide register contents by memory operand
09 BC Branch to second operand depending on condition code specified
as first operand
10 COMP Compare register and memory operands to set condition code
appropriately
Create a file containing the machine language code to find using above instruction opcode
set. [35]
2. Write a simulation program to implement demand paging using LRU (Using Counter) page
replacement algorithm. Assume the memory of “n” frames. Show the contents of page after every
page replacement in a frame and at end show the total number of page faults accordingly. Input
the following Page Reference String.
Page Reference String :12,15,12,18,6,8,11,12,19,12,6,8,12,15,19,8 [35]
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration : 3 Hours Maximum Marks : 80
1. Implement a menu driven simulator for hypothetical Simple Instruction Computer that provides
the following functionalities:
a. Load – Loading of the program from file into memory
b. Print – Printing the program loaded in memory.
c. Run – Executing the loaded program
The machine has the basic instruction set comprising of following:
Opcode Mnemonic Instruction
00 STOP Stop or half execution
01 PRINT Print contents of memory Operand
02 SUB Subtract memory operand from register contents
03 MULT Multiply memory operand to register contents
04 READ Read into memory operand
05 MOVER Move Memory operand contents to register contents
06 MOVEM Move register contents to Memory
07 COMP Compare register and memory operands to set condition code
appropriately
08 BC Branch to second operand depending on condition code specified
as first operand
09 DIV Divide register contents by memory operand
10 ADD Add memory operand to register contents
Create a file containing the machine language code to find factorial of a given number by using
above instruction opcode set. [35]
2. Write a program to implement a toy shell (Command Interpreter). It has its own prompt say
“MyShell $”. Any normal shell command is executed from this shell (MyShell$) by starting a child
process to execute the system program corresponding to the command. It should additionally
interpret the following commands:
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration : 3 Hours Maximum Marks : 80
1. Implement a menu driven simulator for hypothetical Simple Instruction Computer that provides
the following functionalities:
a. Load – Loading of the program from file into memory
b. Print – Printing the program loaded in memory.
c. Run – Executing the loaded program
The machine has the basic instruction set comprising of following:
Opcode Mnemonic Instruction
00 STOP Stop or half execution
01 ADD Add memory operand to register contents
02 SUB Subtract memory operand from register contents
03 MULT Multiply memory operand to register contents
04 DIV Divide register contents by memory operand
05 MOVER Move Memory operand contents to register contents
06 MOVEM Move register contents to Memory
07 COMP Compare register and memory operands to set condition code
appropriately
08 BC Branch to second operand depending on condition code specified
as first operand
09 READ Read into memory operand
10 PRINT Print contents of memory Operand
Create a file containing the machine language code to find the addition of first “n” numbers by
using above instruction opcodes [35]
2. Write a simulation program to implement sequential (Contiguous) Allocation method for file.
Assume disk having “n” number of blocks ranging from 0 to n-1. Randomly mark some of the
blocks as allocated and accordingly maintain the list of free blocks. Perform the following
operation using following menu.
- Show Bit Vector
- Create New File
- Show Directory
- Delete File
- Exit [35]
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write a command line program for line editor. The file to be edited is taken as command line
argument; an empty file is opened for editing if no argument is supplied. It should display a „$‟
prompt to accept the line editing commands. Implement the following commands:
a : Append
p : Print all lines
s : Save
e : Exit [35]
2. Write a simulation program to implement demand paging using MFU page replacement
algorithm. Assume the memory of “n” frame. Show the contents of page after every page
replacement in a frame and at end show the total number of page faults accordingly. Input the
following Page Reference String.
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write a command line program for line editor. The file to be edited is taken as
command line argument. An empty file is opened for editing if no argument is
supplied. It should display „$‟ prompt to accept the line editing commands.
Implement the following commands:
a : Append
dn : Delete nth line.
p : Print all lines.
e : Exit [35]
2. Write the simulation program to implement demand paging using FIFO page
replacement algorithm. Assume the memory of “n” frames. Show the contents of
page after every page replacement in a frame and at end show the total number of
page faults accordingly. Input the following Page Reference String.
Page Reference String: 3,4,5,6,3,4,7,3,4,5,6,7,2,4,6 [35]
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write a command line program for line editor. The file to be edited is taken as
command line argument. An empty file is opened for editing if no argument is
supplied. It should display „$‟ prompt to accept the line editing commands.
Implement the following commands.
s : Save
a : Append
d nl n2 : Delete lines from position n1 to n2
e : Exit [35]
2. Consider the following snapshot of the system
Allocation MAX Available
Processes
A B C A B C A B C
P0 0 1 0 7 5 3 3 3 2
P1 2 0 0 3 2 2
P2 3 0 2 9 0 2
P3 2 1 1 2 2 2
P4 0 0 2 4 3 3
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write a program to implement a DFA Driver for any given language. Accept
number of states, number of input symbols, set of input symbols, number of final
states, set of final states and transition table as input. (Input language should be
given by examiner). Write menu driven program that will have options as:
a. Read DFA
b. Show Transition Table
c. Check Acceptance of the Given String.
d. Exit [35]
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write a program to implement DFA driver for the language L = “Set of all string
that starts with a, ending with b” over {a,b}. [35]
3. Viva. [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write a command line program for line editor. The file to be edited is taken as
command line arguments. An empty file is opened for editing if no argument is
supplied. It should display a „$‟ prompt to accept the line editing commands.
Implement the following commands:
a : Append
pmn : Print range of lines from m to n
in : Insert line at position n.
e : Exit [35]
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write a program to implement a DFA driver for the language L = “Set of all
strings that containing 101 as substring” over {0,1}. [35]
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Consider the following Macro definition and Data structures (stored as an array of
structure) association with it as follows: [35]
MACRO
CALC &A,&B,&OP=ADD
MOVER AREG, &A
&OP AREG, &A
MOVEM AREG, &A
MEND
Write a program to expand the above macro definition using given data structure for
the following two macro call
1. CALC X,Y
2. CALC X,Y,&OP=SUB
2. Write a program to implement a toy shell (Command Interpreter). It has its own
prompt say “MyShell $”. Any normal shell command is executed from this shell
(MyShell$) by starting a child process to execute the system program
corresponding to the command.
search f file name :- To search first occurrence of the pattern in the file
search a file name :- To search all the occurrence of the pattern in the file
search c file name :- To count the number of occurrence of the pattern in the file.
[35]
3. Viva. [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write a macro pre-processor program that will create and display the contents of
MDT, MNT and PNTAB for the following macro definition: [35]
MACRO
CALC &A,&B,®,&OP
MOVER ®, &A
&OP ®, &B
&MOVEM ®, &A
MEND
2. Write a program to implement a toy shell (Command Interpreter). It has its own
prompt say “MyShell $”. Any normal shell command is executed from this shell
(MyShell$) by starting a child process to execute the system program corresponding
to the command.
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write a macro pre-processor program that will create and display the contents of
MNT, MDT and KPDTAB for the following macro definition
MACRO
INCR &X=,&Y=,&OP=ADD, ®=AREG
MOVER ®, &X
&OP ®, &Y
MOVEM ®, &X
MEND [35]
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write an assembler that will create and display the contents of symbol table. Also
construct the Intermediate Code of type variant I for the following error-free
assembly program:
START 100
MOVEM BREG, ONE
MOVER BREG, A
MOVER BREG, B
MOVER BREG, C
PRINT A
PRINT B
PRINT C
STOP
A DS 1
B DS 2
C DS 1
ONE DC „1‟
END
2. Write a program to implement a toy shell (Command Interpreter). It has its own
prompt say “MyShell $”. Any normal shell command is executed from this shell
(MyShell$) by starting a child process to execute the system program corresponding
to the command.
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write an assembler that will create and display the contents of symbol table. Also
construct the Intermediate Code of type variant II for the following error-free
assembly program:
START 100
MOVEM BREG, ONE
MOVER BREG, A
MOVER BREG, B
MOVER BREG, C
PRINT A
PRINT B
PRINT C
STOP
A DS 1
B DS 2
C DS 1
ONE DC „1‟
END
2. Write a program to implement a toy shell (Command Interpreter). It has its own
prompt say “MyShell $”. Any normal shell command is executed from this shell
(MyShell$) by starting a child process to execute the system program corresponding
to the command.
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write a command line program for line editor. The file to be edited is taken as
command line argument; an empty file is opened for editing if no argument is
supplied. It should display a „$‟ prompt to accept the line editing commands.
Implement the following commands:
s : Save
a : Append
c nl n2 : Copy line from position n1 to position n2
e : Exit [35]
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write a command line program for line editor. The file to be edited is taken as
command line argument. An empty file is opened for editing if no argument is
supplied. It should display a „$‟ prompt to accept the line editing commands.
Implement the following commands:
s : Save
a : Append
m nl n2 : Copy line from position n1 to position n2
e : Exit [35]
3. Viva. [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write a macro pre-processor program that will create and display the contents of
MNT, PNTAB, and KPDTAB for the following macro definition.
MACRO
CALC &A,&B,®=CREG,&OP=MULT
MOVER ®, &A
&OP ®, &B
MOVEM ®, &A
MEND [35]
3. Viva. [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write an assembler that will display the following errors and warnings:
a) Symbol used but not defined
b) Symbol defined but not used
c) Re-declaration of the Symbol
Present in the following assembly program:
START 100
READ X
LOOP READ BREG, X
ADD BREG, Y
X MOVEM AREG, Z
STOP
X DS 1
Y DS 1
END
2. Write a program to implement a toy shell (Command Interpreter). It has its own
prompt say “MyShell $”. Any normal shell command is executed from this shell
(MyShell$) by starting a child process to execute the system program corresponding
to the command.
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write an assembler that will display the following errors and warnings:
a. Symbol used but not defined
b. Symbol defined but not used
c. Re-declaration of the Symbol
Present in the following assembly program:
START 100
READ A
A READ BREG, A
ADD BREG, B
LOOP MOVEM AREG, C
STOP
A DS 1
B DS 1
END
2. Write the simulation program to implement demand paging using FIFO page
replacement algorithm. Assume the memory of “n” frames. Show the contents of
page after every page replacement in a frame and at end show the total number of
page faults accordingly. Input the following Page Reference String.
Page Reference String: 3,4,5,6,3,4,7,3,4,5,6,7,2,4,6 [35]
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write a program to implement DFA driver for the language L = “Set of all strings
that containing 101 as substring” over {0, 1}. [35]
3. Viva. [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Write a command line program for line editor. The file to be edited is taken as
command line arguments. An empty file is opened for editing if no argument is
supplied. It should display a „$‟ prompt to accept the line editing commands.
Implement the following commands:
in : Insert line at position n.
d n1 n2 : Delete line between position n1 and n2
s : Save
p : Print all lines
e : Exit [35]
2. Consider the following snapshot of the system
Allocation MAX Available
Processes
A B C D A B C D A B C D
P0 0 0 1 2 0 0 1 2 1 5 2 0
P1 1 0 0 0 1 7 5 0
P2 1 3 5 4 2 3 5 6
P3 0 6 3 2 0 6 5 2
P4 0 0 1 4 0 6 5 6
3. Viva [10]
Savitribai Phule Pune University
T.Y.B.Sc. (Computer Science) Practical Examination, March / October
(2013 Pattern)
CS – 347 Lab Course – I System Programing & Operating system
Duration: 3 Hours Maximum Marks: 80
1. Consider the following Macro definition and Data structures (stored as an array of structure)
association with it as follows: [35]
MACRO
CALC &A,&B,&OP=
MOVER AREG, &A
&OP AREG, &B
MOVEM AREG, &A
MEND
Write a program to expand the above macro definition using given data structure for the
following two macro call
1. CALC X,Y,&OP=ADD
2. CALC X,Y,&OP=SUB
2. Write a simulation program to implement demand paging using MFU page replacement
algorithm. Assume the memory of “n” frame. Show the contents of page after every page
replacement in a frame and at end show the total number of page faults accordingly. Input the
following Page Reference String.
Page Replacement String: 3,4,5,4,3,4,7,2,4,5,6,7,2,4,6 [35]
3. Viva [10]