Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask Operating System Expert

problem 1) What is the output of the following program? What are the contents of file ‘test.txt’?

# include < stdio.h >
# include < fcntl.h >
Main ( )
{
int fd1, fd2, fd3 ;
fd1 = open ( “test.txt”, O–RDWR | O–TRUNC);
printf ( “ fd1 = %.d\n”, fd1);
prepare ( fd1, “Rose is’’, 7);fd2 = dup (fd1);
Printf ( “fd2 = %d \n”, fd2);
prepare (fd2, “beautiful”,10) ;
Close (0);
fd3 = dup (fd1) ;
Printf ( “ fd3 = %d\n”, fd3) ;
prepare ( 0, “flower”, 7) ;
dup2 (3,2) ;
prepare (2, “!\n” ), 2) ;
}

problem 2) Describe the behaviour and output of the following program:

Main ( )
{
int i ;
char * cp ;
extern char *sbrk ( );
cp = sbrk (10) ;
[3733]-202 3for ( i = 0 ; i < 10 ; i + + )
*cp ++ = ‘a’ + i ;
sbrk ( –10 ) ;
cp = sbrk ( 10 ) ;
for ( i = 0; i < 10 ; i ++)
Printf ( “ char % d = % c \n”, i, * cp ++) ;
}

problem 3) Describe fork swap and expansion swap.

problem 4) Answer in brief:

i) A delayed prepare is different from asynchronous prepare. Illustrate.

ii) Convert logical byte offset 1,25,000 into actual physical byte offset using bmap algorithm. Assume block size 1024 bytes.

problem 5) List and describe the syntax of time related system calls.

problem 6) Which are the actions taken by kernel while unmounting a file system?

problem 7) Consider block size = 512 bytes. Determine the offset, no. of bytes read in each of the following read statement.

Consider the statements are executed in the same process.

read (fd, buffer, 250) ;
read (fd, buffer, 400) ;
read (fd, buffer, 700) ;

Operating System, Computer Science

  • Category:- Operating System
  • Reference No.:- M95298

Have any Question? 


Related Questions in Operating System

1 the city of boston needs to be about 2 acres of green

1. The City of Boston needs to be about 2 acres of green space per 1,000 persons. You have been hired as the GIS expert by an independent consulting company to determine where the City is meeting this rule of thumb and w ...

As the system administrator you are always looking for ways

As the system administrator, you are always looking for ways to improve your network. Although there are many different types of operating systems, there are many versions of the operating systems, as well. After much re ...

Please address the followingprovide one advantage or one

Please address the following: Provide ONE advantage or ONE disadvantage of a Microkernel OS Design or a Monolithic OS Design. Provide support (back up your claims) for your view. The following are examples with proper ju ...

Assignmentscholarly activitywindows vs mac osapples mac os

ASSIGNMENT Scholarly Activity Windows vs Mac OS Apple's Mac OS is a major competitor for Windows, and many people feel very strongly about choosing one over the other. For this assignment, locate articles online that dis ...

1 write a shell script lab2q1sh to do the followingacreate

1. Write a shell script (lab2_q1.sh) to do the following: a. Create list1.txt (use echo command) as: Football Basketball Skates Soccer ball Golf ball Shoes b. Create list2.txt (use echo command) as: Football Basketball S ...

Lab 1 develop system administration procedures for windows

Lab #1: Develop System Administration Procedures for Windows 8.1 Security Configuration Purpose: Develop systems administration procedures to implement systems security configuration guidance and best practices. Objectiv ...

Assignment1 arrigo postulated three key propositions of

Assignment (1) Arrigo postulated three key propositions of postmodernism. Explain them in full, using at least 250 words. (2) Daly and Chesney-Lind considered five insights to be distinctive features of feminist theory? ...

Outcomes1 evaluate process management techniques2 analyse

Outcomes: 1. Evaluate process management techniques. 2. Analyse different memory management strategies. 3. Become aware of the issues of operating systems in regards storage management. 4. Analyse the issues of protectio ...

Assignmentinstructions please answer all questions in your

Assignment Instructions: Please answer all questions in your own words Part I: Questions 1. In terms of porting UNIX, what part of the UNIX OS requires modification? why? 2. As a system administrator, how do you deal wit ...

Question moving function outside of the kernel or even

Question: Moving function outside of the kernel or even layering the kernel may provide some benefits. How does virtualization factor into a layered vs. non-layered design discussion? Provide specfic support for your ans ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro