0% found this document useful (0 votes)
9 views

OSY CT1 Solution

Class test 1 osy

Uploaded by

vaibhavhpatil03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

OSY CT1 Solution

Class test 1 osy

Uploaded by

vaibhavhpatil03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

OPERATING SYSTEMS QB SOLUTION

2 MARKS QUESTION:

1) Define operating systems and list its types.


Ans: An interface between software and hardware is called operating system. It is an
integrated set of programs to manage tasks.
Types of operating system:
1.Batch Systems
2.Multiprogramming
3.Multitasking
4.Time-Sharing Systems

2) List and explain services provided by OS.

Ans: Services provided by OS:


User Interface
Program Execution
I/O Operation
File system Manipulation

3) Define System calls and list its types.

Ans: A system call is a programmatic way in which a computer program requests a device from
kernel of operating system it is executed on.

Types:
Process Control, File Management, Device Management, Communications.

4) Define Process & PCB.

Ans: Process:

5) Difference between Multitasking and Multiprogramming.

Ans:
MULTITASKING MULTIPROGRAMMING

Based on the timesharing mechanism. Based on the context switching mechanism.

It takes minimum time to execute the process. It takes maximum time to execute the process.
6) Differentiate between CLI & GUI.
Ans:
CLI GUI
(Command Line Interface) (Graphical User Interface)
Interaction is by typing commands. Interaction with devices is by graphics and
visual components and icons.

Commands need to be memorized. Visual indicators and icons are easy to


understand.

7) State the syntax of following commands: kill, sleep.

Ans: a) Kill - Syntax: kill pid

b) Sleep - Syntax: sleep NUMBER[SUFFIX]…


sleep OPTION

8) List four system calls related to file management.

Ans: Four System Calls related to File Management:


1. create new file
2. delete existing file
3. open file
4. close file

9) Define Thread & list its types.

Ans: Thread is smallest unit of computer program that runs independently.

Types: Single Thread, Multi-Thread.

10) Write the output of the following commands: 1) wait 2385018


2) ps -u Asha

Ans: 1) Wait command waits until the termination of specified process ID 2385018.
2) ps command with -u is used to display data/processes for the specific user Asha.

4 MARKS QUESTION:

1) Explain RTOS along with advantages and disadvantages.


OPERATING SYSTEMS QB SOLUTION

Ans:

2) List different components of OS and explain any one in detail.


Ans: List of System Components:
1. Process management
2. Main memory management
3. File management
4. I/O system management
5. Secondary storage management
Process Management: The operating system manages many kinds of activities ranging from
user programs to system programs like printer spooler, name servers, file server etc. Each of
these activities is encapsulated in a process.
A process includes the complete execution context (code, data, PC, registers, OS resources in
use etc.).
The basic unit of software that the operating system deals with in scheduling the work done by
the processor is either a process or a thread, depending on the operating system.
It’s tempting to think of a process as an application, but that gives an incomplete picture of
how processes relate to the operating system and hardware.
The application you see (word processor or spreadsheet or game) is, indeed, a process, but that
application may cause several other processes to begin, for tasks like communications with other
devices or other computers.
It is processes, rather than applications, that the operating system controls and schedules for
execution by the CPU. In a single tasking system, the schedule is straightforward.
The operating system allows the application to begin running, suspending the execution only
long enough to deal with interrupts and user input.

3) Explain IPC.

Ans:

4) List System Calls related to Process Control, Device Management, Information Maintenance
and Communication.
OPERATING SYSTEMS QB SOLUTION

Ans: System call provides an interface between a running program and operating system. It
allows user to access services provided by operating system. This system calls are procedures
written using C, C++ and assembly language instructions. Each operating system has its own
name for each system call. Each system call is associated with a number that identifies itself.
System calls:
Process Control: Program in execution is a process. A process to be executed must be loaded in
main memory. while executing it may need to wait, terminate or create & terminate child
processes.
end, abort
load, execute
create process, terminate process
get process attributes, set process attributes
wait for time wait event, signal event
allocate and free memory
File Management: System allows us to create and delete files. For create and delete operation
system call requires the name of the file and other attributes of the file. File attributes include file
type, file size, protection codes, accounting information and so on. Systems access these
attributes for performing operations on file and directories. Once the file is created, we can open
it and use it. System also allows performing reading, writing or repositioning operations on file.
create file, delete file
open, close
read, write, reposition
get file attributes, set device attributes
logically attach or detach devices
Device Management: When a process is in running state, it requires several resources to
execute. These resources include main memory, disk drives, files and so on. If the resource is
available, it is assigned to the process. Once the resource is allocated to the process, process can
read, write and reposition the device.
request device, release device
read, write, reposition
get device attributes, set device attributes
logically attach or detach devices.
Information Maintenance: Transferring information between the user program and the
operating system requires system call. System information includes displaying current date and
time, the number of current users, the version number of the operating system, the amount of free
memory or disk space and so on. Operating system keeps information about all its processes that
can be accessed with system calls such as get process attributes and set process attributes.
get time or date, set time or date
get system data, set system data
get process, file, or devices attributes
set process, file, or devices attributes
Communication: Processes in the system, communicate with each other. Communication is
done by using two models: message passing and shared memory. For transferring messages,
sender process connects itself to receiving process by specifying receiving process name or
identity. Once the communication is over system close the connection between communicating
processes. create, delete communication connection
send, receive messages
transfer status information
attach or detach remote devices.

5) Explain Multithreading along with its Model.

Ans:
OPERATING SYSTEMS QB SOLUTION
6) Explain Process State diagram.

Ans:
OPERATING SYSTEMS QB SOLUTION

7) Explain Process Control Block

Ans:
OPERATING SYSTEMS QB SOLUTION

8) Explain different types of Schedular.

Ans:

9) Write two uses of following OS tools: 1) Device management


2) Performance monitor
3) Task Schedular

Ans: 1) a) Managing all the hardware or virtual devices of computer system.


b) Allow interaction with hardware devices through device driver.
2) a) Monitor various activities on a computer such as CPU or memory usage.
b) Used to examine how programs running on their computer affect computer's performance.

3)a) Assign processor to task ready for execution


b) Executing predefined actions automatically whenever a certain set of condition is met.

10) Explain Time Sharing OS

Ans:
OPERATING SYSTEMS QB SOLUTION

11) Explain any four functions of OS

Ans:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy