SRTCT’S
SUMAN RAMESH TULSIANI TECHNICAL CAMPUS – FACULTY OF
ENGINEERING,
KHAMSHET
An ISO 9001:2015 Certified Institute
NAAC Accredited Institute
DEPARTMENT OF COMPUTER
Academic Year:2024-25 Semesters -I
Class: TE
310248: Laboratory Practice I
Subject: Systems Programming and Operating
System ,Laboratory
Subject In charge: Ms. Harshali Bodkhe.
Program Outcomes: POs
Students are expected to know and be able –
PO1- Engineering Knowledge: - To apply knowledge of mathematics, science, engineering
fundamentals, problem solving skills, algorithmic analysis and mathematical modelling to
the solution of complex engineering problems.
PO2- Problem Analysis: - Identify, formulate, review research literature and analyze
complex engineering problems reaching substantiated conclusion using first principals of
mathematics, natural sciences and engineering sciences.
PO3- Design / Development of solutions: - Design solutions for complex engineering
problems and design system components or processes that meet the specified needs with
appropriate considerations for the public health and safety, and the cultural, social and
environmental considerations.
PO4- Conduct Investigations of Complex Problems: - Use research based knowledge and
research methods including design of experiments, analysis and interpretation of data, and
modeling to complex engineering activities with an understanding of the limitations.
PO5- Modern Tool Usage: - Create, select and apply appropriate techniques, resources and
modern engineering and IT tools including prediction and modeling to complex engineering
activities with an understanding of the limitations.
PO6- the Engineer and Society: - Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent responsibilities
relevant to the professional engineering practice.
PO7- Environment and Sustainability:- Understand the impact of the professional
engineering solutions in societal and environmental contexts, and demonstrate the
knowledge of, and need for sustainable development.
PO8- Ethics:- Apply ethical principles and commit to professional ethics and responsibilities
and norms of engineering practice.
PO9- Individual and Team work :-Function effectively as an individual and as a member or
leader in diverse teams, and in multidisciplinary settings.
PO10- Communication Skill:- Communicate effectively on complex engineering activities
with the engineering community and with society at large, such as being able to comprehend
and write effective reports and design documentation, make effective presentations, and give
and receive dear instructions.
PO11- Project management Finance: - Demonstrate knowledge and understanding of
engineering and management principles and apply these to one’s own work as a member and
leader in a team to manage projects and in multidisciplinary environment.
PO12- Life-long Learning: - Recognize the need for, and have the preparations and ability to
engage in independent and lifelong learning in the broadest context of technological change.
Program Specific Outcomes: PSOs
A graduate of the Computer Engineering Program will demonstrate-
PSO1- Professional Skills-The ability to understand, analyze and develop computer
programs in the areas related to algorithms, system software, multimedia, web design, big
data analytics, and networking for efficient design of computer-based systems of varying.
PSO2- Problem-Solving Skills- The ability to apply standard practices and strategies in
software project development using open-ended programming environments to deliver a
quality product for business success.
PSO3- Successful Career and Entrepreneurship- The ability to employ modern computer
languages, environments, and platforms in creating innovative career paths to be an
entrepreneur, and a zest for higher studies.
Course Objectives:
1) To learn system programming tools
2) To learn modern operating system
3) To learn various techniques, tools, application in IOT and embedded system.
HCI/ DS/ SPM.
Course Outcomes:
On completion of the course, learners will be able to
Systems Programming and Operating System
CO1: Implement language translators
CO2: Use tools like LEX and YACC
CO3: Implement internals and functionalities of Operating System
Internet of Things and Embedded Systems
CO4: Design IoT and Embedded Systems based application
CO5: Develop smart applications using IoT
CO6: Develop IoT applications based on cloud environment
OR
Human Computer Interface
CO4: Implement the interactive designs for feasible data search and retrieval
CO5: Analyze the scope of HCI in various paradigms like ubiquitous computing,
virtual reality,
multi-media, World wide web related environments
CO6: Analyze and identify user models, user support, socio-organizational issues, and
stakeholder requirements of HCI systems
OR
Distributed Systems
CO4: Demonstrate knowledge of the core concepts and techniques in
Distributed Systems
CO5: Apply the principles of state-of-the-Art Distributed Systems in real
time applications
CO6: Design, build and test application programs on Distributed Systems
OR
Software Project Management
CO4: Apply Software Project Management tools
CO5: Implement software project planning and scheduling
CO6: Analyse staffing in software project
Guidelines for Laboratory /Term Work Assessment
Continuous assessment of laboratory work is based on overall performance and
Laboratory assignments performance of student. Each Laboratory assignment assessment
will assign grade/marks based on parameters with appropriate weightage. Suggested
parameters for overall assessment as well as each Laboratory assignment assessment
include- timely completion, performance, innovation, efficient codes, punctuality and
neatness
Guidelines for Laboratory Conduction
The instructor is expected to frame the assignments by understanding the
prerequisites, technological aspects, utility and recent trends related to the topic. The
assignment framing policy need to address the average students and inclusive of an element
to attract and promote the intelligent students. The instructor may set multiple sets of
assignments and distribute among batches of students. It is appreciated if the assignments are
based on real world problems/applications. Use of open source software is encouraged. In
addition to these, instructor may assign one real life application in the form of a mini-project
based on the concepts learned. Instructor may also set one assignment or mini-project that is
suitable to respective branch beyond the scope of syllabus.
Programming Tools:
Internet of things and embedded system: - Raspberry Pi / Arduino Programming;
Arduino IDE / Python.
Guidelines for Oral Examination
. During oral assessment, the expert evaluator should give the maximum weightage to
the satisfactory implementation of the problem statement. The supplementary and relevant
questions may be asked at the time of evaluation to test the student’s for advanced learning,
understanding of the fundamentals, effective and efficient implementation. So encouraging
efforts, transparent evaluation and fair approach of the evaluator will not create any
uncertainty or doubt in the minds of the students. So adhering to these principles will
consummate our team efforts to the promising start of the student's academics.
INDEX
Sr. Assignment Date of Date of Marks Sign of
no. performance Submission Obtained Faculty
1 Design suitable Data structures and
implement Pass-I and Pass-II of a
two- pass assembler for pseudo-
machine.
Implementation should consist of a few
instructions from each category and
few assembler directives.
2 Design suitable data structures and
implement Pass-I and Pass-II of a
two- pass macro- [Link]
output of Pass-I (MNT, MDT and
intermediate code file without any
macro definitions) should be input
for Pass-II.
3 Write a program to simulate CPU
Scheduling Algorithms: FCFS, SJF
(Preemptive), Priority (Non-
Preemptive) and Round Robin
(Preemptive).
4 Write a program to simulate Memory
placement strategies – best fit, first
fit, next fit and worst fit.
Total
Marks
Total marks: - /
Date:
Subject Teacher Sign
Assignment No. 01
Problem Statement: Design suitable data structures and implement pass1 and pass2 of a two pass
assembler for pseudo-machine. Implementation should consist of a few instructions from each
category and few assembler directives. The output of pass1 (intermediate code file and symbol table)
should be input for pass2
Objectives:
1. To learn systems programming tools
2. Implement language translator
Theory:
1. Assembler is a low level translator which translates source code to machine code
2. It works in two phases : analysis phase and synthesis phase
3. In analysis phase, source assembly code is analysed to generate some intermediate data
structures
4. In synthesis phase, machine code is generated
5. There are well defined system level standard algorithms to design the assembler as a two
pass assembly, namely PassI and PassII algorithms of assembler
6. PassI takes the source code in assembly language as input and generates intermediate data
structures.
7. PassII takes the intermediate data structures generated by PassI as input and generates
machine code.
Design diagrams (if any): Flow chart for Pass-1
Flow chart for Pass-2
Input for PassI of assembler:
1. Assembly language program in hypothetical language as per the Author Dhamdhere
2. OPTB
3. Condition code table
4. Register table
Input for PassII of assembler:
1. IC
2. SYMTAB
3. LITTAB
4. POOLTAB
5. OPTAB
Output of PassI of assembler:
1. IC
2. SYMTAB
3. LITTAB
4. POOLTAB
Output of PassII of assembler:
Machine code
Software Requirement:
Operating System recommended: - 64-bit Open source Linux or its derivative
Programming tools recommended: - Eclipse IDE
Hardware Requirement: I3 and I5 machines
Frequently Asked Questions:
1. What is two pass assembler?
2. What is the significance of symbol table?
3. Explain the assembler directives EQU, ORIGIN.
4. Explain the assembler directives START, END, LTORG.
5. What is the use of POOLTAB and LITTAB?
6. How literals are handled in pass I?
7. What are the tasks done in Pass I?
8. How error handling is done in pass I?
9. Which variant is used in implementation? Why?
10. Which intermediate data structures are designed and implemented in PassI?
11. What is the format of a machine code generated in PassII?
12. What is forward reference? How it is resolved by assembler?
13. How error handling is done in pass II?
14. What is the difference between IS, DL and AD?
15. What are the tasks done in Pass II?
Conclusion:
1. Input assembly language program is processed by applying PassI algorithm of assembler and
intermediate data structures, SYMTAB, LITTAB, POOLTAB, IC, are generated.
2. The intermediate data structures generated in PassI of assembler are given as input to the
PassII of assembler, processed by applying PassII algorithm of assembler and machine code
is generated
3. Successfully implemented pass1 and pass2 of a two pass assembler for pseudo-machine
Assignment No. 02
Problem Statement: Design suitable data structures and implement Pass-I of a two pass
macro processor using OOP features in Java/C++. The output of Pass-I (MNT, MDT, ALA &
Intermediate code file without any macro definitions) should be input for Pass-II.
Objectives:
1. To identify and design different data structure used in macro-processor
implementation
2. To apply knowledge in implementation of two pass microprocessor.
Algorithm/Flowchart:
Design diagrams (if any):
1. Flow Chart for Pass1 and Pass2
2.
Input:
Small assembly language program with macros written in file [Link].
MACRO
&lab ADDS &arg1,&arg2
&lab L 1, &arg1
A 1, &arg2
MEND
PROG START 0
BALR 15,0
USING *,15
LAB ADDS DATA1, DATA2
ST 4,1
DATA1 DC F’3’
DATA2 DC F’4’
END
Output:
Assembly language program without macro definition but with macro call.
Note: Follow the following templates during implementation
Macro Name Table (MNT) :
Macro Definition Table (MDT) :
Argument List Array (ALA) :
Test Cases:
1. Check macro end not found.
2. Duplicate macro name found.
3. Check program output by changing macro name and parameter list.
4. Handle label in macro definition.
5. Handle multiple macro definitions and calls
Software Requirement:
1. Fedora
2. Eclipse
3. JDK
Hardware Requirement: N/A
Frequently Asked Questions:
1. Define macro?
2. Define purpose of pass-1 of two pass macro processor
3. List out types of macro arguments
4. What is the use of MDT-index field in MNT?
5. What we store in ALA?
Conclusion: We have successfully completed implementation of Pass-I of macro processor.
Assignment No. 03
Problem Statement: Write a program to simulate CPU Scheduling Algorithms: FCFS,
SJF (Preemptive), Priority (Non-Preemptive) and Round Robin (Preemptive).
Objectives:
1. To study the process management and various scheduling policies
[Link] andNon preemptive.
2. To study and analyze different scheduling algorithms.
Input:
1. Enter the number of processes:
2. Enter burst time and arrival time of each process
Theory:
FCFS: Given n processes with their burst times, the task is to find average waiting time and
averageturn around time using FCFS scheduling algorithm.
First in, first out (FIFO), also known as first come, first served (FCFS), is the simplest
schedulingalgorithm. FIFO simply queues processes in the order that they arrive in the ready
queue.
In this, the process that comes first will be executed first and next process starts only
after theprevious gets fully executed.
Here we are considering that arrival time for all processes is
0. How to compute below times in Round Robin using a
program?
Completion Time: Time at which process completes its execution.
Turn Around Time: Time Difference between completion time and arrival time. Turn Around
Time
= Completion Time – Arrival Time
Waiting Time(W.T): Time Difference between turn around time and
burst [Link] Time = Turn Around Time – Burst Time
SJF: Shortest Job First (SJF) Scheduling
Till now, we were scheduling the processes according to their arrival time (in FCFS
scheduling).However, SJF scheduling algorithm, schedules the processes according to their
burst time.
In SJF scheduling, the process with the lowest burst time, among the list of available
processes inthe ready queue, is going to be scheduled next.
However, it is very difficult to predict the burst time needed for a process hence this
algorithm isvery difficult to implement in the system.
Advantages of SJF
1. Maximum throughput
2. Minimum average waiting and turnaround time
Disadvantages of SJF
3. 1. May suffer with the problem of starvation
2. It is not implementable because the exact Burst time for a process can't be
known inadvance.
Round Robin Scheduling Algorithm
Round Robin scheduling algorithm is one of the most popular scheduling algorithm
which can actually be implemented in most of the operating systems. This is the
preemptive version of first come first serve scheduling. The Algorithm focuses on Time
Sharing. In this algorithm, every process gets executed in a cyclic way. A certain time
slice is defined in the system which is called time quantum. Each process present in the
ready queue is assigned the CPU for that time quantum, if the execution of the process is
completed during that time then the process will terminate else theprocess will go back
to the ready queue and waits for the next turn to complete the execution.
Output:
. Compute Waiting time, turnaround time, average waiting time, average turnaround
time andthroughput.
For each algorithm display result as follows:
Proces Burst Time Arrival Waiting Turnaround
s Time Time Time
P1
P2
P3
-
Calculate
Average
waiting time=
Average
turnaround
time=
Throughput=
Test Cases:
1. Check arrival time of all process should not be same.
Software Requirement:
1. Fedora
2. Eclipse
3. JDK
Hardware Requirement: for simulation no dependency
Frequently Asked Questions:
i) What are the types of CPU scheduler?
ii) What is the difference between long and short term scheduling?
iii) Logic of program?
iv) What is preemptive and non-preemptive scheduling?
v) What are types of scheduling algorithms?
vi) Why Priority scheduling may cause low-priority processes to starve?
vii) What are the goals of scheduling?
viii) Define the difference between preemptive and non-preemptive scheduling.
ix) Which scheduling algorithm is best? Why?
Conclusion: Successfully implemented CPU scheduling algorithims
Assignment No. 04
Problem Statement:
Write a Java/C++ program to simulate memory placement strategies
1. First Fit
2. Best Fit
3. Worst Fit
Objectives:
1. To acquire knowledge memory placement strategies
2. To be able to implement memory placement strategies
Theory:
First Fit:
First Fit algorithm scans the linked list and whenever it finds the first big enough hole to store a
process, it stops scanning and load the process into that hole. This procedure produces two
partitions. Out of them, one partition will be a hole while the other partition will store the process.
First Fit algorithm maintains the linked list according to the increasing order of starting index.
This is the simplest to implement among all the algorithms and produces bigger holes as compare
to the other algorithms.
Best Fit:
The Best Fit algorithm tries to find out the smallest hole possible in the list that can accommodate
the size requirement of the process.
Using Best Fit has some disadvantages.
1. It is slower because it scans the entire list every time and tries to find out the smallest hole
which can satisfy the requirement the process.
2. Due to the fact that the difference between the whole size and the process size is very small, the
holes produced will be as small as it cannot be used to load any process and therefore it remains
useless. Despite of the fact that the name of the algorithm is best fit, It is not the best algorithm
among all.
Worst Fit:
The worst fit algorithm scans the entire list every time and tries to find out the biggest hole in the
list which can fulfill the requirement of the process.
Despite of the fact that this algorithm produces the larger holes to load the other processes,
this isnot the better approach due to the fact that it is slower because it searches the entire
list every time again and again.
Algorithm/ Implementation:
1. First Fit Algorithm/ Implementation
1- Input memory blocks with size and processes with
size.2- Initialize all memory blocks as free.
3- Start by picking each process and check if it can be assigned to current block.
4- If size-of-process <= size-of-block if yes then assign and check for next
process.5- If not then keep checking the further blocks.
2. Best Fit Algorithm/ Implementation
1- Input memory blocks and processes with
sizes.2- Initialize all memory blocks as free.
3- Start by picking each process and find the minimum block size that can be
assigned tocurrent process i.e., find min(bockSize[1], blockSize[2],.
...............................................................................................blockSize[n]) >
processSize[current], if found then assign it to the current process.
5- If not then leave that process and keep checking the further processes.
3. Worst Fit Algorithm/Pseudo code
1- Input memory blocks and processes with
sizes.2- Initialize all memory blocks as free.
3- Start by picking each process and find the maximum block size that can be
assigned tocurrent process i.e., find max(bockSize[1], blockSize[2],.
............................................................................................... blockSize[n]) >
processSize[current], if found then assign it to the current process.
5- If not then leave that process and keep checking the further processes.
Design diagrams (if any):
1. Class diagram
Input:
No. of jobs (js) & No. of blocks (bs)
Job size of all jobs & Block size of all blocks
For Example:
js=4
bs=5
block[] = {100, 500, 200, 300, 600};
jobs[] = {212, 417, 112, 426};
Output:
Sample output of Worst Fit algorithm (same way generate o/p for other
algorithms)-
Process No. Process Size Block no.
1 212 5
2 417 2
3 112 4
4 426 Not Allocated
Instructions: not specific
Test Cases:
Software Requirement:
1. Eclipse IDE
2. Java
Hardware Requirement: Not specific
Frequently Asked Questions:
1. Which algorithm is best and why?
2. Need of allocating blocks to jobs?
3. What is the time taken by each algorithm for execution?
Conclusion: successfully implemented simulation of memory placement strategies.