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

Primary discussion responseprimary discussion response your

Primary Discussion Response Primary Discussion Response: Your classmates, your instructor, and you have been working together over the session as a team. Through discussion board tasks and individual projects, you have s ...

Goals1 to gain hands-on experience with fork exec and wait

Goals: 1. To gain hands-on experience with fork(), exec(), and wait() system calls. 2. To master the basics of multi-process application development. 3. To appreciate the performance and fault-tolerance bene_ts of multi- ...

Assignmentmultiple-processor scheduling simulationthe goal

Assignment Multiple-Processor Scheduling Simulation The goal of this simulation is to give you some experiences using POSIX Pthreads library functions for thread creations and synchronizations. You will learn how to solv ...

Discussionconduct a system evaluation on your computer

Discussion Conduct a system evaluation on your computer (Windows 8 and 10 are covered) to decide if your current computer meets your needs for now and in the future. (Windows 7, Mac OS) • What is your CPU utilization? • ...

Web server practical-1 you are required to configure and

Web Server Practical- 1) You are required to configure and test a Web server to provide web hosting services to a client computer. Install and configure a web server, serving out a default web page that you have created. ...

What is the purpose of an embedded operating system and why

What is the purpose of an embedded operating system and why would one be used? Discuss at least two advantages and two vulnerabilities in utilizing an embedded OS. Directions: Your completed assignment should be at least ...

Question 1an important service provided by any system is

Question 1: An important service provided by any system is the ability to run a process on a predetermined schedule without human intervention. The "automation" of tasks can reduce the workload of the system administrato ...

Linux implementation proposalphelpstech llc has a new

Linux Implementation Proposal PhelpsTech, LLC. has a new research and development group - Medals. All systems in Medals will run the Linux operating system and will access resources, as well as share resources, with Phel ...

Questioninformation technology planning how much should a

Question:INFORMATION TECHNOLOGY PLANNING How much should a company invest in IT? How does a company know if it under-invests or over-invests in IT? If you haven''t heard of the "IT-productivity paradox," then it is the t ...

Linux implementation proposalphelpstech llc has a new

Linux Implementation Proposal PhelpsTech, LLC. has a new research and development group - Medals. All systems in Medals will run the Linux operating system and will access resources, as well as share resources, with Phel ...

  • 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

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate