.... How to Find Your Subject Study Group & Join ....   .... Find Your Subject Study Group & Join ....  

We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Study Groups By Subject code Wise (Click Below on your university link & Join Your Subject Group)

[ + VU Study Groups Subject Code Wise ]  [ + COMSATS Virtual Campus Study Groups Subject Code Wise ]

Looking For Something at vustudents.ning.com?Search Here

Assignment No. 01
Semester: Spring 2017
CS604: Operating System
Total Marks: 20
Due Date:01/05/2017
Instructions:
Please read the following instructions carefully before submitting the assignment. It
should be clear that your assignment will not get any credit if:
 The assignment is submitted after the due date.
 The submitted assignment does not open or file is corrupt.
 Assignment is copied (partial or full) from any source (websites, forums,
students, etc)
Note: Lecture No. 1 to 6 are covered in this assignment. You have to upload only .doc
file. Assignment in any other format (extension) will not be accepted and will be
awarded with zero marks.
Objective:
The objective of this assignment is to provide hands on experience of:
 To learn and understand the basic concept of an Operating System
 To learn Components, Services and Structures of Operating System
For any query about the assignment, contact at CS604@vu.edu.pk
Assignment
Assignment Questions:
Question#1: [05 Marks]
Being an end user and an administration of any system, there are some privileges that have been given to you, suppose you are going to take the initial test as an operating system developer then specify which of the following instructions should be “Privileged” and “Non- Privileged”?
Instructions Name                       Privileged Or Non-Privileged
Clear memory
Turn off interrupts
Issue trap instructions
System Call
Access I/O Instructions
Question 2: [05 Marks]
Categorize the following examples into some events that cause the kernel code to invoke in order to manage computer resources (like I/O devices, memory and storage management) and control user programs to prevent errors and improper use of a computer system. That event could be an Interrupt, signal and trap:
1. Ahmad write a code in c language, like a=b/0.
2. Ayesha is compiling a C program an error occurs Invalid memory access or buffer overflow.
3. While running a program, you press <Ctrl-C>.
4. Yasir is typing Alphabets in notepad by hitting keystroke.
5. Bilal opening a folder from desktop by double clicking mouse.
Question 3: [10 Marks]
Understand the below program carefully and explain each line accordingly.
#include <stdio.h>
void main ( )
1………………… {
2……………………….int pid, status;
3……………………….pid = fork ( );
4……………………….if (pid = = -1)
5……………………… {
6……………………………printf(“fork failed\n”);
7……………………………exit(1) ;
8……………………….}
9………………………if (pid = = 0)
10……………………… {
11………………………... printf( “Child here ! \n”);
12………………………... exit (0);
13……………………….}
14……………………….else
15……………………… {
16………………………… wait (&status);
17………………………… printf(“well done kid !\n”);
18………………………… exit (0);
19……………………….}

Share This With Friends......


How to Find Your Subject Study Group & Join.

Find Your Subject Study Group & Join.

+ Click Here To Join also Our facebook study Group.


This Content Originally Published by a member of VU Students.

+ Prohibited Content On Site + Report a violation + Report an Issue


Views: 6295

See Your Saved Posts Timeline

Replies to This Discussion

Please Discuss here about this assignment.Thanks

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions. Read More>>

 

Note:-

For Important Helping Material related to this subject (Solved MCQs, Short Notes, Solved past Papers, E-Books, FAQ,Short Questions Answers & more). You must view all the featured Discussion in this subject group.

For how you can view all the Featured discussions click on the Back to Subject Name Discussions link below the title of this Discussion & then under featured Discussion corner click on the view all link.

Or visit this link 

Click Here For Detail.

&

.•°How to Download past papers from study groups°•.

 

Please Click on the below link to see…

.... How to Find Your Subject Study Group & Join .... 

Am i Right?

1=Privileged 

2=Privileged 

3=Non Privileged 

4= no idea

5=Privileged 

1=Interrupt/trap  in me se koi ek

2=trap

3=signal

4=Interrupt

5=Interrupt

1st pe mene interupt llikha hai
pr i m also cnfuse

Page#10

Interrupts, traps and software interrupts
An interrupt is a signal generated by a hardware device (usually an I/O device) to get CPU’s attention. Interrupt transfers control to the interrupt service routine (ISR), generally through the interrupt vector table, which contains the addresses of all the service routines. The interrupt service routine executes; on completion the CPU resumes the interrupted computation. Interrupt architecture must save the address of the interrupted instruction. Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt. An operating system is an interrupt driven software.


A trap (or an exception) is a software-generated interrupt caused either by an error (division by zero or invalid memory access) or by a user request for an operating system service.


A signal is an event generated to get attention of a process. An example of a signal is the event that is generated when you run a program and then press <Ctrl-C>.

1-Trap

2-Trap

3-Signal

4-Interrupt

5-Interrupt

The concept of privileged instructions also provides us with the means for the user to interact with the operating system by asking it to perform some designated tasks that only the operating system should do. A user process can request the operating system to perform such tasks for it by executing a system call.

If any incorrect tells me

2nd Question.

Fellows if any option incorrect discus kindly ..

dear i have searched on internet for this question. i found that clear memory and turn off interrupts are privileged and Issue trap instructions and system calls are non privileged. last one is privileged. Thanks

Thanks

RSS

Forum Categorizes

Job's & Careers (Latest Jobs)

Admissions (Latest Admissons)

Scholarship (Latest Scholarships)

Internship (Latest Internships)

VU Study

Other Universities/Colleges/Schools Help

    ::::::::::: More Categorizes :::::::::::

Latest Activity

Today Top Members 

Member of The Month

© 2017   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service