It hasn't been an easy year for Micron Technology (NASDAQ:MU) and its shareholders. The company is under pressure from the sagging personal-computer industry. Global PC shipments are slowing down this year, which is hurting Micron's core DRAM business. Market research firms IDC and Gartner both reported that PC shipments declined at a concerning rate in the second quarter. According to Gartner, global PC shipments fell 9%, while IDC's findings were even worse, saying that worldwide PC shipments fell 11%.

As a result, Micron's revenue declined last quarter, and its gross margin eroded. Both figures missed analyst expectations.

In turn, Micron's stock price has taken it on the chin in 2015. The shares are down 54% just since the beginning of the year. Shareholders have clearly suffered from Micron's struggles this year. Here is how Micron could reward its investors that have stuck with the stock in such a difficult time.

Cash flow remains solid
Micron's revenue fell 3% last quarter, and its gross margin contracted by more than three percentage points last quarter, year-over-year. This dip caused earnings per share to decline 38% year-over-year. As the PC industry contracts, Micron has had to accept lower prices for its PC-related products to move inventory. This is a very negative combination, which explains why earnings are falling.

But for all of Micron's challenges, the company remains a strong cash-flow generator. Even last quarter, Micron still raked in $600 million of free cash flow, thanks to fairly lean capital expenditure levels. Micron's annual free cash flow has risen at a very strong clip in the past four years.

MU Free Cash Flow (Annual) Chart

MU Free Cash Flow (Annual) data by YCharts

Micron doesn't have overly burdensome debt levels, as the company carries a relatively modest 47% long-term debt-to-equity ratio. This means the free cash flow is piling up on the balance sheet.

Micron doesn't pay a dividend, and it utilized just $245 million to buy back its own stock over the first three quarters of the year. That represents just 12% of Micron's free cash flow in that time. With shares falling so precipitously this year, a larger cash return to shareholders might be a good idea.

Cash is burning a hole in Micron's pockets
At the end of last quarter, Micron held $4.8 billion in cash and cash equivalents, along with another $2.4 billion in long-term investments. All told, Micron's marketable securities balance exceeds $7.2 billion, or about $6.54 per share using the company's 1.1 billion shares outstanding. Considering Micron's Aug. 19 closing price of $15.90 per share, it's clear the company is holding a lot of cash on the sidelines.

But the market isn't rewarding Micron for having so much cash on hand. The stock trades for just 6 times forward EPS estimates, much lower than the average multiple over the past two years.

MU PE Ratio (Forward) Chart

MU P/E Ratio (Forward) data by YCharts

First and foremost, Micron should use its cash to invest in future growth. But it's already doing that. Its research and development expenses as a percentage of revenue grew nearly 2 full percentage points last quarter versus the same quarter one year ago. It's a good sign that Micron is expanding its investments in new growth opportunities. But Micron has so much cash, and it continues to consistently generate cash flow, which means there's even more that can be done.

As a result, Micron should consider returning some of its cash to shareholders, through a large share buyback program or a dividend.

Many options at Micron's disposal
With interest rates stuck at near-zero levels, it's likely Micron is earning little to nothing on its cash pile. The company could create value for shareholders by announcing a large buyback or instituting a regular dividend.

For example, Micron could use one-third of its cash, approximately $2.4 billion, to repurchase roughly 150 million of its own shares. By doing so, it would reduce the diluted share count by 13%. This move would be significantly accretive to earnings per share, which demonstrates the benefit of a company strategically buying back its own stock at low prices.

Or Micron could declare a significant special dividend. Using the same $2.4 billion example, that would represent a special dividend of about $2.05 per share. That would provide shareholders with an instant 13% return.

These scenarios are entirely feasible amounts of cash to utilize. It would leave plenty of cash to maintain a healthy balance sheet and still allow Micron to continue investing in its most important growth initiatives. But it would also provide a real return for shareholders, who have suffered significant capital losses this year. For Micron, it's time to put some of its cash to work.

Bob Ciura has no position in any stocks mentioned. The Motley Fool recommends Gartner. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.