Question about Operating Systems

1 Answer

Memory allocation after dynamically allocating memeory ,when we free the memory using delete operator.the contents of memory are freed or the address of the memory location get deleted from the pointer.

Posted by on

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that gotĀ 5 achievements.

    Governor:

    An expert whose answer gotĀ voted for 20 times.

    Hot-Shot:

    An expert who has answered 20 questions.

  • Expert
  • 75 Answers

Th address will get deleted from the pointer

Posted on Sep 24, 2008


Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Does anyone know exactly what the instruction at 0x755aee49 referenced memory at 0xa3ffff24 the memory could not be written error is and how to resolve it.


>> the instruction at 0x755aee49 referenced memory at 0xa3ffff24 the memory could not be written

You launched some program, and Windows chose to load some of the program at the first address, and then the program tried to write some bits/bytes/words/data to the second address, but Windows has allocated the memory at that address to some other program (or to Windows itself), and Windows is "blocking" the program from overwriting at a location that is outside the bounds of the location (in memory) of the program.

Mar 04, 2015 | Operating Systems

1 Answer

"Stack overflow at line 0"


b> A stack is a section of memory where a program stores its variables, calculations, option states and program parameters. When started, a program is allocated some memory to use for the stack; a stack overflow happens when a program exceeds its allocation. The offending program may attempt to write into adjacent memory sections, causing conflicts with other programs. Stack overflows are common with Java, C++, Perl and other runtime environments, which assist in running programs. A stack overflow at line 0 indicates that the offending program tripped up from the start; however, stack overflows can occur on any line number.

Click "Start," "Control Panel, then "Internet Options." Click on the "Advanced" tab. Check "Disable Script Debugging (IE)" and "Disable Script Debugging (Other)" under the "Browsing" options. Uncheck "Display a notification about every script error." Check "Enable Automatic Crash recovery." Click "OK." Download and install a Java update from the Java website. http://www.java.com/en/download/manual.jsp Download and install a Windows update. Hope this helps.

Dec 24, 2012 | Microsoft Windows XP Professional

1 Answer

What is the operating machine ?


If you mean operating system then:

An operating system (OS) is a set of software that manages computer hardware resources and provides common services for computer programs. The operating system is a vital component of the system software in a computer system. Application programs require an operating system to function.

Time-sharing operating systems schedule tasks for efficient use of the system and may also include accounting for cost allocation of processor time, mass storage, printing, and other resources.

For hardware functions such as input and output and memory allocation, the operating system acts as an intermediary between programs and the computer hardware, although the application code is usually executed directly by the hardware and will frequently make a system call to an OS function or be interrupted by it. Operating systems can be found on almost any device that contains a computer-from cellular phones and video game consoles to supercomputers and web servers.

Examples of popular modern operating systems include Android, BSD, iOS, GNU/Linux, Mac OS X, Microsoft Windows, Windows Phone, and IBM z/OS. All these, except Windows and z/OS, share roots in UNIX.

Jun 24, 2012 | Operating Systems

1 Answer

My problem is with Farming simulator 2011. While playing some of the maps. The game stops running and i get an "bad allocation error". Can you tell me whats causing the problem?...


Hi,
well the error is coming from a memory call this can be system memory, but most likly to be video memory. this game requires at leats

Video Card: Nvidia Geforce 6800 Serie, ATI Radeon x850, 256 Mb

and can cause some good amount of heat when running. so make sure your video cards are cooling enough.. you can monitor temp using a program called GPU-Z(www.techpowerup.com/gpuz/ ) while playing.

you can also use www.softsea.com/review/Video-Memory-Stress-Test.html to test your video memory for free.


GL

hope this helps

Don't forget to vote for me

Thank You

Jammer

Jul 11, 2011 | Operating Systems

1 Answer

My micro sd memory card 2gb was not format complete and also fat alloc error


You must reformat the card again. If you have problems, try using Disk Management (if you have Windows)

Mar 14, 2011 | Operating Systems

2 Answers

Can I increase RAM by using some hard drive space


No. XP already does this (simulating RAM on disk) with the swap file. You can override the system settings for swap file size but usually auto is okay. In any case, disks are horribly slow compared to RAM so you're far better off putting more physical RAM in. You'll see a very noticeable increase in speed if your system is currently swapping out a lot.

Feb 18, 2011 | Microsoft Windows XP Professional for PC

1 Answer

I have tried to install the rosetta stone (original, not a copy) application disc onto 2 different computers I own. One computer has windows vista and the other windows xp. I get this error message on...


Copy the entire cd contents to a new folder on your hard disk, locate the installer/launcher icon inside the folder "Setup.exe", select it and right click on it, go to properties. under compatibility select windows 98 or windows me. press apply or ok, then double click the icon. The program *should* launch properly and install your software. Its a problem with memory resource allocation being different on newer operating systems. (thus why the added the compatibility function for older programs)
cheers.

Aug 29, 2010 | Operating Systems

2 Answers

How to be solve banker algorithm?example


I m providing you this from my college notes

Banker's Algorithm


* multiple instances of resource types IMPLIES cannot use resource-allocation graph

* banks do not allocate cash unless they can satisfy customer needs when a new process enters the system

* declare in advance maximum need for each resource type

* cannot exceed the total resources of that type

* later, processes make actual request for some resources

* if the the allocation leaves system in safe state grant the resources

* otherwise, suspend process until other processes release enough resources



Banker: Data Structures define MAXN 10 /* maximum number of processes */
#define MAXM 10 /* maximum number of resource types */
int Available[MAXM]; /* Available[j] = current # of unused resource j */
int Max[MAXN][MAXM]; /* Max[i][j] = max demand of i for resource j */
int Allocation[MAXN][MAXM]; /* Allocation[i][j] = i's current allocation of j*/
int Need[MAXN][MAXM]; /* Need[i][j] = i's potential for more j */
/* Need[i][j] = Max[i][j] - Allocation[i][j] */

Notation:

X <= Y iff X[i] <= Y[i] for all i

(0,3,2,1) is less than (1,7,3,2)

(1,7,3,2) is NOT less than (0,8,2,1)

Each row of Allocation and Need are vectors: Allocation_i and Need_i



Banker: Example

Initially:

Available
A B C
10 5 7

Later Snapshot:

Max - Allocation = Need Available
A B C A B C A B C A B C
P0 7 5 3 0 1 0 7 4 3 3 3 2
P1 3 2 2 2 0 0 1 2 2
P2 9 0 2 3 0 2 6 0 0
P3 2 2 2 2 1 1 0 1 1
P4 4 3 3 0 0 2 4 3 1



Banker: Safety Algorithm

* consider some sequence of processes

* if the first process has Need less than Available

* it can run until done

* then release all of its allocated resources

* allocation is increased for next process

* if the second process has Need less than Available

* ...

* then all of the processes will be able to run eventually

* IMPLIES system is in a safe state



Banker: Safety Algorithm

STEP 1: initialize
Work := Available;
for i = 1,2,...,n
Finish[i] = false
STEP 2: find i such that both
a. Finish[i] is false
b. Need_i <= Work
if no such i, goto STEP 4
STEP 3:
Work := Work + Allocation_i
Finish[i] = true
goto STEP 2
STEP 4:
if Finish[i] = true for all i, system is in safe state



Banker: Safety Example

Using the previous example, P1,P3,P4,P2,P0 satisfies criteria.

Max - Allocation = Need <= Work Available
A B C A B C A B C A B C
P1 3 2 2 2 0 0 1 2 2 3 3 2 3 3 2
P3 2 2 2 2 1 1 0 1 1 5 3 2
P4 4 3 3 0 0 2 4 3 1 7 4 3
P2 9 0 2 3 0 2 6 0 0 7 4 5
P0 7 5 3 0 1 0 7 4 3 10 4 7
10 5 7<<< initial system



Banker: Resource-Request Algorithm

STEP 0: P_i makes Request_i for resources, say (1,0,2)
STEP 1: if Request_i <= Need_i
goto STEP 2
else ERROR
STEP 2: if Request_i <= Available
goto STEP 3
else suspend P_i
STEP 3: pretend to allocate requested resources
Available := Available - Request_i
Allocation_i := Allocation_i + Request_i;
Need_i := Need_i - Request_i
STEP 4: if pretend state is SAFE
then do a real allocation and P_i proceeds
else
restore the original state and suspend P_i



Banker: Resource-Request Algorithm [129]

Say P1 requests (1,0,2)

Compare to Need_1: (1,0,2) <= (1,2,2)

Compare to Available: (1,0,2) <= (3 3 2)

Pretend to allocate resources:

Max - Allocation = Need Available
A B C A B C A B C A B C
P0 7 5 3 0 1 0 7 4 3 2 3 0<<<
P1 3 2 2 3 0 2<<< 0 2 0<<<
P2 9 0 2 3 0 2 6 0 0
P3 2 2 2 2 1 1 0 1 1
P4 4 3 3 0 0 2 4 3 1

Is this safe? Yes: P1, P3, P4, P0, P2

Can P4 get (3,3,0)? No, (3,3,0) > (2,3,0) Available

Can P0 get (0,2,0)? (0,2,0) < (2,3,0) Available

Pretend: Available goes to (2,1,0)

Thanks And Regards

May 13, 2009 | Microsoft Windows XP Professional

1 Answer

Defragmentation


Fragmentation occurs when the operating system cannot or will not allocate enough contiguous space to store a complete file as a unit, but instead puts parts of it in gaps between other files (usually those gaps exist because they formerly held a file that the operating system has subsequently deleted or because the operating system allocated excess space for the file in the first place). Larger files and greater numbers of files also contribute to fragmentation and consequent performance loss. Defragmentation attempts to alleviate these problems.
Example Consider the following scenario, as shown by the image on the right:
410px-file_system_fragmentation.svg.png An otherwise blank disk has 5 files, A, B, C, D and E each using 10 blocks of space (for this section, a block is an allocation unit of that system, it could be 1K, 100K or 1 megabyte and is not any specific size). On a blank disk, all of these files will be allocated one after the other. (Example (1) on the image.) If file B is deleted, there are two options, leave the space for B empty and use it again later, or compress all the files after B so that the empty space follows it. This could be time consuming if there were hundreds or thousands of files which needed to be moved, so in general the empty space is simply left there, marked in a table as available for later use, then used again as needed.[1] (Example (2) on the image.) Now, if a new file, F, is allocated 7 blocks of space, it can be placed into the first 7 blocks of the space formerly holding the file B and the 3 blocks following it will remain available. (Example (3) on the image.) If another new file, G is added, and needs only three blocks, it could then occupy the space after F and before C. (Example (4) on the image). Now, if subsequently F needs to be expanded, since the space immediately following it is no longer available, there are two options: (1) add a new block somewhere else and indicate that F has a second extent, or (2) move the file F to someplace else where it can be created as one contiguous file of the new, larger size. The latter operation may not be possible as the file may be larger than any one contiguous space available, or the file conceivably could be so large the operation would take an undesirably long period of time, thus the usual practice is simply to create an extent somewhere else and chain the new extent onto the old one. (Example (5) on the image.) Repeat this practice hundreds or thousands of times and eventually the file system has many free segments in many places and many files may be spread over many extents. If, as a result of free space fragmentation, a newly created file (or a file which has been extended) has to be placed in a large number of extents, access time for that file (or for all files) may become excessively long.
The process of creating new files, and of deleting and expanding existing files, may sometimes be colloquially referred to as churn, and can occur at both the level of the general root file system and in subdirectories. Fragmentation not only occurs at the level of individual files, but also when different files in a directory (and maybe its subdirectories), that are often read in a sequence, start to "drift apart" as a result of "churn".
A defragmentation program must move files around within the free space available to undo fragmentation. This is a memory intensive operation and cannot be performed on a file system with no free space. The reorganization involved in defragmentation does not change logical location of the files (defined as their location within the directory structure).

Jul 20, 2008 | Microsoft Windows Server Standard 2003 for...

1 Answer

Operating system


just enter the unallocated partition. then delete it and then enter the size you need. work over.

Jan 06, 2008 | Operating Systems

Not finding what you are looking for?
Operating Systems Logo

Related Topics:

36 people viewed this question

Ask a Question

Usually answered in minutes!

Top Operating Systems Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18299 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Prashant  Sharma
Prashant Sharma

Level 3 Expert

1127 Answers

Are you an Operating System Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...